generated-configure.sh revision 2251:e51f798914a8
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIBS
675LIBFFI_CFLAGS
676ALSA_LIBS
677ALSA_CFLAGS
678FREETYPE_BUNDLE_LIB_PATH
679FREETYPE_LIBS
680FREETYPE_CFLAGS
681CUPS_CFLAGS
682X_EXTRA_LIBS
683X_LIBS
684X_PRE_LIBS
685X_CFLAGS
686XMKMF
687MSVCP_DLL
688MSVCR_DLL
689LIBCXX
690STATIC_CXX_SETTING
691FIXPATH_DETACH_FLAG
692FIXPATH
693BUILD_GTEST
694VALID_JVM_FEATURES
695JVM_FEATURES_custom
696JVM_FEATURES_zeroshark
697JVM_FEATURES_zero
698JVM_FEATURES_minimal
699JVM_FEATURES_core
700JVM_FEATURES_client
701JVM_FEATURES_server
702INCLUDE_DTRACE
703GCOV_ENABLED
704STRIP_POLICY
705DEBUG_BINARIES
706ZIP_EXTERNAL_DEBUG_SYMBOLS
707COPY_DEBUG_SYMBOLS
708COMPILE_WITH_DEBUG_SYMBOLS
709CFLAGS_WARNINGS_ARE_ERRORS
710BUILD_CC_DISABLE_WARNING_PREFIX
711DISABLE_WARNING_PREFIX
712HOTSPOT_SET_WARNINGS_AS_ERRORS
713WARNINGS_AS_ERRORS
714COMPILER_SUPPORTS_TARGET_BITS_FLAG
715ZERO_ARCHFLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753CXX_O_FLAG_SIZE
754CXX_O_FLAG_NONE
755CXX_O_FLAG_DEBUG
756CXX_O_FLAG_NORM
757CXX_O_FLAG_HI
758CXX_O_FLAG_HIGHEST
759CXX_O_FLAG_HIGHEST_JVM
760C_O_FLAG_SIZE
761C_O_FLAG_NONE
762C_O_FLAG_DEBUG
763C_O_FLAG_NORM
764C_O_FLAG_HI
765C_O_FLAG_HIGHEST
766C_O_FLAG_HIGHEST_JVM
767JVM_CFLAGS_SYMBOLS
768CXXFLAGS_DEBUG_SYMBOLS
769CFLAGS_DEBUG_SYMBOLS
770CXX_FLAG_DEPS
771C_FLAG_DEPS
772SHARED_LIBRARY_FLAGS
773SET_SHARED_LIBRARY_MAPFILE
774SET_SHARED_LIBRARY_NAME
775SET_SHARED_LIBRARY_ORIGIN
776SET_EXECUTABLE_ORIGIN
777CXX_FLAG_REORDER
778C_FLAG_REORDER
779JVM_RCFLAGS
780RC_FLAGS
781AR_OUT_OPTION
782LD_OUT_OPTION
783EXE_OUT_OPTION
784CC_OUT_OPTION
785STRIPFLAGS
786ARFLAGS
787COMPILER_BINDCMD_FILE_FLAG
788COMPILER_COMMAND_FILE_FLAG
789COMPILER_TARGET_BITS_FLAG
790JT_HOME
791JTREGEXE
792HOTSPOT_TOOLCHAIN_TYPE
793USING_BROKEN_SUSE_LD
794PACKAGE_PATH
795USE_CLANG
796HOTSPOT_LD
797HOTSPOT_CXX
798HOTSPOT_RC
799HOTSPOT_MT
800BUILD_AS
801BUILD_LDCXX
802BUILD_LD
803BUILD_STRIP
804BUILD_OBJCOPY
805BUILD_AR
806BUILD_NM
807BUILD_CXX
808BUILD_CC
809BUILD_SYSROOT_LDFLAGS
810BUILD_SYSROOT_CFLAGS
811ac_ct_OBJDUMP
812OBJDUMP
813ac_ct_OBJCOPY
814OBJCOPY
815ac_ct_NM
816ac_ct_STRIP
817GNM
818NM
819STRIP
820MSBUILD
821DUMPBIN
822RC
823MT
824LIPO
825ac_ct_AR
826AR
827AS
828LDCXX
829LD
830CXXCPP
831CPP
832CXX_VERSION_NUMBER
833CC_VERSION_NUMBER
834ac_ct_CXX
835CXXFLAGS
836CXX
837TOOLCHAIN_PATH_CXX
838POTENTIAL_CXX
839OBJEXT
840EXEEXT
841ac_ct_CC
842CPPFLAGS
843LDFLAGS
844CFLAGS
845CC
846TOOLCHAIN_PATH_CC
847POTENTIAL_CC
848TOOLCHAIN_VERSION
849VS_LIB
850VS_INCLUDE
851VS_PATH
852CYGWIN_LINK
853SYSROOT_LDFLAGS
854SYSROOT_CFLAGS
855EXTRA_LDFLAGS
856EXTRA_CXXFLAGS
857EXTRA_CFLAGS
858LEGACY_EXTRA_LDFLAGS
859LEGACY_EXTRA_CXXFLAGS
860LEGACY_EXTRA_CFLAGS
861EXE_SUFFIX
862OBJ_SUFFIX
863STATIC_LIBRARY
864SHARED_LIBRARY
865STATIC_LIBRARY_SUFFIX
866SHARED_LIBRARY_SUFFIX
867LIBRARY_PREFIX
868TOOLCHAIN_TYPE
869STATIC_BUILD
870IMPORT_MODULES_MAKE
871IMPORT_MODULES_SRC
872IMPORT_MODULES_CONF
873IMPORT_MODULES_LIBS
874IMPORT_MODULES_CMDS
875IMPORT_MODULES_CLASSES
876BUILD_HOTSPOT
877HOTSPOT_DIST
878BUILD_OUTPUT
879JDK_TOPDIR
880NASHORN_TOPDIR
881HOTSPOT_TOPDIR
882JAXWS_TOPDIR
883JAXP_TOPDIR
884CORBA_TOPDIR
885LANGTOOLS_TOPDIR
886EXTERNAL_BUILDJDK
887BUILD_JDK
888CREATE_BUILDJDK
889JLINK
890JMOD
891BOOT_JDK_BITS
892JAVAC_FLAGS
893BOOT_JDK_MODULAR
894BOOT_JDK_SOURCETARGET
895JARSIGNER
896JAR
897JAVAH
898JAVAC
899JAVA
900BOOT_JDK
901JAVA_CHECK
902JAVAC_CHECK
903VERSION_IS_GA
904VERSION_SHORT
905VERSION_STRING
906VERSION_NUMBER_FOUR_POSITIONS
907VERSION_NUMBER
908VERSION_OPT
909VERSION_BUILD
910VERSION_PRE
911VERSION_PATCH
912VERSION_SECURITY
913VERSION_MINOR
914VERSION_MAJOR
915MACOSX_BUNDLE_ID_BASE
916MACOSX_BUNDLE_NAME_BASE
917HOTSPOT_VM_DISTRO
918COMPANY_NAME
919JDK_RC_PLATFORM_NAME
920PRODUCT_SUFFIX
921PRODUCT_NAME
922LAUNCHER_NAME
923JLINK_KEEP_PACKAGED_MODULES
924COPYRIGHT_YEAR
925COMPRESS_JARS
926INCLUDE_SA
927UNLIMITED_CRYPTO
928CACERTS_FILE
929BUILD_HEADLESS
930SUPPORT_HEADFUL
931SUPPORT_HEADLESS
932DEFAULT_MAKE_TARGET
933OS_VERSION_MICRO
934OS_VERSION_MINOR
935OS_VERSION_MAJOR
936PKG_CONFIG
937BASH_ARGS
938SETFILE
939CODESIGN
940XATTR
941DSYMUTIL
942IS_GNU_TIME
943PATCH
944DTRACE
945TIME
946STAT
947HG
948READELF
949OTOOL
950LDD
951ZIP
952UNZIP
953TAR_SUPPORTS_TRANSFORM
954TAR_INCLUDE_PARAM
955TAR_CREATE_EXTRA_PARAM
956TAR_TYPE
957FIND_DELETE
958OUTPUT_SYNC
959OUTPUT_SYNC_SUPPORTED
960CHECK_TOOLSDIR_MAKE
961CHECK_TOOLSDIR_GMAKE
962CHECK_MAKE
963CHECK_GMAKE
964MAKE
965PKGHANDLER
966CONFIGURESUPPORT_OUTPUTDIR
967OUTPUT_ROOT
968CONF_NAME
969SPEC
970SDKROOT
971XCODEBUILD
972VALID_JVM_VARIANTS
973JVM_VARIANTS
974DEBUG_LEVEL
975HOTSPOT_DEBUG_LEVEL
976JDK_VARIANT
977USERNAME
978CANONICAL_TOPDIR
979ORIGINAL_TOPDIR
980TOPDIR
981PATH_SEP
982ZERO_ARCHDEF
983HOTSPOT_BUILD_CPU_DEFINE
984HOTSPOT_BUILD_CPU_ARCH
985HOTSPOT_BUILD_CPU
986HOTSPOT_BUILD_OS_TYPE
987HOTSPOT_BUILD_OS
988OPENJDK_BUILD_BUNDLE_PLATFORM
989OPENJDK_BUILD_CPU_BUNDLE
990OPENJDK_BUILD_OS_BUNDLE
991OPENJDK_BUILD_OS_EXPORT_DIR
992OPENJDK_BUILD_CPU_JLI_CFLAGS
993OPENJDK_BUILD_CPU_OSARCH
994OPENJDK_BUILD_CPU_ISADIR
995OPENJDK_BUILD_CPU_LIBDIR
996OPENJDK_BUILD_CPU_LEGACY_LIB
997OPENJDK_BUILD_CPU_LEGACY
998HOTSPOT_TARGET_CPU_DEFINE
999HOTSPOT_TARGET_CPU_ARCH
1000HOTSPOT_TARGET_CPU
1001HOTSPOT_TARGET_OS_TYPE
1002HOTSPOT_TARGET_OS
1003DEFINE_CROSS_COMPILE_ARCH
1004LP64
1005OPENJDK_TARGET_BUNDLE_PLATFORM
1006OPENJDK_TARGET_CPU_BUNDLE
1007OPENJDK_TARGET_OS_BUNDLE
1008OPENJDK_TARGET_OS_EXPORT_DIR
1009OPENJDK_TARGET_CPU_JLI_CFLAGS
1010OPENJDK_TARGET_CPU_OSARCH
1011OPENJDK_TARGET_CPU_ISADIR
1012OPENJDK_TARGET_CPU_LIBDIR
1013OPENJDK_TARGET_CPU_LEGACY_LIB
1014OPENJDK_TARGET_CPU_LEGACY
1015REQUIRED_OS_VERSION
1016REQUIRED_OS_NAME
1017COMPILE_TYPE
1018OPENJDK_TARGET_CPU_ENDIAN
1019OPENJDK_TARGET_CPU_BITS
1020OPENJDK_TARGET_CPU_ARCH
1021OPENJDK_TARGET_CPU
1022OPENJDK_TARGET_OS_ENV
1023OPENJDK_TARGET_OS_TYPE
1024OPENJDK_TARGET_OS
1025OPENJDK_BUILD_CPU_ENDIAN
1026OPENJDK_BUILD_CPU_BITS
1027OPENJDK_BUILD_CPU_ARCH
1028OPENJDK_BUILD_CPU
1029OPENJDK_BUILD_OS_ENV
1030OPENJDK_BUILD_OS_TYPE
1031OPENJDK_BUILD_OS
1032OPENJDK_BUILD_AUTOCONF_NAME
1033OPENJDK_TARGET_AUTOCONF_NAME
1034target_os
1035target_vendor
1036target_cpu
1037target
1038host_os
1039host_vendor
1040host_cpu
1041host
1042build_os
1043build_vendor
1044build_cpu
1045build
1046NICE
1047CPIO
1048DF
1049READLINK
1050CYGPATH
1051SED
1052FGREP
1053EGREP
1054GREP
1055AWK
1056XARGS
1057WHICH
1058WC
1059UNIQ
1060UNAME
1061TR
1062TOUCH
1063TEE
1064TAR
1065TAIL
1066SORT
1067SH
1068RMDIR
1069RM
1070PRINTF
1071NAWK
1072MV
1073MKTEMP
1074MKDIR
1075LS
1076LN
1077GZIP
1078GUNZIP
1079HEAD
1080FIND
1081FILE
1082EXPR
1083ECHO
1084DIRNAME
1085DIFF
1086DATE
1087CUT
1088CP
1089COMM
1090CMP
1091CHMOD
1092CAT
1093BASH
1094BASENAME
1095DATE_WHEN_CONFIGURED
1096ORIGINAL_PATH
1097CONFIGURE_COMMAND_LINE
1098target_alias
1099host_alias
1100build_alias
1101LIBS
1102ECHO_T
1103ECHO_N
1104ECHO_C
1105DEFS
1106mandir
1107localedir
1108libdir
1109psdir
1110pdfdir
1111dvidir
1112htmldir
1113infodir
1114docdir
1115oldincludedir
1116includedir
1117localstatedir
1118sharedstatedir
1119sysconfdir
1120datadir
1121datarootdir
1122libexecdir
1123sbindir
1124bindir
1125program_transform_name
1126prefix
1127exec_prefix
1128PACKAGE_URL
1129PACKAGE_BUGREPORT
1130PACKAGE_STRING
1131PACKAGE_VERSION
1132PACKAGE_TARNAME
1133PACKAGE_NAME
1134PATH_SEPARATOR
1135SHELL'
1136ac_subst_files=''
1137ac_user_opts='
1138enable_option_checking
1139with_target_bits
1140enable_openjdk_only
1141with_custom_make_dir
1142with_jdk_variant
1143enable_debug
1144with_debug_level
1145with_jvm_variants
1146with_devkit
1147with_sys_root
1148with_sysroot
1149with_tools_dir
1150with_toolchain_path
1151with_extra_path
1152with_sdk_name
1153with_conf_name
1154with_output_sync
1155with_default_make_target
1156enable_headful
1157with_cacerts_file
1158enable_unlimited_crypto
1159with_copyright_year
1160enable_keep_packaged_modules
1161with_milestone
1162with_update_version
1163with_user_release_suffix
1164with_build_number
1165with_version_string
1166with_version_pre
1167with_version_opt
1168with_version_build
1169with_version_major
1170with_version_minor
1171with_version_security
1172with_version_patch
1173with_boot_jdk
1174with_build_jdk
1175with_add_source_root
1176with_override_source_root
1177with_adds_and_overrides
1178with_override_langtools
1179with_override_corba
1180with_override_jaxp
1181with_override_jaxws
1182with_override_hotspot
1183with_override_nashorn
1184with_override_jdk
1185with_import_hotspot
1186with_import_modules
1187enable_static_build
1188with_toolchain_type
1189with_extra_cflags
1190with_extra_cxxflags
1191with_extra_ldflags
1192with_toolchain_version
1193with_build_devkit
1194with_jtreg
1195enable_warnings_as_errors
1196with_native_debug_symbols
1197enable_debug_symbols
1198enable_zip_debug_info
1199enable_native_coverage
1200enable_dtrace
1201with_jvm_features
1202with_jvm_interpreter
1203enable_hotspot_gtest
1204with_stdc__lib
1205with_msvcr_dll
1206with_msvcp_dll
1207with_x
1208with_cups
1209with_cups_include
1210with_freetype
1211with_freetype_include
1212with_freetype_lib
1213with_freetype_src
1214enable_freetype_bundling
1215with_alsa
1216with_alsa_include
1217with_alsa_lib
1218with_libffi
1219with_libffi_include
1220with_libffi_lib
1221with_libjpeg
1222with_giflib
1223with_libpng
1224with_zlib
1225with_lcms
1226with_dxsdk
1227with_dxsdk_lib
1228with_dxsdk_include
1229enable_jtreg_failure_handler
1230enable_generate_classlist
1231with_num_cores
1232with_memory_size
1233with_jobs
1234with_test_jobs
1235with_boot_jdk_jvmargs
1236with_sjavac_server_java
1237enable_sjavac
1238enable_javac_server
1239enable_icecc
1240enable_precompiled_headers
1241enable_ccache
1242with_ccache_dir
1243'
1244      ac_precious_vars='build_alias
1245host_alias
1246target_alias
1247BASENAME
1248BASH
1249CAT
1250CHMOD
1251CMP
1252COMM
1253CP
1254CUT
1255DATE
1256DIFF
1257DIRNAME
1258ECHO
1259EXPR
1260FILE
1261FIND
1262HEAD
1263GUNZIP
1264GZIP
1265LN
1266LS
1267MKDIR
1268MKTEMP
1269MV
1270NAWK
1271PRINTF
1272RM
1273RMDIR
1274SH
1275SORT
1276TAIL
1277TAR
1278TEE
1279TOUCH
1280TR
1281UNAME
1282UNIQ
1283WC
1284WHICH
1285XARGS
1286AWK
1287GREP
1288EGREP
1289FGREP
1290SED
1291CYGPATH
1292READLINK
1293DF
1294CPIO
1295NICE
1296MAKE
1297UNZIP
1298ZIP
1299LDD
1300OTOOL
1301READELF
1302HG
1303STAT
1304TIME
1305DTRACE
1306PATCH
1307DSYMUTIL
1308XATTR
1309CODESIGN
1310SETFILE
1311PKG_CONFIG
1312JAVA
1313JAVAC
1314JAVAH
1315JAR
1316JARSIGNER
1317CC
1318CFLAGS
1319LDFLAGS
1320LIBS
1321CPPFLAGS
1322CXX
1323CXXFLAGS
1324CCC
1325CPP
1326CXXCPP
1327AS
1328AR
1329LIPO
1330STRIP
1331NM
1332GNM
1333OBJCOPY
1334OBJDUMP
1335BUILD_CC
1336BUILD_CXX
1337BUILD_NM
1338BUILD_AR
1339BUILD_OBJCOPY
1340BUILD_STRIP
1341JTREGEXE
1342XMKMF
1343FREETYPE_CFLAGS
1344FREETYPE_LIBS
1345ALSA_CFLAGS
1346ALSA_LIBS
1347LIBFFI_CFLAGS
1348LIBFFI_LIBS
1349PNG_CFLAGS
1350PNG_LIBS
1351LCMS_CFLAGS
1352LCMS_LIBS
1353ICECC_CMD
1354ICECC_CREATE_ENV
1355ICECC_WRAPPER
1356CCACHE'
1357
1358
1359# Initialize some variables set by options.
1360ac_init_help=
1361ac_init_version=false
1362ac_unrecognized_opts=
1363ac_unrecognized_sep=
1364# The variables have the same names as the options, with
1365# dashes changed to underlines.
1366cache_file=/dev/null
1367exec_prefix=NONE
1368no_create=
1369no_recursion=
1370prefix=NONE
1371program_prefix=NONE
1372program_suffix=NONE
1373program_transform_name=s,x,x,
1374silent=
1375site=
1376srcdir=
1377verbose=
1378x_includes=NONE
1379x_libraries=NONE
1380
1381# Installation directory options.
1382# These are left unexpanded so users can "make install exec_prefix=/foo"
1383# and all the variables that are supposed to be based on exec_prefix
1384# by default will actually change.
1385# Use braces instead of parens because sh, perl, etc. also accept them.
1386# (The list follows the same order as the GNU Coding Standards.)
1387bindir='${exec_prefix}/bin'
1388sbindir='${exec_prefix}/sbin'
1389libexecdir='${exec_prefix}/libexec'
1390datarootdir='${prefix}/share'
1391datadir='${datarootdir}'
1392sysconfdir='${prefix}/etc'
1393sharedstatedir='${prefix}/com'
1394localstatedir='${prefix}/var'
1395includedir='${prefix}/include'
1396oldincludedir='/usr/include'
1397docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398infodir='${datarootdir}/info'
1399htmldir='${docdir}'
1400dvidir='${docdir}'
1401pdfdir='${docdir}'
1402psdir='${docdir}'
1403libdir='${exec_prefix}/lib'
1404localedir='${datarootdir}/locale'
1405mandir='${datarootdir}/man'
1406
1407ac_prev=
1408ac_dashdash=
1409for ac_option
1410do
1411  # If the previous option needs an argument, assign it.
1412  if test -n "$ac_prev"; then
1413    eval $ac_prev=\$ac_option
1414    ac_prev=
1415    continue
1416  fi
1417
1418  case $ac_option in
1419  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420  *=)   ac_optarg= ;;
1421  *)    ac_optarg=yes ;;
1422  esac
1423
1424  # Accept the important Cygnus configure options, so we can diagnose typos.
1425
1426  case $ac_dashdash$ac_option in
1427  --)
1428    ac_dashdash=yes ;;
1429
1430  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431    ac_prev=bindir ;;
1432  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433    bindir=$ac_optarg ;;
1434
1435  -build | --build | --buil | --bui | --bu)
1436    ac_prev=build_alias ;;
1437  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438    build_alias=$ac_optarg ;;
1439
1440  -cache-file | --cache-file | --cache-fil | --cache-fi \
1441  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442    ac_prev=cache_file ;;
1443  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445    cache_file=$ac_optarg ;;
1446
1447  --config-cache | -C)
1448    cache_file=config.cache ;;
1449
1450  -datadir | --datadir | --datadi | --datad)
1451    ac_prev=datadir ;;
1452  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453    datadir=$ac_optarg ;;
1454
1455  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456  | --dataroo | --dataro | --datar)
1457    ac_prev=datarootdir ;;
1458  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460    datarootdir=$ac_optarg ;;
1461
1462  -disable-* | --disable-*)
1463    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466      as_fn_error $? "invalid feature name: $ac_useropt"
1467    ac_useropt_orig=$ac_useropt
1468    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469    case $ac_user_opts in
1470      *"
1471"enable_$ac_useropt"
1472"*) ;;
1473      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474	 ac_unrecognized_sep=', ';;
1475    esac
1476    eval enable_$ac_useropt=no ;;
1477
1478  -docdir | --docdir | --docdi | --doc | --do)
1479    ac_prev=docdir ;;
1480  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481    docdir=$ac_optarg ;;
1482
1483  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484    ac_prev=dvidir ;;
1485  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486    dvidir=$ac_optarg ;;
1487
1488  -enable-* | --enable-*)
1489    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490    # Reject names that are not valid shell variable names.
1491    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492      as_fn_error $? "invalid feature name: $ac_useropt"
1493    ac_useropt_orig=$ac_useropt
1494    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495    case $ac_user_opts in
1496      *"
1497"enable_$ac_useropt"
1498"*) ;;
1499      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500	 ac_unrecognized_sep=', ';;
1501    esac
1502    eval enable_$ac_useropt=\$ac_optarg ;;
1503
1504  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506  | --exec | --exe | --ex)
1507    ac_prev=exec_prefix ;;
1508  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510  | --exec=* | --exe=* | --ex=*)
1511    exec_prefix=$ac_optarg ;;
1512
1513  -gas | --gas | --ga | --g)
1514    # Obsolete; use --with-gas.
1515    with_gas=yes ;;
1516
1517  -help | --help | --hel | --he | -h)
1518    ac_init_help=long ;;
1519  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520    ac_init_help=recursive ;;
1521  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522    ac_init_help=short ;;
1523
1524  -host | --host | --hos | --ho)
1525    ac_prev=host_alias ;;
1526  -host=* | --host=* | --hos=* | --ho=*)
1527    host_alias=$ac_optarg ;;
1528
1529  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530    ac_prev=htmldir ;;
1531  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532  | --ht=*)
1533    htmldir=$ac_optarg ;;
1534
1535  -includedir | --includedir | --includedi | --included | --include \
1536  | --includ | --inclu | --incl | --inc)
1537    ac_prev=includedir ;;
1538  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539  | --includ=* | --inclu=* | --incl=* | --inc=*)
1540    includedir=$ac_optarg ;;
1541
1542  -infodir | --infodir | --infodi | --infod | --info | --inf)
1543    ac_prev=infodir ;;
1544  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545    infodir=$ac_optarg ;;
1546
1547  -libdir | --libdir | --libdi | --libd)
1548    ac_prev=libdir ;;
1549  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550    libdir=$ac_optarg ;;
1551
1552  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553  | --libexe | --libex | --libe)
1554    ac_prev=libexecdir ;;
1555  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556  | --libexe=* | --libex=* | --libe=*)
1557    libexecdir=$ac_optarg ;;
1558
1559  -localedir | --localedir | --localedi | --localed | --locale)
1560    ac_prev=localedir ;;
1561  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562    localedir=$ac_optarg ;;
1563
1564  -localstatedir | --localstatedir | --localstatedi | --localstated \
1565  | --localstate | --localstat | --localsta | --localst | --locals)
1566    ac_prev=localstatedir ;;
1567  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569    localstatedir=$ac_optarg ;;
1570
1571  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572    ac_prev=mandir ;;
1573  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574    mandir=$ac_optarg ;;
1575
1576  -nfp | --nfp | --nf)
1577    # Obsolete; use --without-fp.
1578    with_fp=no ;;
1579
1580  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581  | --no-cr | --no-c | -n)
1582    no_create=yes ;;
1583
1584  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586    no_recursion=yes ;;
1587
1588  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590  | --oldin | --oldi | --old | --ol | --o)
1591    ac_prev=oldincludedir ;;
1592  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595    oldincludedir=$ac_optarg ;;
1596
1597  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598    ac_prev=prefix ;;
1599  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600    prefix=$ac_optarg ;;
1601
1602  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603  | --program-pre | --program-pr | --program-p)
1604    ac_prev=program_prefix ;;
1605  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607    program_prefix=$ac_optarg ;;
1608
1609  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610  | --program-suf | --program-su | --program-s)
1611    ac_prev=program_suffix ;;
1612  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614    program_suffix=$ac_optarg ;;
1615
1616  -program-transform-name | --program-transform-name \
1617  | --program-transform-nam | --program-transform-na \
1618  | --program-transform-n | --program-transform- \
1619  | --program-transform | --program-transfor \
1620  | --program-transfo | --program-transf \
1621  | --program-trans | --program-tran \
1622  | --progr-tra | --program-tr | --program-t)
1623    ac_prev=program_transform_name ;;
1624  -program-transform-name=* | --program-transform-name=* \
1625  | --program-transform-nam=* | --program-transform-na=* \
1626  | --program-transform-n=* | --program-transform-=* \
1627  | --program-transform=* | --program-transfor=* \
1628  | --program-transfo=* | --program-transf=* \
1629  | --program-trans=* | --program-tran=* \
1630  | --progr-tra=* | --program-tr=* | --program-t=*)
1631    program_transform_name=$ac_optarg ;;
1632
1633  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634    ac_prev=pdfdir ;;
1635  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636    pdfdir=$ac_optarg ;;
1637
1638  -psdir | --psdir | --psdi | --psd | --ps)
1639    ac_prev=psdir ;;
1640  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641    psdir=$ac_optarg ;;
1642
1643  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644  | -silent | --silent | --silen | --sile | --sil)
1645    silent=yes ;;
1646
1647  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648    ac_prev=sbindir ;;
1649  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650  | --sbi=* | --sb=*)
1651    sbindir=$ac_optarg ;;
1652
1653  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655  | --sharedst | --shareds | --shared | --share | --shar \
1656  | --sha | --sh)
1657    ac_prev=sharedstatedir ;;
1658  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661  | --sha=* | --sh=*)
1662    sharedstatedir=$ac_optarg ;;
1663
1664  -site | --site | --sit)
1665    ac_prev=site ;;
1666  -site=* | --site=* | --sit=*)
1667    site=$ac_optarg ;;
1668
1669  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670    ac_prev=srcdir ;;
1671  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672    srcdir=$ac_optarg ;;
1673
1674  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675  | --syscon | --sysco | --sysc | --sys | --sy)
1676    ac_prev=sysconfdir ;;
1677  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679    sysconfdir=$ac_optarg ;;
1680
1681  -target | --target | --targe | --targ | --tar | --ta | --t)
1682    ac_prev=target_alias ;;
1683  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684    target_alias=$ac_optarg ;;
1685
1686  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687    verbose=yes ;;
1688
1689  -version | --version | --versio | --versi | --vers | -V)
1690    ac_init_version=: ;;
1691
1692  -with-* | --with-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694    # Reject names that are not valid shell variable names.
1695    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696      as_fn_error $? "invalid package name: $ac_useropt"
1697    ac_useropt_orig=$ac_useropt
1698    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699    case $ac_user_opts in
1700      *"
1701"with_$ac_useropt"
1702"*) ;;
1703      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=\$ac_optarg ;;
1707
1708  -without-* | --without-*)
1709    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710    # Reject names that are not valid shell variable names.
1711    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712      as_fn_error $? "invalid package name: $ac_useropt"
1713    ac_useropt_orig=$ac_useropt
1714    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715    case $ac_user_opts in
1716      *"
1717"with_$ac_useropt"
1718"*) ;;
1719      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720	 ac_unrecognized_sep=', ';;
1721    esac
1722    eval with_$ac_useropt=no ;;
1723
1724  --x)
1725    # Obsolete; use --with-x.
1726    with_x=yes ;;
1727
1728  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729  | --x-incl | --x-inc | --x-in | --x-i)
1730    ac_prev=x_includes ;;
1731  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733    x_includes=$ac_optarg ;;
1734
1735  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737    ac_prev=x_libraries ;;
1738  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740    x_libraries=$ac_optarg ;;
1741
1742  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743Try \`$0 --help' for more information"
1744    ;;
1745
1746  *=*)
1747    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748    # Reject names that are not valid shell variable names.
1749    case $ac_envvar in #(
1750      '' | [0-9]* | *[!_$as_cr_alnum]* )
1751      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752    esac
1753    eval $ac_envvar=\$ac_optarg
1754    export $ac_envvar ;;
1755
1756  *)
1757    # FIXME: should be removed in autoconf 3.0.
1758    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762    ;;
1763
1764  esac
1765done
1766
1767if test -n "$ac_prev"; then
1768  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769  as_fn_error $? "missing argument to $ac_option"
1770fi
1771
1772if test -n "$ac_unrecognized_opts"; then
1773  case $enable_option_checking in
1774    no) ;;
1775    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777  esac
1778fi
1779
1780# Check all directory arguments for consistency.
1781for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782		datadir sysconfdir sharedstatedir localstatedir includedir \
1783		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784		libdir localedir mandir
1785do
1786  eval ac_val=\$$ac_var
1787  # Remove trailing slashes.
1788  case $ac_val in
1789    */ )
1790      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791      eval $ac_var=\$ac_val;;
1792  esac
1793  # Be sure to have absolute directory names.
1794  case $ac_val in
1795    [\\/$]* | ?:[\\/]* )  continue;;
1796    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797  esac
1798  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799done
1800
1801# There might be people who depend on the old broken behavior: `$host'
1802# used to hold the argument of --host etc.
1803# FIXME: To remove some day.
1804build=$build_alias
1805host=$host_alias
1806target=$target_alias
1807
1808# FIXME: To remove some day.
1809if test "x$host_alias" != x; then
1810  if test "x$build_alias" = x; then
1811    cross_compiling=maybe
1812  elif test "x$build_alias" != "x$host_alias"; then
1813    cross_compiling=yes
1814  fi
1815fi
1816
1817ac_tool_prefix=
1818test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819
1820test "$silent" = yes && exec 6>/dev/null
1821
1822
1823ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824ac_ls_di=`ls -di .` &&
1825ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826  as_fn_error $? "working directory cannot be determined"
1827test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828  as_fn_error $? "pwd does not report name of working directory"
1829
1830
1831# Find the source files, if location was not specified.
1832if test -z "$srcdir"; then
1833  ac_srcdir_defaulted=yes
1834  # Try the directory containing this script, then the parent directory.
1835  ac_confdir=`$as_dirname -- "$as_myself" ||
1836$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837	 X"$as_myself" : 'X\(//\)[^/]' \| \
1838	 X"$as_myself" : 'X\(//\)$' \| \
1839	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840$as_echo X"$as_myself" |
1841    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)[^/].*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\/\)$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\).*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  s/.*/./; q'`
1858  srcdir=$ac_confdir
1859  if test ! -r "$srcdir/$ac_unique_file"; then
1860    srcdir=..
1861  fi
1862else
1863  ac_srcdir_defaulted=no
1864fi
1865if test ! -r "$srcdir/$ac_unique_file"; then
1866  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868fi
1869ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870ac_abs_confdir=`(
1871	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872	pwd)`
1873# When building in place, set srcdir=.
1874if test "$ac_abs_confdir" = "$ac_pwd"; then
1875  srcdir=.
1876fi
1877# Remove unnecessary trailing slashes from srcdir.
1878# Double slashes in file names in object file debugging info
1879# mess up M-x gdb in Emacs.
1880case $srcdir in
1881*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882esac
1883for ac_var in $ac_precious_vars; do
1884  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_env_${ac_var}_value=\$${ac_var}
1886  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888done
1889
1890#
1891# Report the --help message.
1892#
1893if test "$ac_init_help" = "long"; then
1894  # Omit some internal or obsolete options to make the list less imposing.
1895  # This message is too long to be a string in the A/UX 3.1 sh.
1896  cat <<_ACEOF
1897\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898
1899Usage: $0 [OPTION]... [VAR=VALUE]...
1900
1901To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902VAR=VALUE.  See below for descriptions of some of the useful variables.
1903
1904Defaults for the options are specified in brackets.
1905
1906Configuration:
1907  -h, --help              display this help and exit
1908      --help=short        display options specific to this package
1909      --help=recursive    display the short help of all the included packages
1910  -V, --version           display version information and exit
1911  -q, --quiet, --silent   do not print \`checking ...' messages
1912      --cache-file=FILE   cache test results in FILE [disabled]
1913  -C, --config-cache      alias for \`--cache-file=config.cache'
1914  -n, --no-create         do not create output files
1915      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916
1917Installation directories:
1918  --prefix=PREFIX         install architecture-independent files in PREFIX
1919                          [$ac_default_prefix]
1920  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                          [PREFIX]
1922
1923By default, \`make install' will install all the files in
1924\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926for instance \`--prefix=\$HOME'.
1927
1928For better control, use the options below.
1929
1930Fine tuning of the installation directories:
1931  --bindir=DIR            user executables [EPREFIX/bin]
1932  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933  --libexecdir=DIR        program executables [EPREFIX/libexec]
1934  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937  --libdir=DIR            object code libraries [EPREFIX/lib]
1938  --includedir=DIR        C header files [PREFIX/include]
1939  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942  --infodir=DIR           info documentation [DATAROOTDIR/info]
1943  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944  --mandir=DIR            man documentation [DATAROOTDIR/man]
1945  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946  --htmldir=DIR           html documentation [DOCDIR]
1947  --dvidir=DIR            dvi documentation [DOCDIR]
1948  --pdfdir=DIR            pdf documentation [DOCDIR]
1949  --psdir=DIR             ps documentation [DOCDIR]
1950_ACEOF
1951
1952  cat <<\_ACEOF
1953
1954X features:
1955  --x-includes=DIR    X include files are in DIR
1956  --x-libraries=DIR   X library files are in DIR
1957
1958System types:
1959  --build=BUILD     configure for building on BUILD [guessed]
1960  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961  --target=TARGET   configure for building compilers for TARGET [HOST]
1962_ACEOF
1963fi
1964
1965if test -n "$ac_init_help"; then
1966  case $ac_init_help in
1967     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968   esac
1969  cat <<\_ACEOF
1970
1971Optional Features:
1972  --disable-option-checking  ignore unrecognized --enable/--with options
1973  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975  --enable-openjdk-only   suppress building custom source even if present
1976                          [disabled]
1977  --enable-debug          set the debug level to fastdebug (shorthand for
1978                          --with-debug-level=fastdebug) [disabled]
1979  --disable-headful       disable building headful support (graphical UI
1980                          support) [enabled]
1981  --enable-unlimited-crypto
1982                          Enable unlimited crypto policy [disabled]
1983  --disable-keep-packaged-modules
1984                          Do not keep packaged modules in jdk image [enable]
1985  --enable-static-build   enable static library build [disabled]
1986  --disable-warnings-as-errors
1987                          do not consider native warnings to be an error
1988                          [enabled]
1989  --enable-debug-symbols  Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --enable-zip-debug-info Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-native-coverage
1994                          enable native compilation with code coverage
1995                          data[disabled]
1996  --enable-dtrace[=yes/no/auto]
1997                          enable dtrace. Default is auto, where dtrace is
1998                          enabled if all dependencies are present.
1999  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2000  --disable-freetype-bundling
2001                          disable bundling of the freetype library with the
2002                          build result [enabled on Windows or when using
2003                          --with-freetype, disabled otherwise]
2004  --enable-jtreg-failure-handler
2005                          forces build of the jtreg failure handler to be
2006                          enabled, missing dependencies become fatal errors.
2007                          Default is auto, where the failure handler is built
2008                          if all dependencies are present and otherwise just
2009                          disabled.
2010  --disable-generate-classlist
2011                          forces enabling or disabling of the generation of a
2012                          CDS classlist at build time. Default is to generate
2013                          it when either the server or client JVMs are built.
2014  --enable-sjavac         use sjavac to do fast incremental compiles
2015                          [disabled]
2016  --disable-javac-server  disable javac server [enabled]
2017  --enable-icecc          enable distribted compilation of native code using
2018                          icecc/icecream [disabled]
2019  --disable-precompiled-headers
2020                          disable using precompiled headers when compiling C++
2021                          [enabled]
2022  --enable-ccache         enable using ccache to speed up recompilations
2023                          [disabled]
2024
2025Optional Packages:
2026  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2027  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2028  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2029                          support it), e.g. --with-target-bits=32 [guessed]
2030  --with-custom-make-dir  Deprecated. Option is kept for backwards
2031                          compatibility and is ignored
2032  --with-jdk-variant      JDK variant to build (normal) [normal]
2033  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2034                          optimized) [release]
2035  --with-jvm-variants     JVM variants (separated by commas) to build
2036                          (server,client,minimal,core,zero,zeroshark,custom)
2037                          [server]
2038  --with-devkit           use this devkit for compilers, tools and resources
2039  --with-sys-root         alias for --with-sysroot for backwards compatability
2040  --with-sysroot          use this directory as sysroot
2041  --with-tools-dir        alias for --with-toolchain-path for backwards
2042                          compatibility
2043  --with-toolchain-path   prepend these directories when searching for
2044                          toolchain binaries (compilers etc)
2045  --with-extra-path       prepend these directories to the default path
2046  --with-sdk-name         use the platform SDK of the given name. [macosx]
2047  --with-conf-name        use this as the name of the configuration [generated
2048                          from important configuration options]
2049  --with-output-sync      set make output sync type if supported by make.
2050                          [recurse]
2051  --with-default-make-target
2052                          set the default make target [exploded-image]
2053  --with-cacerts-file     specify alternative cacerts file
2054  --with-copyright-year   Set copyright year value for build [current year]
2055  --with-milestone        Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-update-version   Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-user-release-suffix
2060                          Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-build-number     Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-version-string   Set version string [calculated]
2065  --with-version-pre      Set the base part of the version 'PRE' field
2066                          (pre-release identifier) ['internal']
2067  --with-version-opt      Set version 'OPT' field (build metadata)
2068                          [<timestamp>.<user>.<dirname>]
2069  --with-version-build    Set version 'BUILD' field (build number) [not
2070                          specified]
2071  --with-version-major    Set version 'MAJOR' field (first number) [current
2072                          source value]
2073  --with-version-minor    Set version 'MINOR' field (second number) [current
2074                          source value]
2075  --with-version-security Set version 'SECURITY' field (third number) [current
2076                          source value]
2077  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2078                          specified]
2079  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2080  --with-build-jdk        path to JDK of same version as is being built[the
2081                          newly built JDK]
2082  --with-add-source-root  Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-source-root
2085                          Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-adds-and-overrides
2088                          Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-langtools
2091                          Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-corba   Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-jaxp    Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jaxws   Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-hotspot Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-nashorn Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jdk     Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-import-hotspot   import hotspot binaries from this jdk image or
2106                          hotspot build dist dir instead of building from
2107                          source
2108  --with-import-modules   import a set of prebuilt modules either as a zip
2109                          file or an exploded directory
2110  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2111                          to show possible values [platform dependent]
2112  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2113  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2114  --with-extra-ldflags    extra flags to be used when linking jdk
2115  --with-toolchain-version
2116                          the version of the toolchain to look for, use
2117                          '--help' to show possible values [platform
2118                          dependent]
2119  --with-build-devkit     Devkit to use for the build platform toolchain
2120  --with-jtreg            Regression Test Harness [probed]
2121  --with-native-debug-symbols
2122                          set the native debug symbol configuration (none,
2123                          internal, external, zipped) [varying]
2124  --with-jvm-features     additional JVM features to enable (separated by
2125                          comma), use '--help' to show possible values [none]
2126  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2127                          compatibility and is ignored
2128  --with-stdc++lib=<static>,<dynamic>,<default>
2129                          force linking of the C++ runtime on Linux to either
2130                          static or dynamic, default is static with dynamic as
2131                          fallback
2132  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2133                          (Windows only) [probed]
2134  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2135                          (Windows only) [probed]
2136  --with-x                use the X Window System
2137  --with-cups             specify prefix directory for the cups package
2138                          (expecting the headers under PATH/include)
2139  --with-cups-include     specify directory for the cups include files
2140  --with-freetype         specify prefix directory for the freetype package
2141                          (expecting the libraries under PATH/lib and the
2142                          headers under PATH/include)
2143  --with-freetype-include specify directory for the freetype include files
2144  --with-freetype-lib     specify directory for the freetype library
2145  --with-freetype-src     specify directory with freetype sources to
2146                          automatically build the library (experimental,
2147                          Windows-only)
2148  --with-alsa             specify prefix directory for the alsa package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-alsa-include     specify directory for the alsa include files
2152  --with-alsa-lib         specify directory for the alsa library
2153  --with-libffi           specify prefix directory for the libffi package
2154                          (expecting the libraries under PATH/lib and the
2155                          headers under PATH/include)
2156  --with-libffi-include   specify directory for the libffi include files
2157  --with-libffi-lib       specify directory for the libffi library
2158  --with-libjpeg          use libjpeg from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-giflib           use giflib from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-libpng           use libpng from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-zlib             use zlib from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-lcms             use lcms2 from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-dxsdk            Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-include    Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-num-cores        number of cores in the build system, e.g.
2175                          --with-num-cores=8 [probed]
2176  --with-memory-size      memory (in MB) available in the build system, e.g.
2177                          --with-memory-size=1024 [probed]
2178  --with-jobs             number of parallel jobs to let make run [calculated
2179                          based on cores and memory]
2180  --with-test-jobs        number of parallel tests jobs to run [based on build
2181                          jobs]
2182  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2183                          invocations of boot JDK, overriding the default
2184                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2185                          -enableassertions"
2186  --with-sjavac-server-java
2187                          use this java binary for running the sjavac
2188                          background server [Boot JDK java]
2189  --with-ccache-dir       where to store ccache files [~/.ccache]
2190
2191Some influential environment variables:
2192  BASENAME    Override default value for BASENAME
2193  BASH        Override default value for BASH
2194  CAT         Override default value for CAT
2195  CHMOD       Override default value for CHMOD
2196  CMP         Override default value for CMP
2197  COMM        Override default value for COMM
2198  CP          Override default value for CP
2199  CUT         Override default value for CUT
2200  DATE        Override default value for DATE
2201  DIFF        Override default value for DIFF
2202  DIRNAME     Override default value for DIRNAME
2203  ECHO        Override default value for ECHO
2204  EXPR        Override default value for EXPR
2205  FILE        Override default value for FILE
2206  FIND        Override default value for FIND
2207  HEAD        Override default value for HEAD
2208  GUNZIP      Override default value for GUNZIP
2209  GZIP        Override default value for GZIP
2210  LN          Override default value for LN
2211  LS          Override default value for LS
2212  MKDIR       Override default value for MKDIR
2213  MKTEMP      Override default value for MKTEMP
2214  MV          Override default value for MV
2215  NAWK        Override default value for NAWK
2216  PRINTF      Override default value for PRINTF
2217  RM          Override default value for RM
2218  RMDIR       Override default value for RMDIR
2219  SH          Override default value for SH
2220  SORT        Override default value for SORT
2221  TAIL        Override default value for TAIL
2222  TAR         Override default value for TAR
2223  TEE         Override default value for TEE
2224  TOUCH       Override default value for TOUCH
2225  TR          Override default value for TR
2226  UNAME       Override default value for UNAME
2227  UNIQ        Override default value for UNIQ
2228  WC          Override default value for WC
2229  WHICH       Override default value for WHICH
2230  XARGS       Override default value for XARGS
2231  AWK         Override default value for AWK
2232  GREP        Override default value for GREP
2233  EGREP       Override default value for EGREP
2234  FGREP       Override default value for FGREP
2235  SED         Override default value for SED
2236  CYGPATH     Override default value for CYGPATH
2237  READLINK    Override default value for READLINK
2238  DF          Override default value for DF
2239  CPIO        Override default value for CPIO
2240  NICE        Override default value for NICE
2241  MAKE        Override default value for MAKE
2242  UNZIP       Override default value for UNZIP
2243  ZIP         Override default value for ZIP
2244  LDD         Override default value for LDD
2245  OTOOL       Override default value for OTOOL
2246  READELF     Override default value for READELF
2247  HG          Override default value for HG
2248  STAT        Override default value for STAT
2249  TIME        Override default value for TIME
2250  DTRACE      Override default value for DTRACE
2251  PATCH       Override default value for PATCH
2252  DSYMUTIL    Override default value for DSYMUTIL
2253  XATTR       Override default value for XATTR
2254  CODESIGN    Override default value for CODESIGN
2255  SETFILE     Override default value for SETFILE
2256  PKG_CONFIG  path to pkg-config utility
2257  JAVA        Override default value for JAVA
2258  JAVAC       Override default value for JAVAC
2259  JAVAH       Override default value for JAVAH
2260  JAR         Override default value for JAR
2261  JARSIGNER   Override default value for JARSIGNER
2262  CC          C compiler command
2263  CFLAGS      C compiler flags
2264  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2265              nonstandard directory <lib dir>
2266  LIBS        libraries to pass to the linker, e.g. -l<library>
2267  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2268              you have headers in a nonstandard directory <include dir>
2269  CXX         C++ compiler command
2270  CXXFLAGS    C++ compiler flags
2271  CPP         C preprocessor
2272  CXXCPP      C++ preprocessor
2273  AS          Override default value for AS
2274  AR          Override default value for AR
2275  LIPO        Override default value for LIPO
2276  STRIP       Override default value for STRIP
2277  NM          Override default value for NM
2278  GNM         Override default value for GNM
2279  OBJCOPY     Override default value for OBJCOPY
2280  OBJDUMP     Override default value for OBJDUMP
2281  BUILD_CC    Override default value for BUILD_CC
2282  BUILD_CXX   Override default value for BUILD_CXX
2283  BUILD_NM    Override default value for BUILD_NM
2284  BUILD_AR    Override default value for BUILD_AR
2285  BUILD_OBJCOPY
2286              Override default value for BUILD_OBJCOPY
2287  BUILD_STRIP Override default value for BUILD_STRIP
2288  JTREGEXE    Override default value for JTREGEXE
2289  XMKMF       Path to xmkmf, Makefile generator for X Window System
2290  FREETYPE_CFLAGS
2291              C compiler flags for FREETYPE, overriding pkg-config
2292  FREETYPE_LIBS
2293              linker flags for FREETYPE, overriding pkg-config
2294  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2295  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2296  LIBFFI_CFLAGS
2297              C compiler flags for LIBFFI, overriding pkg-config
2298  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2299  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2300  PNG_LIBS    linker flags for PNG, overriding pkg-config
2301  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2302  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2303  ICECC_CMD   Override default value for ICECC_CMD
2304  ICECC_CREATE_ENV
2305              Override default value for ICECC_CREATE_ENV
2306  ICECC_WRAPPER
2307              Override default value for ICECC_WRAPPER
2308  CCACHE      Override default value for CCACHE
2309
2310Use these variables to override the choices made by `configure' or to help
2311it to find libraries and programs with nonstandard names/locations.
2312
2313Report bugs to <build-dev@openjdk.java.net>.
2314OpenJDK home page: <http://openjdk.java.net>.
2315_ACEOF
2316ac_status=$?
2317fi
2318
2319if test "$ac_init_help" = "recursive"; then
2320  # If there are subdirs, report their specific --help.
2321  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2322    test -d "$ac_dir" ||
2323      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2324      continue
2325    ac_builddir=.
2326
2327case "$ac_dir" in
2328.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2329*)
2330  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2331  # A ".." for each directory in $ac_dir_suffix.
2332  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2333  case $ac_top_builddir_sub in
2334  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2335  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2336  esac ;;
2337esac
2338ac_abs_top_builddir=$ac_pwd
2339ac_abs_builddir=$ac_pwd$ac_dir_suffix
2340# for backward compatibility:
2341ac_top_builddir=$ac_top_build_prefix
2342
2343case $srcdir in
2344  .)  # We are building in place.
2345    ac_srcdir=.
2346    ac_top_srcdir=$ac_top_builddir_sub
2347    ac_abs_top_srcdir=$ac_pwd ;;
2348  [\\/]* | ?:[\\/]* )  # Absolute name.
2349    ac_srcdir=$srcdir$ac_dir_suffix;
2350    ac_top_srcdir=$srcdir
2351    ac_abs_top_srcdir=$srcdir ;;
2352  *) # Relative name.
2353    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2354    ac_top_srcdir=$ac_top_build_prefix$srcdir
2355    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2356esac
2357ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2358
2359    cd "$ac_dir" || { ac_status=$?; continue; }
2360    # Check for guested configure.
2361    if test -f "$ac_srcdir/configure.gnu"; then
2362      echo &&
2363      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2364    elif test -f "$ac_srcdir/configure"; then
2365      echo &&
2366      $SHELL "$ac_srcdir/configure" --help=recursive
2367    else
2368      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2369    fi || ac_status=$?
2370    cd "$ac_pwd" || { ac_status=$?; break; }
2371  done
2372fi
2373
2374test -n "$ac_init_help" && exit $ac_status
2375if $ac_init_version; then
2376  cat <<\_ACEOF
2377OpenJDK configure jdk9
2378generated by GNU Autoconf 2.69
2379
2380Copyright (C) 2012 Free Software Foundation, Inc.
2381This configure script is free software; the Free Software Foundation
2382gives unlimited permission to copy, distribute and modify it.
2383_ACEOF
2384  exit
2385fi
2386
2387## ------------------------ ##
2388## Autoconf initialization. ##
2389## ------------------------ ##
2390
2391# ac_fn_c_try_compile LINENO
2392# --------------------------
2393# Try to compile conftest.$ac_ext, and return whether this succeeded.
2394ac_fn_c_try_compile ()
2395{
2396  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397  rm -f conftest.$ac_objext
2398  if { { ac_try="$ac_compile"
2399case "(($ac_try" in
2400  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2401  *) ac_try_echo=$ac_try;;
2402esac
2403eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2404$as_echo "$ac_try_echo"; } >&5
2405  (eval "$ac_compile") 2>conftest.err
2406  ac_status=$?
2407  if test -s conftest.err; then
2408    grep -v '^ *+' conftest.err >conftest.er1
2409    cat conftest.er1 >&5
2410    mv -f conftest.er1 conftest.err
2411  fi
2412  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2413  test $ac_status = 0; } && {
2414	 test -z "$ac_c_werror_flag" ||
2415	 test ! -s conftest.err
2416       } && test -s conftest.$ac_objext; then :
2417  ac_retval=0
2418else
2419  $as_echo "$as_me: failed program was:" >&5
2420sed 's/^/| /' conftest.$ac_ext >&5
2421
2422	ac_retval=1
2423fi
2424  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2425  as_fn_set_status $ac_retval
2426
2427} # ac_fn_c_try_compile
2428
2429# ac_fn_cxx_try_compile LINENO
2430# ----------------------------
2431# Try to compile conftest.$ac_ext, and return whether this succeeded.
2432ac_fn_cxx_try_compile ()
2433{
2434  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435  rm -f conftest.$ac_objext
2436  if { { ac_try="$ac_compile"
2437case "(($ac_try" in
2438  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2439  *) ac_try_echo=$ac_try;;
2440esac
2441eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2442$as_echo "$ac_try_echo"; } >&5
2443  (eval "$ac_compile") 2>conftest.err
2444  ac_status=$?
2445  if test -s conftest.err; then
2446    grep -v '^ *+' conftest.err >conftest.er1
2447    cat conftest.er1 >&5
2448    mv -f conftest.er1 conftest.err
2449  fi
2450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2451  test $ac_status = 0; } && {
2452	 test -z "$ac_cxx_werror_flag" ||
2453	 test ! -s conftest.err
2454       } && test -s conftest.$ac_objext; then :
2455  ac_retval=0
2456else
2457  $as_echo "$as_me: failed program was:" >&5
2458sed 's/^/| /' conftest.$ac_ext >&5
2459
2460	ac_retval=1
2461fi
2462  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463  as_fn_set_status $ac_retval
2464
2465} # ac_fn_cxx_try_compile
2466
2467# ac_fn_c_try_cpp LINENO
2468# ----------------------
2469# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2470ac_fn_c_try_cpp ()
2471{
2472  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473  if { { ac_try="$ac_cpp conftest.$ac_ext"
2474case "(($ac_try" in
2475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2476  *) ac_try_echo=$ac_try;;
2477esac
2478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2479$as_echo "$ac_try_echo"; } >&5
2480  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2481  ac_status=$?
2482  if test -s conftest.err; then
2483    grep -v '^ *+' conftest.err >conftest.er1
2484    cat conftest.er1 >&5
2485    mv -f conftest.er1 conftest.err
2486  fi
2487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2488  test $ac_status = 0; } > conftest.i && {
2489	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2490	 test ! -s conftest.err
2491       }; then :
2492  ac_retval=0
2493else
2494  $as_echo "$as_me: failed program was:" >&5
2495sed 's/^/| /' conftest.$ac_ext >&5
2496
2497    ac_retval=1
2498fi
2499  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500  as_fn_set_status $ac_retval
2501
2502} # ac_fn_c_try_cpp
2503
2504# ac_fn_cxx_try_cpp LINENO
2505# ------------------------
2506# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2507ac_fn_cxx_try_cpp ()
2508{
2509  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2510  if { { ac_try="$ac_cpp conftest.$ac_ext"
2511case "(($ac_try" in
2512  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2513  *) ac_try_echo=$ac_try;;
2514esac
2515eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2516$as_echo "$ac_try_echo"; } >&5
2517  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2518  ac_status=$?
2519  if test -s conftest.err; then
2520    grep -v '^ *+' conftest.err >conftest.er1
2521    cat conftest.er1 >&5
2522    mv -f conftest.er1 conftest.err
2523  fi
2524  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2525  test $ac_status = 0; } > conftest.i && {
2526	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2527	 test ! -s conftest.err
2528       }; then :
2529  ac_retval=0
2530else
2531  $as_echo "$as_me: failed program was:" >&5
2532sed 's/^/| /' conftest.$ac_ext >&5
2533
2534    ac_retval=1
2535fi
2536  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2537  as_fn_set_status $ac_retval
2538
2539} # ac_fn_cxx_try_cpp
2540
2541# ac_fn_c_try_link LINENO
2542# -----------------------
2543# Try to link conftest.$ac_ext, and return whether this succeeded.
2544ac_fn_c_try_link ()
2545{
2546  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2547  rm -f conftest.$ac_objext conftest$ac_exeext
2548  if { { ac_try="$ac_link"
2549case "(($ac_try" in
2550  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2551  *) ac_try_echo=$ac_try;;
2552esac
2553eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2554$as_echo "$ac_try_echo"; } >&5
2555  (eval "$ac_link") 2>conftest.err
2556  ac_status=$?
2557  if test -s conftest.err; then
2558    grep -v '^ *+' conftest.err >conftest.er1
2559    cat conftest.er1 >&5
2560    mv -f conftest.er1 conftest.err
2561  fi
2562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2563  test $ac_status = 0; } && {
2564	 test -z "$ac_c_werror_flag" ||
2565	 test ! -s conftest.err
2566       } && test -s conftest$ac_exeext && {
2567	 test "$cross_compiling" = yes ||
2568	 test -x conftest$ac_exeext
2569       }; then :
2570  ac_retval=0
2571else
2572  $as_echo "$as_me: failed program was:" >&5
2573sed 's/^/| /' conftest.$ac_ext >&5
2574
2575	ac_retval=1
2576fi
2577  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2578  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2579  # interfere with the next link command; also delete a directory that is
2580  # left behind by Apple's compiler.  We do this before executing the actions.
2581  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2582  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2583  as_fn_set_status $ac_retval
2584
2585} # ac_fn_c_try_link
2586
2587# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2588# ---------------------------------------------------------
2589# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2590# the include files in INCLUDES and setting the cache variable VAR
2591# accordingly.
2592ac_fn_cxx_check_header_mongrel ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  if eval \${$3+:} false; then :
2596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2597$as_echo_n "checking for $2... " >&6; }
2598if eval \${$3+:} false; then :
2599  $as_echo_n "(cached) " >&6
2600fi
2601eval ac_res=\$$3
2602	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2603$as_echo "$ac_res" >&6; }
2604else
2605  # Is the header compilable?
2606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2607$as_echo_n "checking $2 usability... " >&6; }
2608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609/* end confdefs.h.  */
2610$4
2611#include <$2>
2612_ACEOF
2613if ac_fn_cxx_try_compile "$LINENO"; then :
2614  ac_header_compiler=yes
2615else
2616  ac_header_compiler=no
2617fi
2618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2620$as_echo "$ac_header_compiler" >&6; }
2621
2622# Is the header present?
2623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2624$as_echo_n "checking $2 presence... " >&6; }
2625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2626/* end confdefs.h.  */
2627#include <$2>
2628_ACEOF
2629if ac_fn_cxx_try_cpp "$LINENO"; then :
2630  ac_header_preproc=yes
2631else
2632  ac_header_preproc=no
2633fi
2634rm -f conftest.err conftest.i conftest.$ac_ext
2635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2636$as_echo "$ac_header_preproc" >&6; }
2637
2638# So?  What about this header?
2639case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2640  yes:no: )
2641    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2642$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2644$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2645    ;;
2646  no:yes:* )
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2648$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2650$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2652$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2654$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2656$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2657( $as_echo "## ----------------------------------------- ##
2658## Report this to build-dev@openjdk.java.net ##
2659## ----------------------------------------- ##"
2660     ) | sed "s/^/$as_me: WARNING:     /" >&2
2661    ;;
2662esac
2663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2664$as_echo_n "checking for $2... " >&6; }
2665if eval \${$3+:} false; then :
2666  $as_echo_n "(cached) " >&6
2667else
2668  eval "$3=\$ac_header_compiler"
2669fi
2670eval ac_res=\$$3
2671	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2672$as_echo "$ac_res" >&6; }
2673fi
2674  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2675
2676} # ac_fn_cxx_check_header_mongrel
2677
2678# ac_fn_cxx_try_run LINENO
2679# ------------------------
2680# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2681# that executables *can* be run.
2682ac_fn_cxx_try_run ()
2683{
2684  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2685  if { { ac_try="$ac_link"
2686case "(($ac_try" in
2687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688  *) ac_try_echo=$ac_try;;
2689esac
2690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2691$as_echo "$ac_try_echo"; } >&5
2692  (eval "$ac_link") 2>&5
2693  ac_status=$?
2694  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2695  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2696  { { case "(($ac_try" in
2697  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698  *) ac_try_echo=$ac_try;;
2699esac
2700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2701$as_echo "$ac_try_echo"; } >&5
2702  (eval "$ac_try") 2>&5
2703  ac_status=$?
2704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2705  test $ac_status = 0; }; }; then :
2706  ac_retval=0
2707else
2708  $as_echo "$as_me: program exited with status $ac_status" >&5
2709       $as_echo "$as_me: failed program was:" >&5
2710sed 's/^/| /' conftest.$ac_ext >&5
2711
2712       ac_retval=$ac_status
2713fi
2714  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2715  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2716  as_fn_set_status $ac_retval
2717
2718} # ac_fn_cxx_try_run
2719
2720# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2721# ---------------------------------------------------------
2722# Tests whether HEADER exists and can be compiled using the include files in
2723# INCLUDES, setting the cache variable VAR accordingly.
2724ac_fn_cxx_check_header_compile ()
2725{
2726  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2728$as_echo_n "checking for $2... " >&6; }
2729if eval \${$3+:} false; then :
2730  $as_echo_n "(cached) " >&6
2731else
2732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2733/* end confdefs.h.  */
2734$4
2735#include <$2>
2736_ACEOF
2737if ac_fn_cxx_try_compile "$LINENO"; then :
2738  eval "$3=yes"
2739else
2740  eval "$3=no"
2741fi
2742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2743fi
2744eval ac_res=\$$3
2745	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2746$as_echo "$ac_res" >&6; }
2747  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2748
2749} # ac_fn_cxx_check_header_compile
2750
2751# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2752# ----------------------------------------------
2753# Tries to find the compile-time value of EXPR in a program that includes
2754# INCLUDES, setting VAR accordingly. Returns whether the value could be
2755# computed
2756ac_fn_cxx_compute_int ()
2757{
2758  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2759  if test "$cross_compiling" = yes; then
2760    # Depending upon the size, compute the lo and hi bounds.
2761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762/* end confdefs.h.  */
2763$4
2764int
2765main ()
2766{
2767static int test_array [1 - 2 * !(($2) >= 0)];
2768test_array [0] = 0;
2769return test_array [0];
2770
2771  ;
2772  return 0;
2773}
2774_ACEOF
2775if ac_fn_cxx_try_compile "$LINENO"; then :
2776  ac_lo=0 ac_mid=0
2777  while :; do
2778    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2779/* end confdefs.h.  */
2780$4
2781int
2782main ()
2783{
2784static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2785test_array [0] = 0;
2786return test_array [0];
2787
2788  ;
2789  return 0;
2790}
2791_ACEOF
2792if ac_fn_cxx_try_compile "$LINENO"; then :
2793  ac_hi=$ac_mid; break
2794else
2795  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2796			if test $ac_lo -le $ac_mid; then
2797			  ac_lo= ac_hi=
2798			  break
2799			fi
2800			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2801fi
2802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2803  done
2804else
2805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806/* end confdefs.h.  */
2807$4
2808int
2809main ()
2810{
2811static int test_array [1 - 2 * !(($2) < 0)];
2812test_array [0] = 0;
2813return test_array [0];
2814
2815  ;
2816  return 0;
2817}
2818_ACEOF
2819if ac_fn_cxx_try_compile "$LINENO"; then :
2820  ac_hi=-1 ac_mid=-1
2821  while :; do
2822    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2823/* end confdefs.h.  */
2824$4
2825int
2826main ()
2827{
2828static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2829test_array [0] = 0;
2830return test_array [0];
2831
2832  ;
2833  return 0;
2834}
2835_ACEOF
2836if ac_fn_cxx_try_compile "$LINENO"; then :
2837  ac_lo=$ac_mid; break
2838else
2839  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2840			if test $ac_mid -le $ac_hi; then
2841			  ac_lo= ac_hi=
2842			  break
2843			fi
2844			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847  done
2848else
2849  ac_lo= ac_hi=
2850fi
2851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2852fi
2853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854# Binary search between lo and hi bounds.
2855while test "x$ac_lo" != "x$ac_hi"; do
2856  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h.  */
2859$4
2860int
2861main ()
2862{
2863static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2864test_array [0] = 0;
2865return test_array [0];
2866
2867  ;
2868  return 0;
2869}
2870_ACEOF
2871if ac_fn_cxx_try_compile "$LINENO"; then :
2872  ac_hi=$ac_mid
2873else
2874  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2875fi
2876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877done
2878case $ac_lo in #((
2879?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2880'') ac_retval=1 ;;
2881esac
2882  else
2883    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2884/* end confdefs.h.  */
2885$4
2886static long int longval () { return $2; }
2887static unsigned long int ulongval () { return $2; }
2888#include <stdio.h>
2889#include <stdlib.h>
2890int
2891main ()
2892{
2893
2894  FILE *f = fopen ("conftest.val", "w");
2895  if (! f)
2896    return 1;
2897  if (($2) < 0)
2898    {
2899      long int i = longval ();
2900      if (i != ($2))
2901	return 1;
2902      fprintf (f, "%ld", i);
2903    }
2904  else
2905    {
2906      unsigned long int i = ulongval ();
2907      if (i != ($2))
2908	return 1;
2909      fprintf (f, "%lu", i);
2910    }
2911  /* Do not output a trailing newline, as this causes \r\n confusion
2912     on some platforms.  */
2913  return ferror (f) || fclose (f) != 0;
2914
2915  ;
2916  return 0;
2917}
2918_ACEOF
2919if ac_fn_cxx_try_run "$LINENO"; then :
2920  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2921else
2922  ac_retval=1
2923fi
2924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2925  conftest.$ac_objext conftest.beam conftest.$ac_ext
2926rm -f conftest.val
2927
2928  fi
2929  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2930  as_fn_set_status $ac_retval
2931
2932} # ac_fn_cxx_compute_int
2933
2934# ac_fn_cxx_try_link LINENO
2935# -------------------------
2936# Try to link conftest.$ac_ext, and return whether this succeeded.
2937ac_fn_cxx_try_link ()
2938{
2939  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2940  rm -f conftest.$ac_objext conftest$ac_exeext
2941  if { { ac_try="$ac_link"
2942case "(($ac_try" in
2943  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944  *) ac_try_echo=$ac_try;;
2945esac
2946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2947$as_echo "$ac_try_echo"; } >&5
2948  (eval "$ac_link") 2>conftest.err
2949  ac_status=$?
2950  if test -s conftest.err; then
2951    grep -v '^ *+' conftest.err >conftest.er1
2952    cat conftest.er1 >&5
2953    mv -f conftest.er1 conftest.err
2954  fi
2955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2956  test $ac_status = 0; } && {
2957	 test -z "$ac_cxx_werror_flag" ||
2958	 test ! -s conftest.err
2959       } && test -s conftest$ac_exeext && {
2960	 test "$cross_compiling" = yes ||
2961	 test -x conftest$ac_exeext
2962       }; then :
2963  ac_retval=0
2964else
2965  $as_echo "$as_me: failed program was:" >&5
2966sed 's/^/| /' conftest.$ac_ext >&5
2967
2968	ac_retval=1
2969fi
2970  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2971  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2972  # interfere with the next link command; also delete a directory that is
2973  # left behind by Apple's compiler.  We do this before executing the actions.
2974  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2975  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2976  as_fn_set_status $ac_retval
2977
2978} # ac_fn_cxx_try_link
2979
2980# ac_fn_cxx_check_func LINENO FUNC VAR
2981# ------------------------------------
2982# Tests whether FUNC exists, setting the cache variable VAR accordingly
2983ac_fn_cxx_check_func ()
2984{
2985  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2987$as_echo_n "checking for $2... " >&6; }
2988if eval \${$3+:} false; then :
2989  $as_echo_n "(cached) " >&6
2990else
2991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2992/* end confdefs.h.  */
2993/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2994   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2995#define $2 innocuous_$2
2996
2997/* System header to define __stub macros and hopefully few prototypes,
2998    which can conflict with char $2 (); below.
2999    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3000    <limits.h> exists even on freestanding compilers.  */
3001
3002#ifdef __STDC__
3003# include <limits.h>
3004#else
3005# include <assert.h>
3006#endif
3007
3008#undef $2
3009
3010/* Override any GCC internal prototype to avoid an error.
3011   Use char because int might match the return type of a GCC
3012   builtin and then its argument prototype would still apply.  */
3013#ifdef __cplusplus
3014extern "C"
3015#endif
3016char $2 ();
3017/* The GNU C library defines this for functions which it implements
3018    to always fail with ENOSYS.  Some functions are actually named
3019    something starting with __ and the normal name is an alias.  */
3020#if defined __stub_$2 || defined __stub___$2
3021choke me
3022#endif
3023
3024int
3025main ()
3026{
3027return $2 ();
3028  ;
3029  return 0;
3030}
3031_ACEOF
3032if ac_fn_cxx_try_link "$LINENO"; then :
3033  eval "$3=yes"
3034else
3035  eval "$3=no"
3036fi
3037rm -f core conftest.err conftest.$ac_objext \
3038    conftest$ac_exeext conftest.$ac_ext
3039fi
3040eval ac_res=\$$3
3041	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3042$as_echo "$ac_res" >&6; }
3043  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3044
3045} # ac_fn_cxx_check_func
3046
3047# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3048# -------------------------------------------------------
3049# Tests whether HEADER exists and can be compiled using the include files in
3050# INCLUDES, setting the cache variable VAR accordingly.
3051ac_fn_c_check_header_compile ()
3052{
3053  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3055$as_echo_n "checking for $2... " >&6; }
3056if eval \${$3+:} false; then :
3057  $as_echo_n "(cached) " >&6
3058else
3059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3060/* end confdefs.h.  */
3061$4
3062#include <$2>
3063_ACEOF
3064if ac_fn_c_try_compile "$LINENO"; then :
3065  eval "$3=yes"
3066else
3067  eval "$3=no"
3068fi
3069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3070fi
3071eval ac_res=\$$3
3072	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3073$as_echo "$ac_res" >&6; }
3074  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3075
3076} # ac_fn_c_check_header_compile
3077cat >config.log <<_ACEOF
3078This file contains any messages produced by compilers while
3079running configure, to aid debugging if configure makes a mistake.
3080
3081It was created by OpenJDK $as_me jdk9, which was
3082generated by GNU Autoconf 2.69.  Invocation command line was
3083
3084  $ $0 $@
3085
3086_ACEOF
3087exec 5>>config.log
3088{
3089cat <<_ASUNAME
3090## --------- ##
3091## Platform. ##
3092## --------- ##
3093
3094hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3095uname -m = `(uname -m) 2>/dev/null || echo unknown`
3096uname -r = `(uname -r) 2>/dev/null || echo unknown`
3097uname -s = `(uname -s) 2>/dev/null || echo unknown`
3098uname -v = `(uname -v) 2>/dev/null || echo unknown`
3099
3100/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3101/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3102
3103/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3104/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3105/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3106/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3107/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3108/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3109/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3110
3111_ASUNAME
3112
3113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3114for as_dir in $PATH
3115do
3116  IFS=$as_save_IFS
3117  test -z "$as_dir" && as_dir=.
3118    $as_echo "PATH: $as_dir"
3119  done
3120IFS=$as_save_IFS
3121
3122} >&5
3123
3124cat >&5 <<_ACEOF
3125
3126
3127## ----------- ##
3128## Core tests. ##
3129## ----------- ##
3130
3131_ACEOF
3132
3133
3134# Keep a trace of the command line.
3135# Strip out --no-create and --no-recursion so they do not pile up.
3136# Strip out --silent because we don't want to record it for future runs.
3137# Also quote any args containing shell meta-characters.
3138# Make two passes to allow for proper duplicate-argument suppression.
3139ac_configure_args=
3140ac_configure_args0=
3141ac_configure_args1=
3142ac_must_keep_next=false
3143for ac_pass in 1 2
3144do
3145  for ac_arg
3146  do
3147    case $ac_arg in
3148    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3149    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3150    | -silent | --silent | --silen | --sile | --sil)
3151      continue ;;
3152    *\'*)
3153      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3154    esac
3155    case $ac_pass in
3156    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3157    2)
3158      as_fn_append ac_configure_args1 " '$ac_arg'"
3159      if test $ac_must_keep_next = true; then
3160	ac_must_keep_next=false # Got value, back to normal.
3161      else
3162	case $ac_arg in
3163	  *=* | --config-cache | -C | -disable-* | --disable-* \
3164	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3165	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3166	  | -with-* | --with-* | -without-* | --without-* | --x)
3167	    case "$ac_configure_args0 " in
3168	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3169	    esac
3170	    ;;
3171	  -* ) ac_must_keep_next=true ;;
3172	esac
3173      fi
3174      as_fn_append ac_configure_args " '$ac_arg'"
3175      ;;
3176    esac
3177  done
3178done
3179{ ac_configure_args0=; unset ac_configure_args0;}
3180{ ac_configure_args1=; unset ac_configure_args1;}
3181
3182# When interrupted or exit'd, cleanup temporary files, and complete
3183# config.log.  We remove comments because anyway the quotes in there
3184# would cause problems or look ugly.
3185# WARNING: Use '\'' to represent an apostrophe within the trap.
3186# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3187trap 'exit_status=$?
3188  # Save into config.log some information that might help in debugging.
3189  {
3190    echo
3191
3192    $as_echo "## ---------------- ##
3193## Cache variables. ##
3194## ---------------- ##"
3195    echo
3196    # The following way of writing the cache mishandles newlines in values,
3197(
3198  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3199    eval ac_val=\$$ac_var
3200    case $ac_val in #(
3201    *${as_nl}*)
3202      case $ac_var in #(
3203      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3204$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3205      esac
3206      case $ac_var in #(
3207      _ | IFS | as_nl) ;; #(
3208      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3209      *) { eval $ac_var=; unset $ac_var;} ;;
3210      esac ;;
3211    esac
3212  done
3213  (set) 2>&1 |
3214    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3215    *${as_nl}ac_space=\ *)
3216      sed -n \
3217	"s/'\''/'\''\\\\'\'''\''/g;
3218	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3219      ;; #(
3220    *)
3221      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3222      ;;
3223    esac |
3224    sort
3225)
3226    echo
3227
3228    $as_echo "## ----------------- ##
3229## Output variables. ##
3230## ----------------- ##"
3231    echo
3232    for ac_var in $ac_subst_vars
3233    do
3234      eval ac_val=\$$ac_var
3235      case $ac_val in
3236      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3237      esac
3238      $as_echo "$ac_var='\''$ac_val'\''"
3239    done | sort
3240    echo
3241
3242    if test -n "$ac_subst_files"; then
3243      $as_echo "## ------------------- ##
3244## File substitutions. ##
3245## ------------------- ##"
3246      echo
3247      for ac_var in $ac_subst_files
3248      do
3249	eval ac_val=\$$ac_var
3250	case $ac_val in
3251	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3252	esac
3253	$as_echo "$ac_var='\''$ac_val'\''"
3254      done | sort
3255      echo
3256    fi
3257
3258    if test -s confdefs.h; then
3259      $as_echo "## ----------- ##
3260## confdefs.h. ##
3261## ----------- ##"
3262      echo
3263      cat confdefs.h
3264      echo
3265    fi
3266    test "$ac_signal" != 0 &&
3267      $as_echo "$as_me: caught signal $ac_signal"
3268    $as_echo "$as_me: exit $exit_status"
3269  } >&5
3270  rm -f core *.core core.conftest.* &&
3271    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3272    exit $exit_status
3273' 0
3274for ac_signal in 1 2 13 15; do
3275  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3276done
3277ac_signal=0
3278
3279# confdefs.h avoids OS command line length limits that DEFS can exceed.
3280rm -f -r conftest* confdefs.h
3281
3282$as_echo "/* confdefs.h */" > confdefs.h
3283
3284# Predefined preprocessor variables.
3285
3286cat >>confdefs.h <<_ACEOF
3287#define PACKAGE_NAME "$PACKAGE_NAME"
3288_ACEOF
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_VERSION "$PACKAGE_VERSION"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_STRING "$PACKAGE_STRING"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3304_ACEOF
3305
3306cat >>confdefs.h <<_ACEOF
3307#define PACKAGE_URL "$PACKAGE_URL"
3308_ACEOF
3309
3310
3311# Let the site file select an alternate cache file if it wants to.
3312# Prefer an explicitly selected file to automatically selected ones.
3313ac_site_file1=NONE
3314ac_site_file2=NONE
3315if test -n "$CONFIG_SITE"; then
3316  # We do not want a PATH search for config.site.
3317  case $CONFIG_SITE in #((
3318    -*)  ac_site_file1=./$CONFIG_SITE;;
3319    */*) ac_site_file1=$CONFIG_SITE;;
3320    *)   ac_site_file1=./$CONFIG_SITE;;
3321  esac
3322elif test "x$prefix" != xNONE; then
3323  ac_site_file1=$prefix/share/config.site
3324  ac_site_file2=$prefix/etc/config.site
3325else
3326  ac_site_file1=$ac_default_prefix/share/config.site
3327  ac_site_file2=$ac_default_prefix/etc/config.site
3328fi
3329for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3330do
3331  test "x$ac_site_file" = xNONE && continue
3332  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3333    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3334$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3335    sed 's/^/| /' "$ac_site_file" >&5
3336    . "$ac_site_file" \
3337      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3339as_fn_error $? "failed to load site script $ac_site_file
3340See \`config.log' for more details" "$LINENO" 5; }
3341  fi
3342done
3343
3344if test -r "$cache_file"; then
3345  # Some versions of bash will fail to source /dev/null (special files
3346  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3347  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3348    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3349$as_echo "$as_me: loading cache $cache_file" >&6;}
3350    case $cache_file in
3351      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3352      *)                      . "./$cache_file";;
3353    esac
3354  fi
3355else
3356  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3357$as_echo "$as_me: creating cache $cache_file" >&6;}
3358  >$cache_file
3359fi
3360
3361# Check that the precious variables saved in the cache have kept the same
3362# value.
3363ac_cache_corrupted=false
3364for ac_var in $ac_precious_vars; do
3365  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3366  eval ac_new_set=\$ac_env_${ac_var}_set
3367  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3368  eval ac_new_val=\$ac_env_${ac_var}_value
3369  case $ac_old_set,$ac_new_set in
3370    set,)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,set)
3375      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3376$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3377      ac_cache_corrupted=: ;;
3378    ,);;
3379    *)
3380      if test "x$ac_old_val" != "x$ac_new_val"; then
3381	# differences in whitespace do not lead to failure.
3382	ac_old_val_w=`echo x $ac_old_val`
3383	ac_new_val_w=`echo x $ac_new_val`
3384	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3386$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3387	  ac_cache_corrupted=:
3388	else
3389	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3390$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3391	  eval $ac_var=\$ac_old_val
3392	fi
3393	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3394$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3395	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3396$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3397      fi;;
3398  esac
3399  # Pass precious variables to config.status.
3400  if test "$ac_new_set" = set; then
3401    case $ac_new_val in
3402    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3403    *) ac_arg=$ac_var=$ac_new_val ;;
3404    esac
3405    case " $ac_configure_args " in
3406      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3407      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3408    esac
3409  fi
3410done
3411if $ac_cache_corrupted; then
3412  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3415$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3416  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3417fi
3418## -------------------- ##
3419## Main body of script. ##
3420## -------------------- ##
3421
3422ac_ext=c
3423ac_cpp='$CPP $CPPFLAGS'
3424ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3425ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3426ac_compiler_gnu=$ac_cv_c_compiler_gnu
3427
3428
3429
3430ac_aux_dir=
3431for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3432  if test -f "$ac_dir/install-sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install-sh -c"
3435    break
3436  elif test -f "$ac_dir/install.sh"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/install.sh -c"
3439    break
3440  elif test -f "$ac_dir/shtool"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/shtool install -c"
3443    break
3444  fi
3445done
3446if test -z "$ac_aux_dir"; then
3447  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
3448fi
3449
3450# These three variables are undocumented and unsupported,
3451# and are intended to be withdrawn in a future Autoconf release.
3452# They can cause serious problems if a builder's source tree is in a directory
3453# whose full name contains unusual characters.
3454ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3455ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3456ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3457
3458
3459# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3460
3461#
3462# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3463# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3464#
3465# This code is free software; you can redistribute it and/or modify it
3466# under the terms of the GNU General Public License version 2 only, as
3467# published by the Free Software Foundation.  Oracle designates this
3468# particular file as subject to the "Classpath" exception as provided
3469# by Oracle in the LICENSE file that accompanied this code.
3470#
3471# This code is distributed in the hope that it will be useful, but WITHOUT
3472# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3473# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3474# version 2 for more details (a copy is included in the LICENSE file that
3475# accompanied this code).
3476#
3477# You should have received a copy of the GNU General Public License version
3478# 2 along with this work; if not, write to the Free Software Foundation,
3479# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3480#
3481# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3482# or visit www.oracle.com if you need additional information or have any
3483# questions.
3484#
3485
3486#
3487# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3488#
3489# This program is free software; you can redistribute it and/or modify
3490# it under the terms of the GNU General Public License as published by
3491# the Free Software Foundation; either version 2 of the License, or
3492# (at your option) any later version.
3493#
3494# This program is distributed in the hope that it will be useful, but
3495# WITHOUT ANY WARRANTY; without even the implied warranty of
3496# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3497# General Public License for more details.
3498#
3499# You should have received a copy of the GNU General Public License
3500# along with this program; if not, write to the Free Software
3501# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3502#
3503# As a special exception to the GNU General Public License, if you
3504# distribute this file as part of a program that contains a
3505# configuration script generated by Autoconf, you may include it under
3506# the same distribution terms that you use for the rest of that program.
3507
3508# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3509# ----------------------------------
3510# PKG_PROG_PKG_CONFIG
3511
3512# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3513#
3514# Check to see whether a particular set of modules exists.  Similar
3515# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3516#
3517#
3518# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3519# this or PKG_CHECK_MODULES is called, or make sure to call
3520# PKG_CHECK_EXISTS manually
3521# --------------------------------------------------------------
3522
3523
3524
3525# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3526# ---------------------------------------------
3527# _PKG_CONFIG
3528
3529# _PKG_SHORT_ERRORS_SUPPORTED
3530# -----------------------------
3531# _PKG_SHORT_ERRORS_SUPPORTED
3532
3533
3534# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3535# [ACTION-IF-NOT-FOUND])
3536#
3537#
3538# Note that if there is a possibility the first call to
3539# PKG_CHECK_MODULES might not happen, you should be sure to include an
3540# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3541#
3542#
3543# --------------------------------------------------------------
3544# PKG_CHECK_MODULES
3545
3546
3547# Include these first...
3548#
3549# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3550# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3551#
3552# This code is free software; you can redistribute it and/or modify it
3553# under the terms of the GNU General Public License version 2 only, as
3554# published by the Free Software Foundation.  Oracle designates this
3555# particular file as subject to the "Classpath" exception as provided
3556# by Oracle in the LICENSE file that accompanied this code.
3557#
3558# This code is distributed in the hope that it will be useful, but WITHOUT
3559# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3560# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3561# version 2 for more details (a copy is included in the LICENSE file that
3562# accompanied this code).
3563#
3564# You should have received a copy of the GNU General Public License version
3565# 2 along with this work; if not, write to the Free Software Foundation,
3566# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3567#
3568# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3569# or visit www.oracle.com if you need additional information or have any
3570# questions.
3571#
3572
3573# Create a function/macro that takes a series of named arguments. The call is
3574# similar to AC_DEFUN, but the setup of the function looks like this:
3575# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3576# ... do something
3577#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3578# ])
3579# A star (*) in front of a named argument means that it is required and it's
3580# presence will be verified. To pass e.g. the first value as a normal indexed
3581# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3582# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3583# "ARG_FOO".
3584#
3585# The generated function can be called like this:
3586# MYFUNC(FOO: [foo-val],
3587#     BAR: [
3588#         $ECHO hello world
3589#     ])
3590# Note that the argument value must start on the same line as the argument name.
3591#
3592# Argument 1: Name of the function to define
3593# Argument 2: List of legal named arguments, with a * prefix for required arguments
3594# Argument 3: Argument array to treat as named, typically $@
3595# Argument 4: The main function body
3596
3597
3598# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3599# If so, then append $1 to $2 \
3600# Also set JVM_ARG_OK to true/false depending on outcome.
3601
3602
3603# Appends a string to a path variable, only adding the : when needed.
3604
3605
3606# Prepends a string to a path variable, only adding the : when needed.
3607
3608
3609# This will make sure the given variable points to a full and proper
3610# path. This means:
3611# 1) There will be no spaces in the path. On unix platforms,
3612#    spaces in the path will result in an error. On Windows,
3613#    the path will be rewritten using short-style to be space-free.
3614# 2) The path will be absolute, and it will be in unix-style (on
3615#     cygwin).
3616# $1: The name of the variable to fix
3617
3618
3619# This will make sure the given variable points to a executable
3620# with a full and proper path. This means:
3621# 1) There will be no spaces in the path. On unix platforms,
3622#    spaces in the path will result in an error. On Windows,
3623#    the path will be rewritten using short-style to be space-free.
3624# 2) The path will be absolute, and it will be in unix-style (on
3625#     cygwin).
3626# Any arguments given to the executable is preserved.
3627# If the input variable does not have a directory specification, then
3628# it need to be in the PATH.
3629# $1: The name of the variable to fix
3630
3631
3632
3633
3634# Register a --with argument but mark it as deprecated
3635# $1: The name of the with argument to deprecate, not including --with-
3636
3637
3638# Register a --enable argument but mark it as deprecated
3639# $1: The name of the with argument to deprecate, not including --enable-
3640# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3641# $3: Messages to user.
3642
3643
3644
3645
3646# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3647# $1: variable to check
3648
3649
3650# Check that there are no unprocessed overridden variables left.
3651# If so, they are an incorrect argument and we will exit with an error.
3652
3653
3654# Setup a tool for the given variable. If correctly specified by the user,
3655# use that value, otherwise search for the tool using the supplied code snippet.
3656# $1: variable to set
3657# $2: code snippet to call to look for the tool
3658# $3: code snippet to call if variable was used to find tool
3659
3660
3661# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3662# $1: variable to set
3663# $2: executable name (or list of names) to look for
3664
3665
3666# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3667# $1: variable to set
3668# $2: executable name (or list of names) to look for
3669
3670
3671# Like BASIC_PATH_PROGS but fails if no tool was found.
3672# $1: variable to set
3673# $2: executable name (or list of names) to look for
3674
3675
3676# Like BASIC_SETUP_TOOL but fails if no tool was found.
3677# $1: variable to set
3678# $2: autoconf macro to call to look for the special tool
3679
3680
3681# Setup the most fundamental tools that relies on not much else to set up,
3682# but is used by much of the early bootstrap code.
3683
3684
3685# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3686
3687
3688# Evaluates platform specific overrides for devkit variables.
3689# $1: Name of variable
3690
3691
3692
3693
3694
3695
3696#%%% Simple tools %%%
3697
3698# Check if we have found a usable version of make
3699# $1: the path to a potential make binary (or empty)
3700# $2: the description on how we found this
3701
3702
3703
3704
3705# Goes looking for a usable version of GNU make.
3706
3707
3708
3709
3710
3711
3712
3713
3714# Check if build directory is on local disk. If not possible to determine,
3715# we prefer to claim it's local.
3716# Argument 1: directory to test
3717# Argument 2: what to do if it is on local disk
3718# Argument 3: what to do otherwise (remote disk or failure)
3719
3720
3721# Check that source files have basic read permissions set. This might
3722# not be the case in cygwin in certain conditions.
3723
3724
3725
3726
3727# Check for support for specific options in bash
3728
3729
3730################################################################################
3731#
3732# Default make target
3733#
3734
3735
3736# Code to run after AC_OUTPUT
3737
3738
3739#
3740# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742#
3743# This code is free software; you can redistribute it and/or modify it
3744# under the terms of the GNU General Public License version 2 only, as
3745# published by the Free Software Foundation.  Oracle designates this
3746# particular file as subject to the "Classpath" exception as provided
3747# by Oracle in the LICENSE file that accompanied this code.
3748#
3749# This code is distributed in the hope that it will be useful, but WITHOUT
3750# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752# version 2 for more details (a copy is included in the LICENSE file that
3753# accompanied this code).
3754#
3755# You should have received a copy of the GNU General Public License version
3756# 2 along with this work; if not, write to the Free Software Foundation,
3757# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758#
3759# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760# or visit www.oracle.com if you need additional information or have any
3761# questions.
3762#
3763
3764
3765
3766
3767
3768# Helper function which possibly converts a path using DOS-style short mode.
3769# If so, the updated path is stored in $new_path.
3770# $1: The path to check
3771
3772
3773# Helper function which possibly converts a path using DOS-style short mode.
3774# If so, the updated path is stored in $new_path.
3775# $1: The path to check
3776
3777
3778# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3779# and could probably be heavily simplified. However, all changes in this
3780# area tend to need lot of testing in different scenarios, and in lack of
3781# proper unit testing, cleaning this up has not been deemed worth the effort
3782# at the moment.
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3793
3794
3795
3796
3797# ... then the rest
3798#
3799# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3800# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3801#
3802# This code is free software; you can redistribute it and/or modify it
3803# under the terms of the GNU General Public License version 2 only, as
3804# published by the Free Software Foundation.  Oracle designates this
3805# particular file as subject to the "Classpath" exception as provided
3806# by Oracle in the LICENSE file that accompanied this code.
3807#
3808# This code is distributed in the hope that it will be useful, but WITHOUT
3809# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3810# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3811# version 2 for more details (a copy is included in the LICENSE file that
3812# accompanied this code).
3813#
3814# You should have received a copy of the GNU General Public License version
3815# 2 along with this work; if not, write to the Free Software Foundation,
3816# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3817#
3818# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3819# or visit www.oracle.com if you need additional information or have any
3820# questions.
3821#
3822
3823########################################################################
3824# This file handles detection of the Boot JDK. The Boot JDK detection
3825# process has been developed as a response to solve a complex real-world
3826# problem. Initially, it was simple, but it has grown as platform after
3827# platform, idiosyncracy after idiosyncracy has been supported.
3828#
3829# The basic idea is this:
3830# 1) You need an acceptable *) JDK to use as a Boot JDK
3831# 2) There are several ways to locate a JDK, that are mostly platform
3832#    dependent **)
3833# 3) You can have multiple JDKs installed
3834# 4) If possible, configure should try to dig out an acceptable JDK
3835#    automatically, without having to resort to command-line options
3836#
3837# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3838#     javac) and not a JRE, etc.
3839#
3840# **) On Windows we typically use a well-known path.
3841#     On MacOSX we typically use the tool java_home.
3842#     On Linux we typically find javac in the $PATH, and then follow a
3843#     chain of symlinks that often ends up in a real JDK.
3844#
3845# This leads to the code where we check in different ways to locate a
3846# JDK, and if one is found, check if it is acceptable. If not, we print
3847# our reasons for rejecting it (useful when debugging non-working
3848# configure situations) and continue checking the next one.
3849########################################################################
3850
3851# Execute the check given as argument, and verify the result
3852# If the Boot JDK was previously found, do nothing
3853# $1 A command line (typically autoconf macro) to execute
3854
3855
3856# Test: Is bootjdk explicitely set by command line arguments?
3857
3858
3859# Test: Is $JAVA_HOME set?
3860
3861
3862# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3863
3864
3865# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3866# $1: Argument to the java_home binary (optional)
3867
3868
3869# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3870
3871
3872# Look for a jdk in the given path. If there are multiple, try to select the newest.
3873# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3874# $1 = Path to directory containing jdk installations.
3875# $2 = String to append to the found JDK directory to get the proper JDK home
3876
3877
3878# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3879# environmental variable as base for where to look.
3880# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3881
3882
3883# Test: Is there a JDK installed in default, well-known locations?
3884
3885
3886# Check that a command-line tool in the Boot JDK is correct
3887# $1 = name of variable to assign
3888# $2 = name of binary
3889
3890
3891###############################################################################
3892#
3893# We need a Boot JDK to bootstrap the build.
3894#
3895
3896
3897
3898
3899
3900# BUILD_JDK: the location of the latest JDK that can run
3901#   on the host system and supports the target class file version
3902#   generated in this JDK build.  This variable should only be
3903#   used after the launchers are built.
3904#
3905
3906# Execute the check given as argument, and verify the result.
3907# If the JDK was previously found, do nothing.
3908# $1 A command line (typically autoconf macro) to execute
3909
3910
3911# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3912# is different than the host system doing the build (e.g. cross-compilation),
3913# a special BUILD_JDK is built as part of the build process.  An external
3914# prebuilt BUILD_JDK can also be supplied.
3915
3916
3917#
3918# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3919# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3920#
3921# This code is free software; you can redistribute it and/or modify it
3922# under the terms of the GNU General Public License version 2 only, as
3923# published by the Free Software Foundation.  Oracle designates this
3924# particular file as subject to the "Classpath" exception as provided
3925# by Oracle in the LICENSE file that accompanied this code.
3926#
3927# This code is distributed in the hope that it will be useful, but WITHOUT
3928# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3929# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3930# version 2 for more details (a copy is included in the LICENSE file that
3931# accompanied this code).
3932#
3933# You should have received a copy of the GNU General Public License version
3934# 2 along with this work; if not, write to the Free Software Foundation,
3935# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3936#
3937# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3938# or visit www.oracle.com if you need additional information or have any
3939# questions.
3940#
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958################################################################################
3959#
3960# Runs icecc-create-env once and prints the error if it fails
3961#
3962# $1: arguments to icecc-create-env
3963# $2: log file
3964#
3965
3966
3967################################################################################
3968#
3969# Optionally enable distributed compilation of native code using icecc/icecream
3970#
3971
3972
3973
3974
3975
3976
3977
3978#
3979# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3980# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3981#
3982# This code is free software; you can redistribute it and/or modify it
3983# under the terms of the GNU General Public License version 2 only, as
3984# published by the Free Software Foundation.  Oracle designates this
3985# particular file as subject to the "Classpath" exception as provided
3986# by Oracle in the LICENSE file that accompanied this code.
3987#
3988# This code is distributed in the hope that it will be useful, but WITHOUT
3989# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3990# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3991# version 2 for more details (a copy is included in the LICENSE file that
3992# accompanied this code).
3993#
3994# You should have received a copy of the GNU General Public License version
3995# 2 along with this work; if not, write to the Free Software Foundation,
3996# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3997#
3998# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3999# or visit www.oracle.com if you need additional information or have any
4000# questions.
4001#
4002
4003# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4004# corresponding configure arguments instead
4005
4006
4007# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4008# that configure can use them while detecting compilers.
4009# TOOLCHAIN_TYPE is available here.
4010# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4011
4012
4013
4014
4015
4016
4017# Documentation on common flags used for solstudio in HIGHEST.
4018#
4019# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4020#          done with care, there are some assumptions below that need to
4021#          be understood about the use of pointers, and IEEE behavior.
4022#
4023# -fns: Use non-standard floating point mode (not IEEE 754)
4024# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4025# -fsingle: Use single precision floating point with 'float'
4026# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4027#   (Source with excessing pointer casting and data access with mixed
4028#    pointer types are not recommended)
4029# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4030#   (If you expect perfect errno behavior, do not use this)
4031# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4032# -xrestrict: Pointer parameters to functions do not overlap
4033#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4034#    If you pass in multiple pointers to the same data, do not use this)
4035# -xlibmil: Inline some library routines
4036#   (If you expect perfect errno behavior, do not use this)
4037# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4038#   (If you expect perfect errno behavior, do not use this)
4039#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4040
4041    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4042    # Bug?
4043    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4044    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4045    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4046    #fi
4047
4048
4049
4050
4051
4052
4053################################################################################
4054# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4055#      conditionals against.
4056# $2 - Optional prefix for each variable defined.
4057
4058
4059# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4060#                                  IF_FALSE: [RUN-IF-FALSE])
4061# ------------------------------------------------------------
4062# Check that the C compiler supports an argument
4063
4064
4065
4066
4067# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4068#                                    IF_FALSE: [RUN-IF-FALSE])
4069# ------------------------------------------------------------
4070# Check that the C++ compiler supports an argument
4071
4072
4073
4074
4075# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4076#                                IF_FALSE: [RUN-IF-FALSE])
4077# ------------------------------------------------------------
4078# Check that the C and C++ compilers support an argument
4079
4080
4081
4082
4083# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4084#                                   IF_FALSE: [RUN-IF-FALSE])
4085# ------------------------------------------------------------
4086# Check that the linker support an argument
4087
4088
4089
4090
4091
4092
4093# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4094# Arguments:
4095# $1 - Optional prefix for each variable defined.
4096
4097
4098#
4099# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4100# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4101#
4102# This code is free software; you can redistribute it and/or modify it
4103# under the terms of the GNU General Public License version 2 only, as
4104# published by the Free Software Foundation.  Oracle designates this
4105# particular file as subject to the "Classpath" exception as provided
4106# by Oracle in the LICENSE file that accompanied this code.
4107#
4108# This code is distributed in the hope that it will be useful, but WITHOUT
4109# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4110# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4111# version 2 for more details (a copy is included in the LICENSE file that
4112# accompanied this code).
4113#
4114# You should have received a copy of the GNU General Public License version
4115# 2 along with this work; if not, write to the Free Software Foundation,
4116# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4117#
4118# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4119# or visit www.oracle.com if you need additional information or have any
4120# questions.
4121#
4122
4123
4124
4125
4126
4127cygwin_help() {
4128  case $1 in
4129    unzip)
4130      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4131      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4132      ;;
4133    zip)
4134      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4135      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4136      ;;
4137    make)
4138      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4139      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4140      ;;
4141    freetype)
4142      HELP_MSG="
4143The freetype library can now be build during the configure process.
4144Download the freetype sources and unpack them into an arbitrary directory:
4145
4146wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4147tar -xzf freetype-2.5.3.tar.gz
4148
4149Then run configure with '--with-freetype-src=<freetype_src>'. This will
4150automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4151builds or into '<freetype_src>/lib32' for 32-bit builds.
4152Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4153and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4154
4155Alternatively you can unpack the sources like this to use the default directory:
4156
4157tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4158      ;;
4159  esac
4160}
4161
4162msys_help() {
4163  PKGHANDLER_COMMAND=""
4164}
4165
4166apt_help() {
4167  case $1 in
4168    reduced)
4169      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4170    devkit)
4171      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4172    openjdk)
4173      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4174    alsa)
4175      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4176    cups)
4177      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4178    freetype)
4179      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4180    ffi)
4181      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4182    x11)
4183      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4184    ccache)
4185      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4186    dtrace)
4187      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4188  esac
4189}
4190
4191yum_help() {
4192  case $1 in
4193    devkit)
4194      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4195    openjdk)
4196      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4197    alsa)
4198      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4199    cups)
4200      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4201    freetype)
4202      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4203    x11)
4204      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4205    ccache)
4206      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4207  esac
4208}
4209
4210port_help() {
4211  PKGHANDLER_COMMAND=""
4212}
4213
4214pkgutil_help() {
4215  PKGHANDLER_COMMAND=""
4216}
4217
4218pkgadd_help() {
4219  PKGHANDLER_COMMAND=""
4220}
4221
4222# This function will check if we're called from the "configure" wrapper while
4223# printing --help. If so, we will print out additional information that can
4224# only be extracted within the autoconf script, and then exit. This must be
4225# called at the very beginning in configure.ac.
4226
4227
4228
4229
4230
4231
4232#
4233# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4234# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4235#
4236# This code is free software; you can redistribute it and/or modify it
4237# under the terms of the GNU General Public License version 2 only, as
4238# published by the Free Software Foundation.  Oracle designates this
4239# particular file as subject to the "Classpath" exception as provided
4240# by Oracle in the LICENSE file that accompanied this code.
4241#
4242# This code is distributed in the hope that it will be useful, but WITHOUT
4243# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4244# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4245# version 2 for more details (a copy is included in the LICENSE file that
4246# accompanied this code).
4247#
4248# You should have received a copy of the GNU General Public License version
4249# 2 along with this work; if not, write to the Free Software Foundation,
4250# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4251#
4252# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4253# or visit www.oracle.com if you need additional information or have any
4254# questions.
4255#
4256
4257# All valid JVM features, regardless of platform
4258VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4259    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4260
4261# All valid JVM variants
4262VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4263
4264###############################################################################
4265# Check if the specified JVM variant should be built. To be used in shell if
4266# constructs, like this:
4267# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4268#
4269# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4270
4271# Definition kept in one line to allow inlining in if statements.
4272# Additional [] needed to keep m4 from mangling shell constructs.
4273
4274
4275###############################################################################
4276# Check if the specified JVM features are explicitly enabled. To be used in
4277# shell if constructs, like this:
4278# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4279#
4280# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4281
4282# Definition kept in one line to allow inlining in if statements.
4283# Additional [] needed to keep m4 from mangling shell constructs.
4284
4285
4286###############################################################################
4287# Check which variants of the JVM that we want to build. Available variants are:
4288#   server: normal interpreter, and a tiered C1/C2 compiler
4289#   client: normal interpreter, and C1 (no C2 compiler)
4290#   minimal: reduced form of client with optional features stripped out
4291#   core: normal interpreter only, no compiler
4292#   zero: C++ based interpreter only, no compiler
4293#   zeroshark: C++ based interpreter, and a llvm-based compiler
4294#   custom: baseline JVM with no default features
4295#
4296
4297
4298###############################################################################
4299# Check if dtrace should be enabled and has all prerequisites present.
4300#
4301
4302
4303###############################################################################
4304# Set up all JVM features for each JVM variant.
4305#
4306
4307
4308###############################################################################
4309# Validate JVM features once all setup is complete, including custom setup.
4310#
4311
4312
4313################################################################################
4314# Check if gtest should be built
4315#
4316
4317
4318#
4319# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4320# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4321#
4322# This code is free software; you can redistribute it and/or modify it
4323# under the terms of the GNU General Public License version 2 only, as
4324# published by the Free Software Foundation.  Oracle designates this
4325# particular file as subject to the "Classpath" exception as provided
4326# by Oracle in the LICENSE file that accompanied this code.
4327#
4328# This code is distributed in the hope that it will be useful, but WITHOUT
4329# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4330# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4331# version 2 for more details (a copy is included in the LICENSE file that
4332# accompanied this code).
4333#
4334# You should have received a copy of the GNU General Public License version
4335# 2 along with this work; if not, write to the Free Software Foundation,
4336# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4337#
4338# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4339# or visit www.oracle.com if you need additional information or have any
4340# questions.
4341#
4342
4343###############################################################################
4344# Check which variant of the JDK that we want to build.
4345# Currently we have:
4346#    normal:   standard edition
4347# but the custom make system may add other variants
4348#
4349# Effectively the JDK variant gives a name to a specific set of
4350# modules to compile into the JDK.
4351
4352
4353###############################################################################
4354# Set the debug level
4355#    release: no debug information, all optimizations, no asserts.
4356#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4357#    fastdebug: debug information (-g), all optimizations, all asserts
4358#    slowdebug: debug information (-g), no optimizations, all asserts
4359
4360
4361###############################################################################
4362#
4363# Should we build only OpenJDK even if closed sources are present?
4364#
4365
4366
4367
4368
4369###############################################################################
4370#
4371# Enable or disable the elliptic curve crypto implementation
4372#
4373
4374
4375
4376
4377################################################################################
4378#
4379# Gcov coverage data for hotspot
4380#
4381
4382
4383################################################################################
4384#
4385# Static build support.  When enabled will generate static
4386# libraries instead of shared libraries for all JDK libs.
4387#
4388
4389
4390################################################################################
4391#
4392# jlink options.
4393# We always keep packaged modules in JDK image.
4394#
4395
4396
4397################################################################################
4398#
4399# Check if building of the jtreg failure handler should be enabled.
4400#
4401
4402
4403################################################################################
4404#
4405# Enable or disable generation of the classlist at build time
4406#
4407
4408
4409#
4410# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4411# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4412#
4413# This code is free software; you can redistribute it and/or modify it
4414# under the terms of the GNU General Public License version 2 only, as
4415# published by the Free Software Foundation.  Oracle designates this
4416# particular file as subject to the "Classpath" exception as provided
4417# by Oracle in the LICENSE file that accompanied this code.
4418#
4419# This code is distributed in the hope that it will be useful, but WITHOUT
4420# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4421# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4422# version 2 for more details (a copy is included in the LICENSE file that
4423# accompanied this code).
4424#
4425# You should have received a copy of the GNU General Public License version
4426# 2 along with this work; if not, write to the Free Software Foundation,
4427# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4428#
4429# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4430# or visit www.oracle.com if you need additional information or have any
4431# questions.
4432#
4433
4434###############################################################################
4435#
4436# Setup version numbers
4437#
4438
4439# Verify that a given string represents a valid version number, and assign it
4440# to a variable.
4441
4442# Argument 1: the variable to assign to
4443# Argument 2: the value given by the user
4444
4445
4446
4447
4448#
4449# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4450# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4451#
4452# This code is free software; you can redistribute it and/or modify it
4453# under the terms of the GNU General Public License version 2 only, as
4454# published by the Free Software Foundation.  Oracle designates this
4455# particular file as subject to the "Classpath" exception as provided
4456# by Oracle in the LICENSE file that accompanied this code.
4457#
4458# This code is distributed in the hope that it will be useful, but WITHOUT
4459# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4460# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4461# version 2 for more details (a copy is included in the LICENSE file that
4462# accompanied this code).
4463#
4464# You should have received a copy of the GNU General Public License version
4465# 2 along with this work; if not, write to the Free Software Foundation,
4466# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4467#
4468# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4469# or visit www.oracle.com if you need additional information or have any
4470# questions.
4471#
4472
4473# Major library component reside in separate files.
4474#
4475# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4476# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4477#
4478# This code is free software; you can redistribute it and/or modify it
4479# under the terms of the GNU General Public License version 2 only, as
4480# published by the Free Software Foundation.  Oracle designates this
4481# particular file as subject to the "Classpath" exception as provided
4482# by Oracle in the LICENSE file that accompanied this code.
4483#
4484# This code is distributed in the hope that it will be useful, but WITHOUT
4485# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4486# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4487# version 2 for more details (a copy is included in the LICENSE file that
4488# accompanied this code).
4489#
4490# You should have received a copy of the GNU General Public License version
4491# 2 along with this work; if not, write to the Free Software Foundation,
4492# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4493#
4494# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4495# or visit www.oracle.com if you need additional information or have any
4496# questions.
4497#
4498
4499################################################################################
4500# Setup alsa (Advanced Linux Sound Architecture)
4501################################################################################
4502
4503
4504#
4505# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4506# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4507#
4508# This code is free software; you can redistribute it and/or modify it
4509# under the terms of the GNU General Public License version 2 only, as
4510# published by the Free Software Foundation.  Oracle designates this
4511# particular file as subject to the "Classpath" exception as provided
4512# by Oracle in the LICENSE file that accompanied this code.
4513#
4514# This code is distributed in the hope that it will be useful, but WITHOUT
4515# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4516# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4517# version 2 for more details (a copy is included in the LICENSE file that
4518# accompanied this code).
4519#
4520# You should have received a copy of the GNU General Public License version
4521# 2 along with this work; if not, write to the Free Software Foundation,
4522# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4523#
4524# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4525# or visit www.oracle.com if you need additional information or have any
4526# questions.
4527#
4528
4529################################################################################
4530# Setup bundled libraries.
4531#
4532# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4533# OpenJDK repository. Default is to use these libraries as bundled, but they
4534# might be replaced by en external version by the user.
4535################################################################################
4536
4537
4538################################################################################
4539# Setup libjpeg
4540################################################################################
4541
4542
4543################################################################################
4544# Setup giflib
4545################################################################################
4546
4547
4548################################################################################
4549# Setup libpng
4550################################################################################
4551
4552
4553################################################################################
4554# Setup zlib
4555################################################################################
4556
4557
4558################################################################################
4559# Setup lcms (Little CMS)
4560################################################################################
4561
4562
4563#
4564# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4565# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4566#
4567# This code is free software; you can redistribute it and/or modify it
4568# under the terms of the GNU General Public License version 2 only, as
4569# published by the Free Software Foundation.  Oracle designates this
4570# particular file as subject to the "Classpath" exception as provided
4571# by Oracle in the LICENSE file that accompanied this code.
4572#
4573# This code is distributed in the hope that it will be useful, but WITHOUT
4574# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4575# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4576# version 2 for more details (a copy is included in the LICENSE file that
4577# accompanied this code).
4578#
4579# You should have received a copy of the GNU General Public License version
4580# 2 along with this work; if not, write to the Free Software Foundation,
4581# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4582#
4583# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4584# or visit www.oracle.com if you need additional information or have any
4585# questions.
4586#
4587
4588################################################################################
4589# Setup cups (Common Unix Printing System)
4590################################################################################
4591
4592
4593#
4594# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4595# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4596#
4597# This code is free software; you can redistribute it and/or modify it
4598# under the terms of the GNU General Public License version 2 only, as
4599# published by the Free Software Foundation.  Oracle designates this
4600# particular file as subject to the "Classpath" exception as provided
4601# by Oracle in the LICENSE file that accompanied this code.
4602#
4603# This code is distributed in the hope that it will be useful, but WITHOUT
4604# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4605# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4606# version 2 for more details (a copy is included in the LICENSE file that
4607# accompanied this code).
4608#
4609# You should have received a copy of the GNU General Public License version
4610# 2 along with this work; if not, write to the Free Software Foundation,
4611# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4612#
4613# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4614# or visit www.oracle.com if you need additional information or have any
4615# questions.
4616#
4617
4618################################################################################
4619# Setup libffi (Foreign Function Interface)
4620################################################################################
4621
4622
4623#
4624# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4625# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4626#
4627# This code is free software; you can redistribute it and/or modify it
4628# under the terms of the GNU General Public License version 2 only, as
4629# published by the Free Software Foundation.  Oracle designates this
4630# particular file as subject to the "Classpath" exception as provided
4631# by Oracle in the LICENSE file that accompanied this code.
4632#
4633# This code is distributed in the hope that it will be useful, but WITHOUT
4634# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4635# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4636# version 2 for more details (a copy is included in the LICENSE file that
4637# accompanied this code).
4638#
4639# You should have received a copy of the GNU General Public License version
4640# 2 along with this work; if not, write to the Free Software Foundation,
4641# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4642#
4643# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4644# or visit www.oracle.com if you need additional information or have any
4645# questions.
4646#
4647
4648################################################################################
4649# Build the freetype lib from source
4650################################################################################
4651
4652
4653################################################################################
4654# Check if a potential freeype library match is correct and usable
4655################################################################################
4656
4657
4658################################################################################
4659# Setup freetype (The FreeType2 font rendering library)
4660################################################################################
4661
4662
4663#
4664# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4665# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4666#
4667# This code is free software; you can redistribute it and/or modify it
4668# under the terms of the GNU General Public License version 2 only, as
4669# published by the Free Software Foundation.  Oracle designates this
4670# particular file as subject to the "Classpath" exception as provided
4671# by Oracle in the LICENSE file that accompanied this code.
4672#
4673# This code is distributed in the hope that it will be useful, but WITHOUT
4674# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4675# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4676# version 2 for more details (a copy is included in the LICENSE file that
4677# accompanied this code).
4678#
4679# You should have received a copy of the GNU General Public License version
4680# 2 along with this work; if not, write to the Free Software Foundation,
4681# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4682#
4683# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4684# or visit www.oracle.com if you need additional information or have any
4685# questions.
4686#
4687
4688################################################################################
4689# Setup the standard C/C++ runtime libraries.
4690#
4691# Most importantly, determine if stdc++ should be linked statically or
4692# dynamically.
4693################################################################################
4694
4695
4696#
4697# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4698# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4699#
4700# This code is free software; you can redistribute it and/or modify it
4701# under the terms of the GNU General Public License version 2 only, as
4702# published by the Free Software Foundation.  Oracle designates this
4703# particular file as subject to the "Classpath" exception as provided
4704# by Oracle in the LICENSE file that accompanied this code.
4705#
4706# This code is distributed in the hope that it will be useful, but WITHOUT
4707# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4708# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4709# version 2 for more details (a copy is included in the LICENSE file that
4710# accompanied this code).
4711#
4712# You should have received a copy of the GNU General Public License version
4713# 2 along with this work; if not, write to the Free Software Foundation,
4714# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4715#
4716# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4717# or visit www.oracle.com if you need additional information or have any
4718# questions.
4719#
4720
4721################################################################################
4722# Setup X11 Windows system
4723################################################################################
4724
4725
4726
4727################################################################################
4728# Determine which libraries are needed for this configuration
4729################################################################################
4730
4731
4732################################################################################
4733# Parse library options, and setup needed libraries
4734################################################################################
4735
4736
4737################################################################################
4738# Setup llvm (Low-Level VM)
4739################################################################################
4740
4741
4742################################################################################
4743# Setup various libraries, typically small system libraries
4744################################################################################
4745
4746
4747################################################################################
4748# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4749# redistribute it in the test image.
4750################################################################################
4751
4752
4753
4754#
4755# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4756# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4757#
4758# This code is free software; you can redistribute it and/or modify it
4759# under the terms of the GNU General Public License version 2 only, as
4760# published by the Free Software Foundation.  Oracle designates this
4761# particular file as subject to the "Classpath" exception as provided
4762# by Oracle in the LICENSE file that accompanied this code.
4763#
4764# This code is distributed in the hope that it will be useful, but WITHOUT
4765# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4766# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4767# version 2 for more details (a copy is included in the LICENSE file that
4768# accompanied this code).
4769#
4770# You should have received a copy of the GNU General Public License version
4771# 2 along with this work; if not, write to the Free Software Foundation,
4772# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4773#
4774# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4775# or visit www.oracle.com if you need additional information or have any
4776# questions.
4777#
4778
4779# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4780# Converts autoconf style CPU name to OpenJDK style, into
4781# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4782
4783
4784# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4785# Converts autoconf style OS name to OpenJDK style, into
4786# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4787
4788
4789# Expects $host_os $host_cpu $build_os and $build_cpu
4790# and $with_target_bits to have been setup!
4791#
4792# Translate the standard triplet(quadruplet) definition
4793# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4794# OPENJDK_BUILD_OS, etc.
4795
4796
4797# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4798# accordingly. Must be done after setting up build and target system, but before
4799# doing anything else with these values.
4800
4801
4802# Setup the legacy variables, for controlling the old makefiles.
4803#
4804
4805
4806# $1 - Either TARGET or BUILD to setup the variables for.
4807
4808
4809
4810
4811#%%% Build and target systems %%%
4812
4813
4814
4815
4816# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4817# Add -mX to various FLAGS variables.
4818
4819
4820
4821
4822
4823
4824#
4825# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4826# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4827#
4828# This code is free software; you can redistribute it and/or modify it
4829# under the terms of the GNU General Public License version 2 only, as
4830# published by the Free Software Foundation.  Oracle designates this
4831# particular file as subject to the "Classpath" exception as provided
4832# by Oracle in the LICENSE file that accompanied this code.
4833#
4834# This code is distributed in the hope that it will be useful, but WITHOUT
4835# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4836# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4837# version 2 for more details (a copy is included in the LICENSE file that
4838# accompanied this code).
4839#
4840# You should have received a copy of the GNU General Public License version
4841# 2 along with this work; if not, write to the Free Software Foundation,
4842# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4843#
4844# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4845# or visit www.oracle.com if you need additional information or have any
4846# questions.
4847#
4848
4849
4850
4851
4852
4853
4854
4855################################################################################
4856# Define a mechanism for importing extra prebuilt modules
4857#
4858
4859
4860
4861#
4862# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4863# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4864#
4865# This code is free software; you can redistribute it and/or modify it
4866# under the terms of the GNU General Public License version 2 only, as
4867# published by the Free Software Foundation.  Oracle designates this
4868# particular file as subject to the "Classpath" exception as provided
4869# by Oracle in the LICENSE file that accompanied this code.
4870#
4871# This code is distributed in the hope that it will be useful, but WITHOUT
4872# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4873# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4874# version 2 for more details (a copy is included in the LICENSE file that
4875# accompanied this code).
4876#
4877# You should have received a copy of the GNU General Public License version
4878# 2 along with this work; if not, write to the Free Software Foundation,
4879# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4880#
4881# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4882# or visit www.oracle.com if you need additional information or have any
4883# questions.
4884#
4885
4886########################################################################
4887# This file is responsible for detecting, verifying and setting up the
4888# toolchain, i.e. the compiler, linker and related utilities. It will setup
4889# proper paths to the binaries, but it will not setup any flags.
4890#
4891# The binaries used is determined by the toolchain type, which is the family of
4892# compilers and related tools that are used.
4893########################################################################
4894
4895
4896# All valid toolchains, regardless of platform (used by help.m4)
4897VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4898
4899# These toolchains are valid on different platforms
4900VALID_TOOLCHAINS_linux="gcc clang"
4901VALID_TOOLCHAINS_solaris="solstudio"
4902VALID_TOOLCHAINS_macosx="gcc clang"
4903VALID_TOOLCHAINS_aix="xlc"
4904VALID_TOOLCHAINS_windows="microsoft"
4905
4906# Toolchain descriptions
4907TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4908TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4909TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4910TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4911TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4912
4913# Minimum supported versions, empty means unspecified
4914TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4915TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4916TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4917TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4918TOOLCHAIN_MINIMUM_VERSION_xlc=""
4919
4920# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4921# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4922# $1 - optional variable prefix for compiler and version variables (BUILD_)
4923# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4924
4925
4926# Check if the configured compiler (C and C++) is of a specific version or
4927# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4928#
4929# Arguments:
4930#   VERSION:   The version string to check against the found version
4931#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4932#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4933#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4934
4935
4936
4937
4938# Setup a number of variables describing how native output files are
4939# named on this platform/toolchain.
4940
4941
4942# Determine which toolchain type to use, and make sure it is valid for this
4943# platform. Setup various information about the selected toolchain.
4944
4945
4946# Before we start detecting the toolchain executables, we might need some
4947# special setup, e.g. additional paths etc.
4948
4949
4950# Restore path, etc
4951
4952
4953# Check if a compiler is of the toolchain type we expect, and save the version
4954# information from it. If the compiler does not match the expected type,
4955# this function will abort using AC_MSG_ERROR. If it matches, the version will
4956# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4957# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4958#
4959# $1 = compiler to test (CC or CXX)
4960# $2 = human readable name of compiler (C or C++)
4961
4962
4963# Try to locate the given C or C++ compiler in the path, or otherwise.
4964#
4965# $1 = compiler to test (CC or CXX)
4966# $2 = human readable name of compiler (C or C++)
4967# $3 = list of compiler names to search for
4968
4969
4970# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4971# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4972# archiver (AR). Verify that the compilers are correct according to the
4973# toolchain type.
4974
4975
4976# Setup additional tools that is considered a part of the toolchain, but not the
4977# core part. Many of these are highly platform-specific and do not exist,
4978# and/or are not needed on all platforms.
4979
4980
4981# Setup the build tools (i.e, the compiler and linker used to build programs
4982# that should be run on the build platform, not the target platform, as a build
4983# helper). Since the non-cross-compile case uses the normal, target compilers
4984# for this, we can only do this after these have been setup.
4985
4986
4987# Setup legacy variables that are still needed as alternative ways to refer to
4988# parts of the toolchain.
4989
4990
4991# Do some additional checks on the detected tools.
4992
4993
4994# Setup the JTReg Regression Test Harness.
4995
4996
4997#
4998# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4999# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5000#
5001# This code is free software; you can redistribute it and/or modify it
5002# under the terms of the GNU General Public License version 2 only, as
5003# published by the Free Software Foundation.  Oracle designates this
5004# particular file as subject to the "Classpath" exception as provided
5005# by Oracle in the LICENSE file that accompanied this code.
5006#
5007# This code is distributed in the hope that it will be useful, but WITHOUT
5008# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5009# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5010# version 2 for more details (a copy is included in the LICENSE file that
5011# accompanied this code).
5012#
5013# You should have received a copy of the GNU General Public License version
5014# 2 along with this work; if not, write to the Free Software Foundation,
5015# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5016#
5017# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5018# or visit www.oracle.com if you need additional information or have any
5019# questions.
5020#
5021
5022################################################################################
5023# The order of these defines the priority by which we try to find them.
5024VALID_VS_VERSIONS="2013 2012 2010"
5025
5026VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5027VS_VERSION_INTERNAL_2010=100
5028VS_MSVCR_2010=msvcr100.dll
5029# We don't use msvcp on Visual Studio 2010
5030#VS_MSVCP_2010=msvcp100.dll
5031VS_ENVVAR_2010="VS100COMNTOOLS"
5032VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5033VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5034VS_VS_PLATFORM_NAME_2010="v100"
5035VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5036
5037VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5038VS_VERSION_INTERNAL_2012=110
5039VS_MSVCR_2012=msvcr110.dll
5040VS_MSVCP_2012=msvcp110.dll
5041VS_ENVVAR_2012="VS110COMNTOOLS"
5042VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5043VS_SDK_INSTALLDIR_2012=
5044VS_VS_PLATFORM_NAME_2012="v110"
5045VS_SDK_PLATFORM_NAME_2012=
5046
5047VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5048VS_VERSION_INTERNAL_2013=120
5049VS_MSVCR_2013=msvcr120.dll
5050VS_MSVCP_2013=msvcp120.dll
5051VS_ENVVAR_2013="VS120COMNTOOLS"
5052VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5053VS_SDK_INSTALLDIR_2013=
5054VS_VS_PLATFORM_NAME_2013="v120"
5055VS_SDK_PLATFORM_NAME_2013=
5056
5057################################################################################
5058
5059
5060
5061################################################################################
5062
5063
5064
5065################################################################################
5066# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5067# build environment and assigns it to VS_ENV_CMD
5068
5069
5070################################################################################
5071
5072
5073
5074################################################################################
5075# Check if the VS env variables were setup prior to running configure.
5076# If not, then find vcvarsall.bat and run it automatically, and integrate
5077# the set env variables into the spec file.
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092# This line needs to be here, verbatim, after all includes and the dummy hook
5093# definitions. It is replaced with custom functionality when building
5094# custom sources.
5095#CUSTOM_AUTOCONF_INCLUDE
5096
5097# Do not change or remove the following line, it is needed for consistency checks:
5098DATE_WHEN_GENERATED=1474460325
5099
5100###############################################################################
5101#
5102# Initialization / Boot-strapping
5103#
5104# The bootstrapping process needs to solve the "chicken or the egg" problem,
5105# thus it jumps back and forth, each time gaining something needed later on.
5106#
5107###############################################################################
5108
5109# If we are requested to print additional help, do that and then exit.
5110# This must be the very first call.
5111
5112  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5113
5114    # Print available toolchains
5115    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5116    $PRINTF "Which are valid to use depends on the build platform.\n"
5117    for toolchain in $VALID_TOOLCHAINS_all; do
5118      # Use indirect variable referencing
5119      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5120      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5121      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5122    done
5123    $PRINTF "\n"
5124
5125    # Print available jvm features
5126    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5127    $PRINTF "Which are valid to use depends on the target platform.\n  "
5128    $PRINTF "%s " $VALID_JVM_FEATURES
5129    $PRINTF "\n"
5130
5131    # And now exit directly
5132    exit 0
5133  fi
5134
5135
5136# Basic initialization that must happen first of all in the normal process.
5137
5138  # Save the original command line. This is passed to us by the wrapper configure script.
5139
5140  # Save the path variable before it gets changed
5141  ORIGINAL_PATH="$PATH"
5142
5143  DATE_WHEN_CONFIGURED=`LANG=C date`
5144
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5146$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5147  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5148$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5149
5150
5151  # Start with tools that do not need have cross compilation support
5152  # and can be expected to be found in the default PATH. These tools are
5153  # used by configure.
5154
5155  # First are all the simple required tools.
5156
5157
5158
5159  # Publish this variable in the help.
5160
5161
5162  if [ -z "${BASENAME+x}" ]; then
5163    # The variable is not set by user, try to locate tool using the code snippet
5164    for ac_prog in basename
5165do
5166  # Extract the first word of "$ac_prog", so it can be a program name with args.
5167set dummy $ac_prog; ac_word=$2
5168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5169$as_echo_n "checking for $ac_word... " >&6; }
5170if ${ac_cv_path_BASENAME+:} false; then :
5171  $as_echo_n "(cached) " >&6
5172else
5173  case $BASENAME in
5174  [\\/]* | ?:[\\/]*)
5175  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5176  ;;
5177  *)
5178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5179for as_dir in $PATH
5180do
5181  IFS=$as_save_IFS
5182  test -z "$as_dir" && as_dir=.
5183    for ac_exec_ext in '' $ac_executable_extensions; do
5184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5185    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5187    break 2
5188  fi
5189done
5190  done
5191IFS=$as_save_IFS
5192
5193  ;;
5194esac
5195fi
5196BASENAME=$ac_cv_path_BASENAME
5197if test -n "$BASENAME"; then
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5199$as_echo "$BASENAME" >&6; }
5200else
5201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5202$as_echo "no" >&6; }
5203fi
5204
5205
5206  test -n "$BASENAME" && break
5207done
5208
5209  else
5210    # The variable is set, but is it from the command line or the environment?
5211
5212    # Try to remove the string !BASENAME! from our list.
5213    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5214    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5215      # If it failed, the variable was not from the command line. Ignore it,
5216      # but warn the user (except for BASH, which is always set by the calling BASH).
5217      if test "xBASENAME" != xBASH; then
5218        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5219$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5220      fi
5221      # Try to locate tool using the code snippet
5222      for ac_prog in basename
5223do
5224  # Extract the first word of "$ac_prog", so it can be a program name with args.
5225set dummy $ac_prog; ac_word=$2
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5227$as_echo_n "checking for $ac_word... " >&6; }
5228if ${ac_cv_path_BASENAME+:} false; then :
5229  $as_echo_n "(cached) " >&6
5230else
5231  case $BASENAME in
5232  [\\/]* | ?:[\\/]*)
5233  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5234  ;;
5235  *)
5236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5237for as_dir in $PATH
5238do
5239  IFS=$as_save_IFS
5240  test -z "$as_dir" && as_dir=.
5241    for ac_exec_ext in '' $ac_executable_extensions; do
5242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5243    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5245    break 2
5246  fi
5247done
5248  done
5249IFS=$as_save_IFS
5250
5251  ;;
5252esac
5253fi
5254BASENAME=$ac_cv_path_BASENAME
5255if test -n "$BASENAME"; then
5256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5257$as_echo "$BASENAME" >&6; }
5258else
5259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5260$as_echo "no" >&6; }
5261fi
5262
5263
5264  test -n "$BASENAME" && break
5265done
5266
5267    else
5268      # If it succeeded, then it was overridden by the user. We will use it
5269      # for the tool.
5270
5271      # First remove it from the list of overridden variables, so we can test
5272      # for unknown variables in the end.
5273      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5274
5275      # Check if we try to supply an empty value
5276      if test "x$BASENAME" = x; then
5277        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5278$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5279        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5280$as_echo_n "checking for BASENAME... " >&6; }
5281        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5282$as_echo "disabled" >&6; }
5283      else
5284        # Check if the provided tool contains a complete path.
5285        tool_specified="$BASENAME"
5286        tool_basename="${tool_specified##*/}"
5287        if test "x$tool_basename" = "x$tool_specified"; then
5288          # A command without a complete path is provided, search $PATH.
5289          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5290$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5291          # Extract the first word of "$tool_basename", so it can be a program name with args.
5292set dummy $tool_basename; ac_word=$2
5293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5294$as_echo_n "checking for $ac_word... " >&6; }
5295if ${ac_cv_path_BASENAME+:} false; then :
5296  $as_echo_n "(cached) " >&6
5297else
5298  case $BASENAME in
5299  [\\/]* | ?:[\\/]*)
5300  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5301  ;;
5302  *)
5303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304for as_dir in $PATH
5305do
5306  IFS=$as_save_IFS
5307  test -z "$as_dir" && as_dir=.
5308    for ac_exec_ext in '' $ac_executable_extensions; do
5309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5310    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5312    break 2
5313  fi
5314done
5315  done
5316IFS=$as_save_IFS
5317
5318  ;;
5319esac
5320fi
5321BASENAME=$ac_cv_path_BASENAME
5322if test -n "$BASENAME"; then
5323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5324$as_echo "$BASENAME" >&6; }
5325else
5326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327$as_echo "no" >&6; }
5328fi
5329
5330
5331          if test "x$BASENAME" = x; then
5332            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5333          fi
5334        else
5335          # Otherwise we believe it is a complete path. Use it as it is.
5336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5337$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5338          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5339$as_echo_n "checking for BASENAME... " >&6; }
5340          if test ! -x "$tool_specified"; then
5341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5342$as_echo "not found" >&6; }
5343            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5344          fi
5345          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5346$as_echo "$tool_specified" >&6; }
5347        fi
5348      fi
5349    fi
5350
5351  fi
5352
5353
5354
5355  if test "x$BASENAME" = x; then
5356    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5357  fi
5358
5359
5360
5361
5362
5363  # Publish this variable in the help.
5364
5365
5366  if [ -z "${BASH+x}" ]; then
5367    # The variable is not set by user, try to locate tool using the code snippet
5368    for ac_prog in bash
5369do
5370  # Extract the first word of "$ac_prog", so it can be a program name with args.
5371set dummy $ac_prog; ac_word=$2
5372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5373$as_echo_n "checking for $ac_word... " >&6; }
5374if ${ac_cv_path_BASH+:} false; then :
5375  $as_echo_n "(cached) " >&6
5376else
5377  case $BASH in
5378  [\\/]* | ?:[\\/]*)
5379  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5380  ;;
5381  *)
5382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5383for as_dir in $PATH
5384do
5385  IFS=$as_save_IFS
5386  test -z "$as_dir" && as_dir=.
5387    for ac_exec_ext in '' $ac_executable_extensions; do
5388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5389    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5391    break 2
5392  fi
5393done
5394  done
5395IFS=$as_save_IFS
5396
5397  ;;
5398esac
5399fi
5400BASH=$ac_cv_path_BASH
5401if test -n "$BASH"; then
5402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5403$as_echo "$BASH" >&6; }
5404else
5405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5406$as_echo "no" >&6; }
5407fi
5408
5409
5410  test -n "$BASH" && break
5411done
5412
5413  else
5414    # The variable is set, but is it from the command line or the environment?
5415
5416    # Try to remove the string !BASH! from our list.
5417    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5418    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5419      # If it failed, the variable was not from the command line. Ignore it,
5420      # but warn the user (except for BASH, which is always set by the calling BASH).
5421      if test "xBASH" != xBASH; then
5422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5423$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5424      fi
5425      # Try to locate tool using the code snippet
5426      for ac_prog in bash
5427do
5428  # Extract the first word of "$ac_prog", so it can be a program name with args.
5429set dummy $ac_prog; ac_word=$2
5430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5431$as_echo_n "checking for $ac_word... " >&6; }
5432if ${ac_cv_path_BASH+:} false; then :
5433  $as_echo_n "(cached) " >&6
5434else
5435  case $BASH in
5436  [\\/]* | ?:[\\/]*)
5437  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5438  ;;
5439  *)
5440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5441for as_dir in $PATH
5442do
5443  IFS=$as_save_IFS
5444  test -z "$as_dir" && as_dir=.
5445    for ac_exec_ext in '' $ac_executable_extensions; do
5446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5447    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5449    break 2
5450  fi
5451done
5452  done
5453IFS=$as_save_IFS
5454
5455  ;;
5456esac
5457fi
5458BASH=$ac_cv_path_BASH
5459if test -n "$BASH"; then
5460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5461$as_echo "$BASH" >&6; }
5462else
5463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5464$as_echo "no" >&6; }
5465fi
5466
5467
5468  test -n "$BASH" && break
5469done
5470
5471    else
5472      # If it succeeded, then it was overridden by the user. We will use it
5473      # for the tool.
5474
5475      # First remove it from the list of overridden variables, so we can test
5476      # for unknown variables in the end.
5477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5478
5479      # Check if we try to supply an empty value
5480      if test "x$BASH" = x; then
5481        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5482$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5484$as_echo_n "checking for BASH... " >&6; }
5485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5486$as_echo "disabled" >&6; }
5487      else
5488        # Check if the provided tool contains a complete path.
5489        tool_specified="$BASH"
5490        tool_basename="${tool_specified##*/}"
5491        if test "x$tool_basename" = "x$tool_specified"; then
5492          # A command without a complete path is provided, search $PATH.
5493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5494$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5495          # Extract the first word of "$tool_basename", so it can be a program name with args.
5496set dummy $tool_basename; ac_word=$2
5497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5498$as_echo_n "checking for $ac_word... " >&6; }
5499if ${ac_cv_path_BASH+:} false; then :
5500  $as_echo_n "(cached) " >&6
5501else
5502  case $BASH in
5503  [\\/]* | ?:[\\/]*)
5504  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5505  ;;
5506  *)
5507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5508for as_dir in $PATH
5509do
5510  IFS=$as_save_IFS
5511  test -z "$as_dir" && as_dir=.
5512    for ac_exec_ext in '' $ac_executable_extensions; do
5513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5514    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5516    break 2
5517  fi
5518done
5519  done
5520IFS=$as_save_IFS
5521
5522  ;;
5523esac
5524fi
5525BASH=$ac_cv_path_BASH
5526if test -n "$BASH"; then
5527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5528$as_echo "$BASH" >&6; }
5529else
5530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5531$as_echo "no" >&6; }
5532fi
5533
5534
5535          if test "x$BASH" = x; then
5536            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5537          fi
5538        else
5539          # Otherwise we believe it is a complete path. Use it as it is.
5540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5541$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5542          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5543$as_echo_n "checking for BASH... " >&6; }
5544          if test ! -x "$tool_specified"; then
5545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5546$as_echo "not found" >&6; }
5547            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5548          fi
5549          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5550$as_echo "$tool_specified" >&6; }
5551        fi
5552      fi
5553    fi
5554
5555  fi
5556
5557
5558
5559  if test "x$BASH" = x; then
5560    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5561  fi
5562
5563
5564
5565
5566
5567  # Publish this variable in the help.
5568
5569
5570  if [ -z "${CAT+x}" ]; then
5571    # The variable is not set by user, try to locate tool using the code snippet
5572    for ac_prog in cat
5573do
5574  # Extract the first word of "$ac_prog", so it can be a program name with args.
5575set dummy $ac_prog; ac_word=$2
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5577$as_echo_n "checking for $ac_word... " >&6; }
5578if ${ac_cv_path_CAT+:} false; then :
5579  $as_echo_n "(cached) " >&6
5580else
5581  case $CAT in
5582  [\\/]* | ?:[\\/]*)
5583  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5584  ;;
5585  *)
5586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5587for as_dir in $PATH
5588do
5589  IFS=$as_save_IFS
5590  test -z "$as_dir" && as_dir=.
5591    for ac_exec_ext in '' $ac_executable_extensions; do
5592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5593    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5595    break 2
5596  fi
5597done
5598  done
5599IFS=$as_save_IFS
5600
5601  ;;
5602esac
5603fi
5604CAT=$ac_cv_path_CAT
5605if test -n "$CAT"; then
5606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5607$as_echo "$CAT" >&6; }
5608else
5609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5610$as_echo "no" >&6; }
5611fi
5612
5613
5614  test -n "$CAT" && break
5615done
5616
5617  else
5618    # The variable is set, but is it from the command line or the environment?
5619
5620    # Try to remove the string !CAT! from our list.
5621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5623      # If it failed, the variable was not from the command line. Ignore it,
5624      # but warn the user (except for BASH, which is always set by the calling BASH).
5625      if test "xCAT" != xBASH; then
5626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5627$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5628      fi
5629      # Try to locate tool using the code snippet
5630      for ac_prog in cat
5631do
5632  # Extract the first word of "$ac_prog", so it can be a program name with args.
5633set dummy $ac_prog; ac_word=$2
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5635$as_echo_n "checking for $ac_word... " >&6; }
5636if ${ac_cv_path_CAT+:} false; then :
5637  $as_echo_n "(cached) " >&6
5638else
5639  case $CAT in
5640  [\\/]* | ?:[\\/]*)
5641  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5642  ;;
5643  *)
5644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5645for as_dir in $PATH
5646do
5647  IFS=$as_save_IFS
5648  test -z "$as_dir" && as_dir=.
5649    for ac_exec_ext in '' $ac_executable_extensions; do
5650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5651    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5653    break 2
5654  fi
5655done
5656  done
5657IFS=$as_save_IFS
5658
5659  ;;
5660esac
5661fi
5662CAT=$ac_cv_path_CAT
5663if test -n "$CAT"; then
5664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5665$as_echo "$CAT" >&6; }
5666else
5667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668$as_echo "no" >&6; }
5669fi
5670
5671
5672  test -n "$CAT" && break
5673done
5674
5675    else
5676      # If it succeeded, then it was overridden by the user. We will use it
5677      # for the tool.
5678
5679      # First remove it from the list of overridden variables, so we can test
5680      # for unknown variables in the end.
5681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5682
5683      # Check if we try to supply an empty value
5684      if test "x$CAT" = x; then
5685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5686$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5688$as_echo_n "checking for CAT... " >&6; }
5689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5690$as_echo "disabled" >&6; }
5691      else
5692        # Check if the provided tool contains a complete path.
5693        tool_specified="$CAT"
5694        tool_basename="${tool_specified##*/}"
5695        if test "x$tool_basename" = "x$tool_specified"; then
5696          # A command without a complete path is provided, search $PATH.
5697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5698$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5699          # Extract the first word of "$tool_basename", so it can be a program name with args.
5700set dummy $tool_basename; ac_word=$2
5701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702$as_echo_n "checking for $ac_word... " >&6; }
5703if ${ac_cv_path_CAT+:} false; then :
5704  $as_echo_n "(cached) " >&6
5705else
5706  case $CAT in
5707  [\\/]* | ?:[\\/]*)
5708  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5709  ;;
5710  *)
5711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5712for as_dir in $PATH
5713do
5714  IFS=$as_save_IFS
5715  test -z "$as_dir" && as_dir=.
5716    for ac_exec_ext in '' $ac_executable_extensions; do
5717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5718    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5720    break 2
5721  fi
5722done
5723  done
5724IFS=$as_save_IFS
5725
5726  ;;
5727esac
5728fi
5729CAT=$ac_cv_path_CAT
5730if test -n "$CAT"; then
5731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5732$as_echo "$CAT" >&6; }
5733else
5734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735$as_echo "no" >&6; }
5736fi
5737
5738
5739          if test "x$CAT" = x; then
5740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5741          fi
5742        else
5743          # Otherwise we believe it is a complete path. Use it as it is.
5744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5745$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5747$as_echo_n "checking for CAT... " >&6; }
5748          if test ! -x "$tool_specified"; then
5749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5750$as_echo "not found" >&6; }
5751            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5752          fi
5753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5754$as_echo "$tool_specified" >&6; }
5755        fi
5756      fi
5757    fi
5758
5759  fi
5760
5761
5762
5763  if test "x$CAT" = x; then
5764    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5765  fi
5766
5767
5768
5769
5770
5771  # Publish this variable in the help.
5772
5773
5774  if [ -z "${CHMOD+x}" ]; then
5775    # The variable is not set by user, try to locate tool using the code snippet
5776    for ac_prog in chmod
5777do
5778  # Extract the first word of "$ac_prog", so it can be a program name with args.
5779set dummy $ac_prog; ac_word=$2
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if ${ac_cv_path_CHMOD+:} false; then :
5783  $as_echo_n "(cached) " >&6
5784else
5785  case $CHMOD in
5786  [\\/]* | ?:[\\/]*)
5787  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5788  ;;
5789  *)
5790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793  IFS=$as_save_IFS
5794  test -z "$as_dir" && as_dir=.
5795    for ac_exec_ext in '' $ac_executable_extensions; do
5796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799    break 2
5800  fi
5801done
5802  done
5803IFS=$as_save_IFS
5804
5805  ;;
5806esac
5807fi
5808CHMOD=$ac_cv_path_CHMOD
5809if test -n "$CHMOD"; then
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5811$as_echo "$CHMOD" >&6; }
5812else
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814$as_echo "no" >&6; }
5815fi
5816
5817
5818  test -n "$CHMOD" && break
5819done
5820
5821  else
5822    # The variable is set, but is it from the command line or the environment?
5823
5824    # Try to remove the string !CHMOD! from our list.
5825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5827      # If it failed, the variable was not from the command line. Ignore it,
5828      # but warn the user (except for BASH, which is always set by the calling BASH).
5829      if test "xCHMOD" != xBASH; then
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5831$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5832      fi
5833      # Try to locate tool using the code snippet
5834      for ac_prog in chmod
5835do
5836  # Extract the first word of "$ac_prog", so it can be a program name with args.
5837set dummy $ac_prog; ac_word=$2
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5839$as_echo_n "checking for $ac_word... " >&6; }
5840if ${ac_cv_path_CHMOD+:} false; then :
5841  $as_echo_n "(cached) " >&6
5842else
5843  case $CHMOD in
5844  [\\/]* | ?:[\\/]*)
5845  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5846  ;;
5847  *)
5848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851  IFS=$as_save_IFS
5852  test -z "$as_dir" && as_dir=.
5853    for ac_exec_ext in '' $ac_executable_extensions; do
5854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5855    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857    break 2
5858  fi
5859done
5860  done
5861IFS=$as_save_IFS
5862
5863  ;;
5864esac
5865fi
5866CHMOD=$ac_cv_path_CHMOD
5867if test -n "$CHMOD"; then
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5869$as_echo "$CHMOD" >&6; }
5870else
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872$as_echo "no" >&6; }
5873fi
5874
5875
5876  test -n "$CHMOD" && break
5877done
5878
5879    else
5880      # If it succeeded, then it was overridden by the user. We will use it
5881      # for the tool.
5882
5883      # First remove it from the list of overridden variables, so we can test
5884      # for unknown variables in the end.
5885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5886
5887      # Check if we try to supply an empty value
5888      if test "x$CHMOD" = x; then
5889        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5890$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5891        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5892$as_echo_n "checking for CHMOD... " >&6; }
5893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5894$as_echo "disabled" >&6; }
5895      else
5896        # Check if the provided tool contains a complete path.
5897        tool_specified="$CHMOD"
5898        tool_basename="${tool_specified##*/}"
5899        if test "x$tool_basename" = "x$tool_specified"; then
5900          # A command without a complete path is provided, search $PATH.
5901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5902$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5903          # Extract the first word of "$tool_basename", so it can be a program name with args.
5904set dummy $tool_basename; ac_word=$2
5905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5906$as_echo_n "checking for $ac_word... " >&6; }
5907if ${ac_cv_path_CHMOD+:} false; then :
5908  $as_echo_n "(cached) " >&6
5909else
5910  case $CHMOD in
5911  [\\/]* | ?:[\\/]*)
5912  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5913  ;;
5914  *)
5915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5916for as_dir in $PATH
5917do
5918  IFS=$as_save_IFS
5919  test -z "$as_dir" && as_dir=.
5920    for ac_exec_ext in '' $ac_executable_extensions; do
5921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5922    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5924    break 2
5925  fi
5926done
5927  done
5928IFS=$as_save_IFS
5929
5930  ;;
5931esac
5932fi
5933CHMOD=$ac_cv_path_CHMOD
5934if test -n "$CHMOD"; then
5935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5936$as_echo "$CHMOD" >&6; }
5937else
5938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5939$as_echo "no" >&6; }
5940fi
5941
5942
5943          if test "x$CHMOD" = x; then
5944            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5945          fi
5946        else
5947          # Otherwise we believe it is a complete path. Use it as it is.
5948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5949$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5950          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5951$as_echo_n "checking for CHMOD... " >&6; }
5952          if test ! -x "$tool_specified"; then
5953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5954$as_echo "not found" >&6; }
5955            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5956          fi
5957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5958$as_echo "$tool_specified" >&6; }
5959        fi
5960      fi
5961    fi
5962
5963  fi
5964
5965
5966
5967  if test "x$CHMOD" = x; then
5968    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5969  fi
5970
5971
5972
5973
5974
5975  # Publish this variable in the help.
5976
5977
5978  if [ -z "${CMP+x}" ]; then
5979    # The variable is not set by user, try to locate tool using the code snippet
5980    for ac_prog in cmp
5981do
5982  # Extract the first word of "$ac_prog", so it can be a program name with args.
5983set dummy $ac_prog; ac_word=$2
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if ${ac_cv_path_CMP+:} false; then :
5987  $as_echo_n "(cached) " >&6
5988else
5989  case $CMP in
5990  [\\/]* | ?:[\\/]*)
5991  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5992  ;;
5993  *)
5994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997  IFS=$as_save_IFS
5998  test -z "$as_dir" && as_dir=.
5999    for ac_exec_ext in '' $ac_executable_extensions; do
6000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6001    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6003    break 2
6004  fi
6005done
6006  done
6007IFS=$as_save_IFS
6008
6009  ;;
6010esac
6011fi
6012CMP=$ac_cv_path_CMP
6013if test -n "$CMP"; then
6014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6015$as_echo "$CMP" >&6; }
6016else
6017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018$as_echo "no" >&6; }
6019fi
6020
6021
6022  test -n "$CMP" && break
6023done
6024
6025  else
6026    # The variable is set, but is it from the command line or the environment?
6027
6028    # Try to remove the string !CMP! from our list.
6029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6031      # If it failed, the variable was not from the command line. Ignore it,
6032      # but warn the user (except for BASH, which is always set by the calling BASH).
6033      if test "xCMP" != xBASH; then
6034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6035$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6036      fi
6037      # Try to locate tool using the code snippet
6038      for ac_prog in cmp
6039do
6040  # Extract the first word of "$ac_prog", so it can be a program name with args.
6041set dummy $ac_prog; ac_word=$2
6042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6043$as_echo_n "checking for $ac_word... " >&6; }
6044if ${ac_cv_path_CMP+:} false; then :
6045  $as_echo_n "(cached) " >&6
6046else
6047  case $CMP in
6048  [\\/]* | ?:[\\/]*)
6049  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6050  ;;
6051  *)
6052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6053for as_dir in $PATH
6054do
6055  IFS=$as_save_IFS
6056  test -z "$as_dir" && as_dir=.
6057    for ac_exec_ext in '' $ac_executable_extensions; do
6058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6059    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6061    break 2
6062  fi
6063done
6064  done
6065IFS=$as_save_IFS
6066
6067  ;;
6068esac
6069fi
6070CMP=$ac_cv_path_CMP
6071if test -n "$CMP"; then
6072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6073$as_echo "$CMP" >&6; }
6074else
6075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076$as_echo "no" >&6; }
6077fi
6078
6079
6080  test -n "$CMP" && break
6081done
6082
6083    else
6084      # If it succeeded, then it was overridden by the user. We will use it
6085      # for the tool.
6086
6087      # First remove it from the list of overridden variables, so we can test
6088      # for unknown variables in the end.
6089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6090
6091      # Check if we try to supply an empty value
6092      if test "x$CMP" = x; then
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6094$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6096$as_echo_n "checking for CMP... " >&6; }
6097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6098$as_echo "disabled" >&6; }
6099      else
6100        # Check if the provided tool contains a complete path.
6101        tool_specified="$CMP"
6102        tool_basename="${tool_specified##*/}"
6103        if test "x$tool_basename" = "x$tool_specified"; then
6104          # A command without a complete path is provided, search $PATH.
6105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6106$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6107          # Extract the first word of "$tool_basename", so it can be a program name with args.
6108set dummy $tool_basename; ac_word=$2
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6110$as_echo_n "checking for $ac_word... " >&6; }
6111if ${ac_cv_path_CMP+:} false; then :
6112  $as_echo_n "(cached) " >&6
6113else
6114  case $CMP in
6115  [\\/]* | ?:[\\/]*)
6116  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6117  ;;
6118  *)
6119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120for as_dir in $PATH
6121do
6122  IFS=$as_save_IFS
6123  test -z "$as_dir" && as_dir=.
6124    for ac_exec_ext in '' $ac_executable_extensions; do
6125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6126    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6128    break 2
6129  fi
6130done
6131  done
6132IFS=$as_save_IFS
6133
6134  ;;
6135esac
6136fi
6137CMP=$ac_cv_path_CMP
6138if test -n "$CMP"; then
6139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6140$as_echo "$CMP" >&6; }
6141else
6142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6143$as_echo "no" >&6; }
6144fi
6145
6146
6147          if test "x$CMP" = x; then
6148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6149          fi
6150        else
6151          # Otherwise we believe it is a complete path. Use it as it is.
6152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6153$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6155$as_echo_n "checking for CMP... " >&6; }
6156          if test ! -x "$tool_specified"; then
6157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6158$as_echo "not found" >&6; }
6159            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6160          fi
6161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6162$as_echo "$tool_specified" >&6; }
6163        fi
6164      fi
6165    fi
6166
6167  fi
6168
6169
6170
6171  if test "x$CMP" = x; then
6172    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6173  fi
6174
6175
6176
6177
6178
6179  # Publish this variable in the help.
6180
6181
6182  if [ -z "${COMM+x}" ]; then
6183    # The variable is not set by user, try to locate tool using the code snippet
6184    for ac_prog in comm
6185do
6186  # Extract the first word of "$ac_prog", so it can be a program name with args.
6187set dummy $ac_prog; ac_word=$2
6188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6189$as_echo_n "checking for $ac_word... " >&6; }
6190if ${ac_cv_path_COMM+:} false; then :
6191  $as_echo_n "(cached) " >&6
6192else
6193  case $COMM in
6194  [\\/]* | ?:[\\/]*)
6195  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6196  ;;
6197  *)
6198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199for as_dir in $PATH
6200do
6201  IFS=$as_save_IFS
6202  test -z "$as_dir" && as_dir=.
6203    for ac_exec_ext in '' $ac_executable_extensions; do
6204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6205    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6207    break 2
6208  fi
6209done
6210  done
6211IFS=$as_save_IFS
6212
6213  ;;
6214esac
6215fi
6216COMM=$ac_cv_path_COMM
6217if test -n "$COMM"; then
6218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6219$as_echo "$COMM" >&6; }
6220else
6221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6222$as_echo "no" >&6; }
6223fi
6224
6225
6226  test -n "$COMM" && break
6227done
6228
6229  else
6230    # The variable is set, but is it from the command line or the environment?
6231
6232    # Try to remove the string !COMM! from our list.
6233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6235      # If it failed, the variable was not from the command line. Ignore it,
6236      # but warn the user (except for BASH, which is always set by the calling BASH).
6237      if test "xCOMM" != xBASH; then
6238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6239$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6240      fi
6241      # Try to locate tool using the code snippet
6242      for ac_prog in comm
6243do
6244  # Extract the first word of "$ac_prog", so it can be a program name with args.
6245set dummy $ac_prog; ac_word=$2
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247$as_echo_n "checking for $ac_word... " >&6; }
6248if ${ac_cv_path_COMM+:} false; then :
6249  $as_echo_n "(cached) " >&6
6250else
6251  case $COMM in
6252  [\\/]* | ?:[\\/]*)
6253  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6254  ;;
6255  *)
6256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259  IFS=$as_save_IFS
6260  test -z "$as_dir" && as_dir=.
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6263    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265    break 2
6266  fi
6267done
6268  done
6269IFS=$as_save_IFS
6270
6271  ;;
6272esac
6273fi
6274COMM=$ac_cv_path_COMM
6275if test -n "$COMM"; then
6276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6277$as_echo "$COMM" >&6; }
6278else
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }
6281fi
6282
6283
6284  test -n "$COMM" && break
6285done
6286
6287    else
6288      # If it succeeded, then it was overridden by the user. We will use it
6289      # for the tool.
6290
6291      # First remove it from the list of overridden variables, so we can test
6292      # for unknown variables in the end.
6293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6294
6295      # Check if we try to supply an empty value
6296      if test "x$COMM" = x; then
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6298$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6300$as_echo_n "checking for COMM... " >&6; }
6301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6302$as_echo "disabled" >&6; }
6303      else
6304        # Check if the provided tool contains a complete path.
6305        tool_specified="$COMM"
6306        tool_basename="${tool_specified##*/}"
6307        if test "x$tool_basename" = "x$tool_specified"; then
6308          # A command without a complete path is provided, search $PATH.
6309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6310$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6311          # Extract the first word of "$tool_basename", so it can be a program name with args.
6312set dummy $tool_basename; ac_word=$2
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6314$as_echo_n "checking for $ac_word... " >&6; }
6315if ${ac_cv_path_COMM+:} false; then :
6316  $as_echo_n "(cached) " >&6
6317else
6318  case $COMM in
6319  [\\/]* | ?:[\\/]*)
6320  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6321  ;;
6322  *)
6323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6324for as_dir in $PATH
6325do
6326  IFS=$as_save_IFS
6327  test -z "$as_dir" && as_dir=.
6328    for ac_exec_ext in '' $ac_executable_extensions; do
6329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6330    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6332    break 2
6333  fi
6334done
6335  done
6336IFS=$as_save_IFS
6337
6338  ;;
6339esac
6340fi
6341COMM=$ac_cv_path_COMM
6342if test -n "$COMM"; then
6343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6344$as_echo "$COMM" >&6; }
6345else
6346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6347$as_echo "no" >&6; }
6348fi
6349
6350
6351          if test "x$COMM" = x; then
6352            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6353          fi
6354        else
6355          # Otherwise we believe it is a complete path. Use it as it is.
6356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6357$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6358          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6359$as_echo_n "checking for COMM... " >&6; }
6360          if test ! -x "$tool_specified"; then
6361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6362$as_echo "not found" >&6; }
6363            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6364          fi
6365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6366$as_echo "$tool_specified" >&6; }
6367        fi
6368      fi
6369    fi
6370
6371  fi
6372
6373
6374
6375  if test "x$COMM" = x; then
6376    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6377  fi
6378
6379
6380
6381
6382
6383  # Publish this variable in the help.
6384
6385
6386  if [ -z "${CP+x}" ]; then
6387    # The variable is not set by user, try to locate tool using the code snippet
6388    for ac_prog in cp
6389do
6390  # Extract the first word of "$ac_prog", so it can be a program name with args.
6391set dummy $ac_prog; ac_word=$2
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6393$as_echo_n "checking for $ac_word... " >&6; }
6394if ${ac_cv_path_CP+:} false; then :
6395  $as_echo_n "(cached) " >&6
6396else
6397  case $CP in
6398  [\\/]* | ?:[\\/]*)
6399  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6400  ;;
6401  *)
6402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6403for as_dir in $PATH
6404do
6405  IFS=$as_save_IFS
6406  test -z "$as_dir" && as_dir=.
6407    for ac_exec_ext in '' $ac_executable_extensions; do
6408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6409    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6411    break 2
6412  fi
6413done
6414  done
6415IFS=$as_save_IFS
6416
6417  ;;
6418esac
6419fi
6420CP=$ac_cv_path_CP
6421if test -n "$CP"; then
6422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6423$as_echo "$CP" >&6; }
6424else
6425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6426$as_echo "no" >&6; }
6427fi
6428
6429
6430  test -n "$CP" && break
6431done
6432
6433  else
6434    # The variable is set, but is it from the command line or the environment?
6435
6436    # Try to remove the string !CP! from our list.
6437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6439      # If it failed, the variable was not from the command line. Ignore it,
6440      # but warn the user (except for BASH, which is always set by the calling BASH).
6441      if test "xCP" != xBASH; then
6442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6443$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6444      fi
6445      # Try to locate tool using the code snippet
6446      for ac_prog in cp
6447do
6448  # Extract the first word of "$ac_prog", so it can be a program name with args.
6449set dummy $ac_prog; ac_word=$2
6450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6451$as_echo_n "checking for $ac_word... " >&6; }
6452if ${ac_cv_path_CP+:} false; then :
6453  $as_echo_n "(cached) " >&6
6454else
6455  case $CP in
6456  [\\/]* | ?:[\\/]*)
6457  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6458  ;;
6459  *)
6460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6461for as_dir in $PATH
6462do
6463  IFS=$as_save_IFS
6464  test -z "$as_dir" && as_dir=.
6465    for ac_exec_ext in '' $ac_executable_extensions; do
6466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6467    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6469    break 2
6470  fi
6471done
6472  done
6473IFS=$as_save_IFS
6474
6475  ;;
6476esac
6477fi
6478CP=$ac_cv_path_CP
6479if test -n "$CP"; then
6480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6481$as_echo "$CP" >&6; }
6482else
6483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; }
6485fi
6486
6487
6488  test -n "$CP" && break
6489done
6490
6491    else
6492      # If it succeeded, then it was overridden by the user. We will use it
6493      # for the tool.
6494
6495      # First remove it from the list of overridden variables, so we can test
6496      # for unknown variables in the end.
6497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6498
6499      # Check if we try to supply an empty value
6500      if test "x$CP" = x; then
6501        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6502$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6504$as_echo_n "checking for CP... " >&6; }
6505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6506$as_echo "disabled" >&6; }
6507      else
6508        # Check if the provided tool contains a complete path.
6509        tool_specified="$CP"
6510        tool_basename="${tool_specified##*/}"
6511        if test "x$tool_basename" = "x$tool_specified"; then
6512          # A command without a complete path is provided, search $PATH.
6513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6514$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6515          # Extract the first word of "$tool_basename", so it can be a program name with args.
6516set dummy $tool_basename; ac_word=$2
6517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6518$as_echo_n "checking for $ac_word... " >&6; }
6519if ${ac_cv_path_CP+:} false; then :
6520  $as_echo_n "(cached) " >&6
6521else
6522  case $CP in
6523  [\\/]* | ?:[\\/]*)
6524  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6525  ;;
6526  *)
6527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6528for as_dir in $PATH
6529do
6530  IFS=$as_save_IFS
6531  test -z "$as_dir" && as_dir=.
6532    for ac_exec_ext in '' $ac_executable_extensions; do
6533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6534    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6536    break 2
6537  fi
6538done
6539  done
6540IFS=$as_save_IFS
6541
6542  ;;
6543esac
6544fi
6545CP=$ac_cv_path_CP
6546if test -n "$CP"; then
6547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6548$as_echo "$CP" >&6; }
6549else
6550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551$as_echo "no" >&6; }
6552fi
6553
6554
6555          if test "x$CP" = x; then
6556            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6557          fi
6558        else
6559          # Otherwise we believe it is a complete path. Use it as it is.
6560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6561$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6562          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6563$as_echo_n "checking for CP... " >&6; }
6564          if test ! -x "$tool_specified"; then
6565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6566$as_echo "not found" >&6; }
6567            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6568          fi
6569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6570$as_echo "$tool_specified" >&6; }
6571        fi
6572      fi
6573    fi
6574
6575  fi
6576
6577
6578
6579  if test "x$CP" = x; then
6580    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6581  fi
6582
6583
6584
6585
6586
6587  # Publish this variable in the help.
6588
6589
6590  if [ -z "${CUT+x}" ]; then
6591    # The variable is not set by user, try to locate tool using the code snippet
6592    for ac_prog in cut
6593do
6594  # Extract the first word of "$ac_prog", so it can be a program name with args.
6595set dummy $ac_prog; ac_word=$2
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6597$as_echo_n "checking for $ac_word... " >&6; }
6598if ${ac_cv_path_CUT+:} false; then :
6599  $as_echo_n "(cached) " >&6
6600else
6601  case $CUT in
6602  [\\/]* | ?:[\\/]*)
6603  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6604  ;;
6605  *)
6606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6607for as_dir in $PATH
6608do
6609  IFS=$as_save_IFS
6610  test -z "$as_dir" && as_dir=.
6611    for ac_exec_ext in '' $ac_executable_extensions; do
6612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6613    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6615    break 2
6616  fi
6617done
6618  done
6619IFS=$as_save_IFS
6620
6621  ;;
6622esac
6623fi
6624CUT=$ac_cv_path_CUT
6625if test -n "$CUT"; then
6626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6627$as_echo "$CUT" >&6; }
6628else
6629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6630$as_echo "no" >&6; }
6631fi
6632
6633
6634  test -n "$CUT" && break
6635done
6636
6637  else
6638    # The variable is set, but is it from the command line or the environment?
6639
6640    # Try to remove the string !CUT! from our list.
6641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6643      # If it failed, the variable was not from the command line. Ignore it,
6644      # but warn the user (except for BASH, which is always set by the calling BASH).
6645      if test "xCUT" != xBASH; then
6646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6647$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6648      fi
6649      # Try to locate tool using the code snippet
6650      for ac_prog in cut
6651do
6652  # Extract the first word of "$ac_prog", so it can be a program name with args.
6653set dummy $ac_prog; ac_word=$2
6654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6655$as_echo_n "checking for $ac_word... " >&6; }
6656if ${ac_cv_path_CUT+:} false; then :
6657  $as_echo_n "(cached) " >&6
6658else
6659  case $CUT in
6660  [\\/]* | ?:[\\/]*)
6661  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6662  ;;
6663  *)
6664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6665for as_dir in $PATH
6666do
6667  IFS=$as_save_IFS
6668  test -z "$as_dir" && as_dir=.
6669    for ac_exec_ext in '' $ac_executable_extensions; do
6670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6671    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6673    break 2
6674  fi
6675done
6676  done
6677IFS=$as_save_IFS
6678
6679  ;;
6680esac
6681fi
6682CUT=$ac_cv_path_CUT
6683if test -n "$CUT"; then
6684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6685$as_echo "$CUT" >&6; }
6686else
6687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6688$as_echo "no" >&6; }
6689fi
6690
6691
6692  test -n "$CUT" && break
6693done
6694
6695    else
6696      # If it succeeded, then it was overridden by the user. We will use it
6697      # for the tool.
6698
6699      # First remove it from the list of overridden variables, so we can test
6700      # for unknown variables in the end.
6701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6702
6703      # Check if we try to supply an empty value
6704      if test "x$CUT" = x; then
6705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6706$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6708$as_echo_n "checking for CUT... " >&6; }
6709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6710$as_echo "disabled" >&6; }
6711      else
6712        # Check if the provided tool contains a complete path.
6713        tool_specified="$CUT"
6714        tool_basename="${tool_specified##*/}"
6715        if test "x$tool_basename" = "x$tool_specified"; then
6716          # A command without a complete path is provided, search $PATH.
6717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6718$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6719          # Extract the first word of "$tool_basename", so it can be a program name with args.
6720set dummy $tool_basename; ac_word=$2
6721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6722$as_echo_n "checking for $ac_word... " >&6; }
6723if ${ac_cv_path_CUT+:} false; then :
6724  $as_echo_n "(cached) " >&6
6725else
6726  case $CUT in
6727  [\\/]* | ?:[\\/]*)
6728  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6729  ;;
6730  *)
6731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6732for as_dir in $PATH
6733do
6734  IFS=$as_save_IFS
6735  test -z "$as_dir" && as_dir=.
6736    for ac_exec_ext in '' $ac_executable_extensions; do
6737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6738    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6740    break 2
6741  fi
6742done
6743  done
6744IFS=$as_save_IFS
6745
6746  ;;
6747esac
6748fi
6749CUT=$ac_cv_path_CUT
6750if test -n "$CUT"; then
6751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6752$as_echo "$CUT" >&6; }
6753else
6754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6755$as_echo "no" >&6; }
6756fi
6757
6758
6759          if test "x$CUT" = x; then
6760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6761          fi
6762        else
6763          # Otherwise we believe it is a complete path. Use it as it is.
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6765$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6767$as_echo_n "checking for CUT... " >&6; }
6768          if test ! -x "$tool_specified"; then
6769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6770$as_echo "not found" >&6; }
6771            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6772          fi
6773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6774$as_echo "$tool_specified" >&6; }
6775        fi
6776      fi
6777    fi
6778
6779  fi
6780
6781
6782
6783  if test "x$CUT" = x; then
6784    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6785  fi
6786
6787
6788
6789
6790
6791  # Publish this variable in the help.
6792
6793
6794  if [ -z "${DATE+x}" ]; then
6795    # The variable is not set by user, try to locate tool using the code snippet
6796    for ac_prog in date
6797do
6798  # Extract the first word of "$ac_prog", so it can be a program name with args.
6799set dummy $ac_prog; ac_word=$2
6800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6801$as_echo_n "checking for $ac_word... " >&6; }
6802if ${ac_cv_path_DATE+:} false; then :
6803  $as_echo_n "(cached) " >&6
6804else
6805  case $DATE in
6806  [\\/]* | ?:[\\/]*)
6807  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6808  ;;
6809  *)
6810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6811for as_dir in $PATH
6812do
6813  IFS=$as_save_IFS
6814  test -z "$as_dir" && as_dir=.
6815    for ac_exec_ext in '' $ac_executable_extensions; do
6816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6817    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6819    break 2
6820  fi
6821done
6822  done
6823IFS=$as_save_IFS
6824
6825  ;;
6826esac
6827fi
6828DATE=$ac_cv_path_DATE
6829if test -n "$DATE"; then
6830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6831$as_echo "$DATE" >&6; }
6832else
6833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6834$as_echo "no" >&6; }
6835fi
6836
6837
6838  test -n "$DATE" && break
6839done
6840
6841  else
6842    # The variable is set, but is it from the command line or the environment?
6843
6844    # Try to remove the string !DATE! from our list.
6845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6847      # If it failed, the variable was not from the command line. Ignore it,
6848      # but warn the user (except for BASH, which is always set by the calling BASH).
6849      if test "xDATE" != xBASH; then
6850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6851$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6852      fi
6853      # Try to locate tool using the code snippet
6854      for ac_prog in date
6855do
6856  # Extract the first word of "$ac_prog", so it can be a program name with args.
6857set dummy $ac_prog; ac_word=$2
6858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6859$as_echo_n "checking for $ac_word... " >&6; }
6860if ${ac_cv_path_DATE+:} false; then :
6861  $as_echo_n "(cached) " >&6
6862else
6863  case $DATE in
6864  [\\/]* | ?:[\\/]*)
6865  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6866  ;;
6867  *)
6868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6869for as_dir in $PATH
6870do
6871  IFS=$as_save_IFS
6872  test -z "$as_dir" && as_dir=.
6873    for ac_exec_ext in '' $ac_executable_extensions; do
6874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6875    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6877    break 2
6878  fi
6879done
6880  done
6881IFS=$as_save_IFS
6882
6883  ;;
6884esac
6885fi
6886DATE=$ac_cv_path_DATE
6887if test -n "$DATE"; then
6888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6889$as_echo "$DATE" >&6; }
6890else
6891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6892$as_echo "no" >&6; }
6893fi
6894
6895
6896  test -n "$DATE" && break
6897done
6898
6899    else
6900      # If it succeeded, then it was overridden by the user. We will use it
6901      # for the tool.
6902
6903      # First remove it from the list of overridden variables, so we can test
6904      # for unknown variables in the end.
6905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6906
6907      # Check if we try to supply an empty value
6908      if test "x$DATE" = x; then
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6910$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6912$as_echo_n "checking for DATE... " >&6; }
6913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6914$as_echo "disabled" >&6; }
6915      else
6916        # Check if the provided tool contains a complete path.
6917        tool_specified="$DATE"
6918        tool_basename="${tool_specified##*/}"
6919        if test "x$tool_basename" = "x$tool_specified"; then
6920          # A command without a complete path is provided, search $PATH.
6921          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6922$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6923          # Extract the first word of "$tool_basename", so it can be a program name with args.
6924set dummy $tool_basename; ac_word=$2
6925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6926$as_echo_n "checking for $ac_word... " >&6; }
6927if ${ac_cv_path_DATE+:} false; then :
6928  $as_echo_n "(cached) " >&6
6929else
6930  case $DATE in
6931  [\\/]* | ?:[\\/]*)
6932  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6933  ;;
6934  *)
6935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6936for as_dir in $PATH
6937do
6938  IFS=$as_save_IFS
6939  test -z "$as_dir" && as_dir=.
6940    for ac_exec_ext in '' $ac_executable_extensions; do
6941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6942    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6944    break 2
6945  fi
6946done
6947  done
6948IFS=$as_save_IFS
6949
6950  ;;
6951esac
6952fi
6953DATE=$ac_cv_path_DATE
6954if test -n "$DATE"; then
6955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6956$as_echo "$DATE" >&6; }
6957else
6958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6959$as_echo "no" >&6; }
6960fi
6961
6962
6963          if test "x$DATE" = x; then
6964            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6965          fi
6966        else
6967          # Otherwise we believe it is a complete path. Use it as it is.
6968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6969$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6970          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6971$as_echo_n "checking for DATE... " >&6; }
6972          if test ! -x "$tool_specified"; then
6973            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6974$as_echo "not found" >&6; }
6975            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6976          fi
6977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6978$as_echo "$tool_specified" >&6; }
6979        fi
6980      fi
6981    fi
6982
6983  fi
6984
6985
6986
6987  if test "x$DATE" = x; then
6988    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6989  fi
6990
6991
6992
6993
6994
6995  # Publish this variable in the help.
6996
6997
6998  if [ -z "${DIFF+x}" ]; then
6999    # The variable is not set by user, try to locate tool using the code snippet
7000    for ac_prog in gdiff diff
7001do
7002  # Extract the first word of "$ac_prog", so it can be a program name with args.
7003set dummy $ac_prog; ac_word=$2
7004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7005$as_echo_n "checking for $ac_word... " >&6; }
7006if ${ac_cv_path_DIFF+:} false; then :
7007  $as_echo_n "(cached) " >&6
7008else
7009  case $DIFF in
7010  [\\/]* | ?:[\\/]*)
7011  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7012  ;;
7013  *)
7014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7015for as_dir in $PATH
7016do
7017  IFS=$as_save_IFS
7018  test -z "$as_dir" && as_dir=.
7019    for ac_exec_ext in '' $ac_executable_extensions; do
7020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7021    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7023    break 2
7024  fi
7025done
7026  done
7027IFS=$as_save_IFS
7028
7029  ;;
7030esac
7031fi
7032DIFF=$ac_cv_path_DIFF
7033if test -n "$DIFF"; then
7034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7035$as_echo "$DIFF" >&6; }
7036else
7037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7038$as_echo "no" >&6; }
7039fi
7040
7041
7042  test -n "$DIFF" && break
7043done
7044
7045  else
7046    # The variable is set, but is it from the command line or the environment?
7047
7048    # Try to remove the string !DIFF! from our list.
7049    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7050    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7051      # If it failed, the variable was not from the command line. Ignore it,
7052      # but warn the user (except for BASH, which is always set by the calling BASH).
7053      if test "xDIFF" != xBASH; then
7054        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7055$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7056      fi
7057      # Try to locate tool using the code snippet
7058      for ac_prog in gdiff diff
7059do
7060  # Extract the first word of "$ac_prog", so it can be a program name with args.
7061set dummy $ac_prog; ac_word=$2
7062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7063$as_echo_n "checking for $ac_word... " >&6; }
7064if ${ac_cv_path_DIFF+:} false; then :
7065  $as_echo_n "(cached) " >&6
7066else
7067  case $DIFF in
7068  [\\/]* | ?:[\\/]*)
7069  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7070  ;;
7071  *)
7072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7073for as_dir in $PATH
7074do
7075  IFS=$as_save_IFS
7076  test -z "$as_dir" && as_dir=.
7077    for ac_exec_ext in '' $ac_executable_extensions; do
7078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7079    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7081    break 2
7082  fi
7083done
7084  done
7085IFS=$as_save_IFS
7086
7087  ;;
7088esac
7089fi
7090DIFF=$ac_cv_path_DIFF
7091if test -n "$DIFF"; then
7092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7093$as_echo "$DIFF" >&6; }
7094else
7095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7096$as_echo "no" >&6; }
7097fi
7098
7099
7100  test -n "$DIFF" && break
7101done
7102
7103    else
7104      # If it succeeded, then it was overridden by the user. We will use it
7105      # for the tool.
7106
7107      # First remove it from the list of overridden variables, so we can test
7108      # for unknown variables in the end.
7109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7110
7111      # Check if we try to supply an empty value
7112      if test "x$DIFF" = x; then
7113        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7114$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7116$as_echo_n "checking for DIFF... " >&6; }
7117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7118$as_echo "disabled" >&6; }
7119      else
7120        # Check if the provided tool contains a complete path.
7121        tool_specified="$DIFF"
7122        tool_basename="${tool_specified##*/}"
7123        if test "x$tool_basename" = "x$tool_specified"; then
7124          # A command without a complete path is provided, search $PATH.
7125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7126$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7127          # Extract the first word of "$tool_basename", so it can be a program name with args.
7128set dummy $tool_basename; ac_word=$2
7129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7130$as_echo_n "checking for $ac_word... " >&6; }
7131if ${ac_cv_path_DIFF+:} false; then :
7132  $as_echo_n "(cached) " >&6
7133else
7134  case $DIFF in
7135  [\\/]* | ?:[\\/]*)
7136  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7137  ;;
7138  *)
7139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140for as_dir in $PATH
7141do
7142  IFS=$as_save_IFS
7143  test -z "$as_dir" && as_dir=.
7144    for ac_exec_ext in '' $ac_executable_extensions; do
7145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7146    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7148    break 2
7149  fi
7150done
7151  done
7152IFS=$as_save_IFS
7153
7154  ;;
7155esac
7156fi
7157DIFF=$ac_cv_path_DIFF
7158if test -n "$DIFF"; then
7159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7160$as_echo "$DIFF" >&6; }
7161else
7162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7163$as_echo "no" >&6; }
7164fi
7165
7166
7167          if test "x$DIFF" = x; then
7168            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7169          fi
7170        else
7171          # Otherwise we believe it is a complete path. Use it as it is.
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7173$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7174          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7175$as_echo_n "checking for DIFF... " >&6; }
7176          if test ! -x "$tool_specified"; then
7177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7178$as_echo "not found" >&6; }
7179            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7180          fi
7181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7182$as_echo "$tool_specified" >&6; }
7183        fi
7184      fi
7185    fi
7186
7187  fi
7188
7189
7190
7191  if test "x$DIFF" = x; then
7192    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7193  fi
7194
7195
7196
7197
7198
7199  # Publish this variable in the help.
7200
7201
7202  if [ -z "${DIRNAME+x}" ]; then
7203    # The variable is not set by user, try to locate tool using the code snippet
7204    for ac_prog in dirname
7205do
7206  # Extract the first word of "$ac_prog", so it can be a program name with args.
7207set dummy $ac_prog; ac_word=$2
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7209$as_echo_n "checking for $ac_word... " >&6; }
7210if ${ac_cv_path_DIRNAME+:} false; then :
7211  $as_echo_n "(cached) " >&6
7212else
7213  case $DIRNAME in
7214  [\\/]* | ?:[\\/]*)
7215  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7216  ;;
7217  *)
7218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7219for as_dir in $PATH
7220do
7221  IFS=$as_save_IFS
7222  test -z "$as_dir" && as_dir=.
7223    for ac_exec_ext in '' $ac_executable_extensions; do
7224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7225    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7227    break 2
7228  fi
7229done
7230  done
7231IFS=$as_save_IFS
7232
7233  ;;
7234esac
7235fi
7236DIRNAME=$ac_cv_path_DIRNAME
7237if test -n "$DIRNAME"; then
7238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7239$as_echo "$DIRNAME" >&6; }
7240else
7241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7242$as_echo "no" >&6; }
7243fi
7244
7245
7246  test -n "$DIRNAME" && break
7247done
7248
7249  else
7250    # The variable is set, but is it from the command line or the environment?
7251
7252    # Try to remove the string !DIRNAME! from our list.
7253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7255      # If it failed, the variable was not from the command line. Ignore it,
7256      # but warn the user (except for BASH, which is always set by the calling BASH).
7257      if test "xDIRNAME" != xBASH; then
7258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7259$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7260      fi
7261      # Try to locate tool using the code snippet
7262      for ac_prog in dirname
7263do
7264  # Extract the first word of "$ac_prog", so it can be a program name with args.
7265set dummy $ac_prog; ac_word=$2
7266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7267$as_echo_n "checking for $ac_word... " >&6; }
7268if ${ac_cv_path_DIRNAME+:} false; then :
7269  $as_echo_n "(cached) " >&6
7270else
7271  case $DIRNAME in
7272  [\\/]* | ?:[\\/]*)
7273  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7274  ;;
7275  *)
7276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7277for as_dir in $PATH
7278do
7279  IFS=$as_save_IFS
7280  test -z "$as_dir" && as_dir=.
7281    for ac_exec_ext in '' $ac_executable_extensions; do
7282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7283    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7285    break 2
7286  fi
7287done
7288  done
7289IFS=$as_save_IFS
7290
7291  ;;
7292esac
7293fi
7294DIRNAME=$ac_cv_path_DIRNAME
7295if test -n "$DIRNAME"; then
7296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7297$as_echo "$DIRNAME" >&6; }
7298else
7299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7300$as_echo "no" >&6; }
7301fi
7302
7303
7304  test -n "$DIRNAME" && break
7305done
7306
7307    else
7308      # If it succeeded, then it was overridden by the user. We will use it
7309      # for the tool.
7310
7311      # First remove it from the list of overridden variables, so we can test
7312      # for unknown variables in the end.
7313      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7314
7315      # Check if we try to supply an empty value
7316      if test "x$DIRNAME" = x; then
7317        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7318$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7319        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7320$as_echo_n "checking for DIRNAME... " >&6; }
7321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7322$as_echo "disabled" >&6; }
7323      else
7324        # Check if the provided tool contains a complete path.
7325        tool_specified="$DIRNAME"
7326        tool_basename="${tool_specified##*/}"
7327        if test "x$tool_basename" = "x$tool_specified"; then
7328          # A command without a complete path is provided, search $PATH.
7329          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7330$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7331          # Extract the first word of "$tool_basename", so it can be a program name with args.
7332set dummy $tool_basename; ac_word=$2
7333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7334$as_echo_n "checking for $ac_word... " >&6; }
7335if ${ac_cv_path_DIRNAME+:} false; then :
7336  $as_echo_n "(cached) " >&6
7337else
7338  case $DIRNAME in
7339  [\\/]* | ?:[\\/]*)
7340  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7341  ;;
7342  *)
7343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344for as_dir in $PATH
7345do
7346  IFS=$as_save_IFS
7347  test -z "$as_dir" && as_dir=.
7348    for ac_exec_ext in '' $ac_executable_extensions; do
7349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7350    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7352    break 2
7353  fi
7354done
7355  done
7356IFS=$as_save_IFS
7357
7358  ;;
7359esac
7360fi
7361DIRNAME=$ac_cv_path_DIRNAME
7362if test -n "$DIRNAME"; then
7363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7364$as_echo "$DIRNAME" >&6; }
7365else
7366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7367$as_echo "no" >&6; }
7368fi
7369
7370
7371          if test "x$DIRNAME" = x; then
7372            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7373          fi
7374        else
7375          # Otherwise we believe it is a complete path. Use it as it is.
7376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7377$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7378          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7379$as_echo_n "checking for DIRNAME... " >&6; }
7380          if test ! -x "$tool_specified"; then
7381            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7382$as_echo "not found" >&6; }
7383            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7384          fi
7385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7386$as_echo "$tool_specified" >&6; }
7387        fi
7388      fi
7389    fi
7390
7391  fi
7392
7393
7394
7395  if test "x$DIRNAME" = x; then
7396    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7397  fi
7398
7399
7400
7401
7402
7403  # Publish this variable in the help.
7404
7405
7406  if [ -z "${ECHO+x}" ]; then
7407    # The variable is not set by user, try to locate tool using the code snippet
7408    for ac_prog in echo
7409do
7410  # Extract the first word of "$ac_prog", so it can be a program name with args.
7411set dummy $ac_prog; ac_word=$2
7412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7413$as_echo_n "checking for $ac_word... " >&6; }
7414if ${ac_cv_path_ECHO+:} false; then :
7415  $as_echo_n "(cached) " >&6
7416else
7417  case $ECHO in
7418  [\\/]* | ?:[\\/]*)
7419  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7420  ;;
7421  *)
7422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7423for as_dir in $PATH
7424do
7425  IFS=$as_save_IFS
7426  test -z "$as_dir" && as_dir=.
7427    for ac_exec_ext in '' $ac_executable_extensions; do
7428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7429    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7431    break 2
7432  fi
7433done
7434  done
7435IFS=$as_save_IFS
7436
7437  ;;
7438esac
7439fi
7440ECHO=$ac_cv_path_ECHO
7441if test -n "$ECHO"; then
7442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7443$as_echo "$ECHO" >&6; }
7444else
7445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446$as_echo "no" >&6; }
7447fi
7448
7449
7450  test -n "$ECHO" && break
7451done
7452
7453  else
7454    # The variable is set, but is it from the command line or the environment?
7455
7456    # Try to remove the string !ECHO! from our list.
7457    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7458    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7459      # If it failed, the variable was not from the command line. Ignore it,
7460      # but warn the user (except for BASH, which is always set by the calling BASH).
7461      if test "xECHO" != xBASH; then
7462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7463$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7464      fi
7465      # Try to locate tool using the code snippet
7466      for ac_prog in echo
7467do
7468  # Extract the first word of "$ac_prog", so it can be a program name with args.
7469set dummy $ac_prog; ac_word=$2
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7471$as_echo_n "checking for $ac_word... " >&6; }
7472if ${ac_cv_path_ECHO+:} false; then :
7473  $as_echo_n "(cached) " >&6
7474else
7475  case $ECHO in
7476  [\\/]* | ?:[\\/]*)
7477  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7478  ;;
7479  *)
7480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481for as_dir in $PATH
7482do
7483  IFS=$as_save_IFS
7484  test -z "$as_dir" && as_dir=.
7485    for ac_exec_ext in '' $ac_executable_extensions; do
7486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7487    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7489    break 2
7490  fi
7491done
7492  done
7493IFS=$as_save_IFS
7494
7495  ;;
7496esac
7497fi
7498ECHO=$ac_cv_path_ECHO
7499if test -n "$ECHO"; then
7500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7501$as_echo "$ECHO" >&6; }
7502else
7503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7504$as_echo "no" >&6; }
7505fi
7506
7507
7508  test -n "$ECHO" && break
7509done
7510
7511    else
7512      # If it succeeded, then it was overridden by the user. We will use it
7513      # for the tool.
7514
7515      # First remove it from the list of overridden variables, so we can test
7516      # for unknown variables in the end.
7517      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7518
7519      # Check if we try to supply an empty value
7520      if test "x$ECHO" = x; then
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7522$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7524$as_echo_n "checking for ECHO... " >&6; }
7525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7526$as_echo "disabled" >&6; }
7527      else
7528        # Check if the provided tool contains a complete path.
7529        tool_specified="$ECHO"
7530        tool_basename="${tool_specified##*/}"
7531        if test "x$tool_basename" = "x$tool_specified"; then
7532          # A command without a complete path is provided, search $PATH.
7533          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7534$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7535          # Extract the first word of "$tool_basename", so it can be a program name with args.
7536set dummy $tool_basename; ac_word=$2
7537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7538$as_echo_n "checking for $ac_word... " >&6; }
7539if ${ac_cv_path_ECHO+:} false; then :
7540  $as_echo_n "(cached) " >&6
7541else
7542  case $ECHO in
7543  [\\/]* | ?:[\\/]*)
7544  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7545  ;;
7546  *)
7547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7548for as_dir in $PATH
7549do
7550  IFS=$as_save_IFS
7551  test -z "$as_dir" && as_dir=.
7552    for ac_exec_ext in '' $ac_executable_extensions; do
7553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7554    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7556    break 2
7557  fi
7558done
7559  done
7560IFS=$as_save_IFS
7561
7562  ;;
7563esac
7564fi
7565ECHO=$ac_cv_path_ECHO
7566if test -n "$ECHO"; then
7567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7568$as_echo "$ECHO" >&6; }
7569else
7570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7571$as_echo "no" >&6; }
7572fi
7573
7574
7575          if test "x$ECHO" = x; then
7576            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7577          fi
7578        else
7579          # Otherwise we believe it is a complete path. Use it as it is.
7580          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7581$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7582          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7583$as_echo_n "checking for ECHO... " >&6; }
7584          if test ! -x "$tool_specified"; then
7585            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7586$as_echo "not found" >&6; }
7587            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7588          fi
7589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7590$as_echo "$tool_specified" >&6; }
7591        fi
7592      fi
7593    fi
7594
7595  fi
7596
7597
7598
7599  if test "x$ECHO" = x; then
7600    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7601  fi
7602
7603
7604
7605
7606
7607  # Publish this variable in the help.
7608
7609
7610  if [ -z "${EXPR+x}" ]; then
7611    # The variable is not set by user, try to locate tool using the code snippet
7612    for ac_prog in expr
7613do
7614  # Extract the first word of "$ac_prog", so it can be a program name with args.
7615set dummy $ac_prog; ac_word=$2
7616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7617$as_echo_n "checking for $ac_word... " >&6; }
7618if ${ac_cv_path_EXPR+:} false; then :
7619  $as_echo_n "(cached) " >&6
7620else
7621  case $EXPR in
7622  [\\/]* | ?:[\\/]*)
7623  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7624  ;;
7625  *)
7626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7627for as_dir in $PATH
7628do
7629  IFS=$as_save_IFS
7630  test -z "$as_dir" && as_dir=.
7631    for ac_exec_ext in '' $ac_executable_extensions; do
7632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7633    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7635    break 2
7636  fi
7637done
7638  done
7639IFS=$as_save_IFS
7640
7641  ;;
7642esac
7643fi
7644EXPR=$ac_cv_path_EXPR
7645if test -n "$EXPR"; then
7646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7647$as_echo "$EXPR" >&6; }
7648else
7649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7650$as_echo "no" >&6; }
7651fi
7652
7653
7654  test -n "$EXPR" && break
7655done
7656
7657  else
7658    # The variable is set, but is it from the command line or the environment?
7659
7660    # Try to remove the string !EXPR! from our list.
7661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7663      # If it failed, the variable was not from the command line. Ignore it,
7664      # but warn the user (except for BASH, which is always set by the calling BASH).
7665      if test "xEXPR" != xBASH; then
7666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7667$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7668      fi
7669      # Try to locate tool using the code snippet
7670      for ac_prog in expr
7671do
7672  # Extract the first word of "$ac_prog", so it can be a program name with args.
7673set dummy $ac_prog; ac_word=$2
7674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7675$as_echo_n "checking for $ac_word... " >&6; }
7676if ${ac_cv_path_EXPR+:} false; then :
7677  $as_echo_n "(cached) " >&6
7678else
7679  case $EXPR in
7680  [\\/]* | ?:[\\/]*)
7681  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7682  ;;
7683  *)
7684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7685for as_dir in $PATH
7686do
7687  IFS=$as_save_IFS
7688  test -z "$as_dir" && as_dir=.
7689    for ac_exec_ext in '' $ac_executable_extensions; do
7690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7691    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7693    break 2
7694  fi
7695done
7696  done
7697IFS=$as_save_IFS
7698
7699  ;;
7700esac
7701fi
7702EXPR=$ac_cv_path_EXPR
7703if test -n "$EXPR"; then
7704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7705$as_echo "$EXPR" >&6; }
7706else
7707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7708$as_echo "no" >&6; }
7709fi
7710
7711
7712  test -n "$EXPR" && break
7713done
7714
7715    else
7716      # If it succeeded, then it was overridden by the user. We will use it
7717      # for the tool.
7718
7719      # First remove it from the list of overridden variables, so we can test
7720      # for unknown variables in the end.
7721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7722
7723      # Check if we try to supply an empty value
7724      if test "x$EXPR" = x; then
7725        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7726$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7728$as_echo_n "checking for EXPR... " >&6; }
7729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7730$as_echo "disabled" >&6; }
7731      else
7732        # Check if the provided tool contains a complete path.
7733        tool_specified="$EXPR"
7734        tool_basename="${tool_specified##*/}"
7735        if test "x$tool_basename" = "x$tool_specified"; then
7736          # A command without a complete path is provided, search $PATH.
7737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7738$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7739          # Extract the first word of "$tool_basename", so it can be a program name with args.
7740set dummy $tool_basename; ac_word=$2
7741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7742$as_echo_n "checking for $ac_word... " >&6; }
7743if ${ac_cv_path_EXPR+:} false; then :
7744  $as_echo_n "(cached) " >&6
7745else
7746  case $EXPR in
7747  [\\/]* | ?:[\\/]*)
7748  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7749  ;;
7750  *)
7751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7752for as_dir in $PATH
7753do
7754  IFS=$as_save_IFS
7755  test -z "$as_dir" && as_dir=.
7756    for ac_exec_ext in '' $ac_executable_extensions; do
7757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7758    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7760    break 2
7761  fi
7762done
7763  done
7764IFS=$as_save_IFS
7765
7766  ;;
7767esac
7768fi
7769EXPR=$ac_cv_path_EXPR
7770if test -n "$EXPR"; then
7771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7772$as_echo "$EXPR" >&6; }
7773else
7774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7775$as_echo "no" >&6; }
7776fi
7777
7778
7779          if test "x$EXPR" = x; then
7780            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7781          fi
7782        else
7783          # Otherwise we believe it is a complete path. Use it as it is.
7784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7785$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7786          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7787$as_echo_n "checking for EXPR... " >&6; }
7788          if test ! -x "$tool_specified"; then
7789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7790$as_echo "not found" >&6; }
7791            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7792          fi
7793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7794$as_echo "$tool_specified" >&6; }
7795        fi
7796      fi
7797    fi
7798
7799  fi
7800
7801
7802
7803  if test "x$EXPR" = x; then
7804    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7805  fi
7806
7807
7808
7809
7810
7811  # Publish this variable in the help.
7812
7813
7814  if [ -z "${FILE+x}" ]; then
7815    # The variable is not set by user, try to locate tool using the code snippet
7816    for ac_prog in file
7817do
7818  # Extract the first word of "$ac_prog", so it can be a program name with args.
7819set dummy $ac_prog; ac_word=$2
7820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7821$as_echo_n "checking for $ac_word... " >&6; }
7822if ${ac_cv_path_FILE+:} false; then :
7823  $as_echo_n "(cached) " >&6
7824else
7825  case $FILE in
7826  [\\/]* | ?:[\\/]*)
7827  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7828  ;;
7829  *)
7830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7831for as_dir in $PATH
7832do
7833  IFS=$as_save_IFS
7834  test -z "$as_dir" && as_dir=.
7835    for ac_exec_ext in '' $ac_executable_extensions; do
7836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7837    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7839    break 2
7840  fi
7841done
7842  done
7843IFS=$as_save_IFS
7844
7845  ;;
7846esac
7847fi
7848FILE=$ac_cv_path_FILE
7849if test -n "$FILE"; then
7850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7851$as_echo "$FILE" >&6; }
7852else
7853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7854$as_echo "no" >&6; }
7855fi
7856
7857
7858  test -n "$FILE" && break
7859done
7860
7861  else
7862    # The variable is set, but is it from the command line or the environment?
7863
7864    # Try to remove the string !FILE! from our list.
7865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7867      # If it failed, the variable was not from the command line. Ignore it,
7868      # but warn the user (except for BASH, which is always set by the calling BASH).
7869      if test "xFILE" != xBASH; then
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7871$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7872      fi
7873      # Try to locate tool using the code snippet
7874      for ac_prog in file
7875do
7876  # Extract the first word of "$ac_prog", so it can be a program name with args.
7877set dummy $ac_prog; ac_word=$2
7878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7879$as_echo_n "checking for $ac_word... " >&6; }
7880if ${ac_cv_path_FILE+:} false; then :
7881  $as_echo_n "(cached) " >&6
7882else
7883  case $FILE in
7884  [\\/]* | ?:[\\/]*)
7885  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7886  ;;
7887  *)
7888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7889for as_dir in $PATH
7890do
7891  IFS=$as_save_IFS
7892  test -z "$as_dir" && as_dir=.
7893    for ac_exec_ext in '' $ac_executable_extensions; do
7894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7895    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7897    break 2
7898  fi
7899done
7900  done
7901IFS=$as_save_IFS
7902
7903  ;;
7904esac
7905fi
7906FILE=$ac_cv_path_FILE
7907if test -n "$FILE"; then
7908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7909$as_echo "$FILE" >&6; }
7910else
7911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7912$as_echo "no" >&6; }
7913fi
7914
7915
7916  test -n "$FILE" && break
7917done
7918
7919    else
7920      # If it succeeded, then it was overridden by the user. We will use it
7921      # for the tool.
7922
7923      # First remove it from the list of overridden variables, so we can test
7924      # for unknown variables in the end.
7925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7926
7927      # Check if we try to supply an empty value
7928      if test "x$FILE" = x; then
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7930$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7932$as_echo_n "checking for FILE... " >&6; }
7933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7934$as_echo "disabled" >&6; }
7935      else
7936        # Check if the provided tool contains a complete path.
7937        tool_specified="$FILE"
7938        tool_basename="${tool_specified##*/}"
7939        if test "x$tool_basename" = "x$tool_specified"; then
7940          # A command without a complete path is provided, search $PATH.
7941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7942$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7943          # Extract the first word of "$tool_basename", so it can be a program name with args.
7944set dummy $tool_basename; ac_word=$2
7945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7946$as_echo_n "checking for $ac_word... " >&6; }
7947if ${ac_cv_path_FILE+:} false; then :
7948  $as_echo_n "(cached) " >&6
7949else
7950  case $FILE in
7951  [\\/]* | ?:[\\/]*)
7952  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7953  ;;
7954  *)
7955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7956for as_dir in $PATH
7957do
7958  IFS=$as_save_IFS
7959  test -z "$as_dir" && as_dir=.
7960    for ac_exec_ext in '' $ac_executable_extensions; do
7961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7962    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7964    break 2
7965  fi
7966done
7967  done
7968IFS=$as_save_IFS
7969
7970  ;;
7971esac
7972fi
7973FILE=$ac_cv_path_FILE
7974if test -n "$FILE"; then
7975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7976$as_echo "$FILE" >&6; }
7977else
7978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7979$as_echo "no" >&6; }
7980fi
7981
7982
7983          if test "x$FILE" = x; then
7984            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7985          fi
7986        else
7987          # Otherwise we believe it is a complete path. Use it as it is.
7988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7989$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7990          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7991$as_echo_n "checking for FILE... " >&6; }
7992          if test ! -x "$tool_specified"; then
7993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7994$as_echo "not found" >&6; }
7995            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7996          fi
7997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7998$as_echo "$tool_specified" >&6; }
7999        fi
8000      fi
8001    fi
8002
8003  fi
8004
8005
8006
8007  if test "x$FILE" = x; then
8008    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8009  fi
8010
8011
8012
8013
8014
8015  # Publish this variable in the help.
8016
8017
8018  if [ -z "${FIND+x}" ]; then
8019    # The variable is not set by user, try to locate tool using the code snippet
8020    for ac_prog in find
8021do
8022  # Extract the first word of "$ac_prog", so it can be a program name with args.
8023set dummy $ac_prog; ac_word=$2
8024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8025$as_echo_n "checking for $ac_word... " >&6; }
8026if ${ac_cv_path_FIND+:} false; then :
8027  $as_echo_n "(cached) " >&6
8028else
8029  case $FIND in
8030  [\\/]* | ?:[\\/]*)
8031  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8032  ;;
8033  *)
8034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8035for as_dir in $PATH
8036do
8037  IFS=$as_save_IFS
8038  test -z "$as_dir" && as_dir=.
8039    for ac_exec_ext in '' $ac_executable_extensions; do
8040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8041    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8043    break 2
8044  fi
8045done
8046  done
8047IFS=$as_save_IFS
8048
8049  ;;
8050esac
8051fi
8052FIND=$ac_cv_path_FIND
8053if test -n "$FIND"; then
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8055$as_echo "$FIND" >&6; }
8056else
8057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8058$as_echo "no" >&6; }
8059fi
8060
8061
8062  test -n "$FIND" && break
8063done
8064
8065  else
8066    # The variable is set, but is it from the command line or the environment?
8067
8068    # Try to remove the string !FIND! from our list.
8069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8071      # If it failed, the variable was not from the command line. Ignore it,
8072      # but warn the user (except for BASH, which is always set by the calling BASH).
8073      if test "xFIND" != xBASH; then
8074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8075$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8076      fi
8077      # Try to locate tool using the code snippet
8078      for ac_prog in find
8079do
8080  # Extract the first word of "$ac_prog", so it can be a program name with args.
8081set dummy $ac_prog; ac_word=$2
8082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8083$as_echo_n "checking for $ac_word... " >&6; }
8084if ${ac_cv_path_FIND+:} false; then :
8085  $as_echo_n "(cached) " >&6
8086else
8087  case $FIND in
8088  [\\/]* | ?:[\\/]*)
8089  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8090  ;;
8091  *)
8092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8093for as_dir in $PATH
8094do
8095  IFS=$as_save_IFS
8096  test -z "$as_dir" && as_dir=.
8097    for ac_exec_ext in '' $ac_executable_extensions; do
8098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8099    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8101    break 2
8102  fi
8103done
8104  done
8105IFS=$as_save_IFS
8106
8107  ;;
8108esac
8109fi
8110FIND=$ac_cv_path_FIND
8111if test -n "$FIND"; then
8112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8113$as_echo "$FIND" >&6; }
8114else
8115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116$as_echo "no" >&6; }
8117fi
8118
8119
8120  test -n "$FIND" && break
8121done
8122
8123    else
8124      # If it succeeded, then it was overridden by the user. We will use it
8125      # for the tool.
8126
8127      # First remove it from the list of overridden variables, so we can test
8128      # for unknown variables in the end.
8129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8130
8131      # Check if we try to supply an empty value
8132      if test "x$FIND" = x; then
8133        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8134$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8136$as_echo_n "checking for FIND... " >&6; }
8137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8138$as_echo "disabled" >&6; }
8139      else
8140        # Check if the provided tool contains a complete path.
8141        tool_specified="$FIND"
8142        tool_basename="${tool_specified##*/}"
8143        if test "x$tool_basename" = "x$tool_specified"; then
8144          # A command without a complete path is provided, search $PATH.
8145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8146$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8147          # Extract the first word of "$tool_basename", so it can be a program name with args.
8148set dummy $tool_basename; ac_word=$2
8149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8150$as_echo_n "checking for $ac_word... " >&6; }
8151if ${ac_cv_path_FIND+:} false; then :
8152  $as_echo_n "(cached) " >&6
8153else
8154  case $FIND in
8155  [\\/]* | ?:[\\/]*)
8156  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8157  ;;
8158  *)
8159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8160for as_dir in $PATH
8161do
8162  IFS=$as_save_IFS
8163  test -z "$as_dir" && as_dir=.
8164    for ac_exec_ext in '' $ac_executable_extensions; do
8165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8166    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8168    break 2
8169  fi
8170done
8171  done
8172IFS=$as_save_IFS
8173
8174  ;;
8175esac
8176fi
8177FIND=$ac_cv_path_FIND
8178if test -n "$FIND"; then
8179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8180$as_echo "$FIND" >&6; }
8181else
8182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8183$as_echo "no" >&6; }
8184fi
8185
8186
8187          if test "x$FIND" = x; then
8188            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8189          fi
8190        else
8191          # Otherwise we believe it is a complete path. Use it as it is.
8192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8193$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8194          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8195$as_echo_n "checking for FIND... " >&6; }
8196          if test ! -x "$tool_specified"; then
8197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8198$as_echo "not found" >&6; }
8199            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8200          fi
8201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8202$as_echo "$tool_specified" >&6; }
8203        fi
8204      fi
8205    fi
8206
8207  fi
8208
8209
8210
8211  if test "x$FIND" = x; then
8212    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8213  fi
8214
8215
8216
8217
8218
8219  # Publish this variable in the help.
8220
8221
8222  if [ -z "${HEAD+x}" ]; then
8223    # The variable is not set by user, try to locate tool using the code snippet
8224    for ac_prog in head
8225do
8226  # Extract the first word of "$ac_prog", so it can be a program name with args.
8227set dummy $ac_prog; ac_word=$2
8228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8229$as_echo_n "checking for $ac_word... " >&6; }
8230if ${ac_cv_path_HEAD+:} false; then :
8231  $as_echo_n "(cached) " >&6
8232else
8233  case $HEAD in
8234  [\\/]* | ?:[\\/]*)
8235  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8236  ;;
8237  *)
8238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8239for as_dir in $PATH
8240do
8241  IFS=$as_save_IFS
8242  test -z "$as_dir" && as_dir=.
8243    for ac_exec_ext in '' $ac_executable_extensions; do
8244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8245    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8247    break 2
8248  fi
8249done
8250  done
8251IFS=$as_save_IFS
8252
8253  ;;
8254esac
8255fi
8256HEAD=$ac_cv_path_HEAD
8257if test -n "$HEAD"; then
8258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8259$as_echo "$HEAD" >&6; }
8260else
8261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8262$as_echo "no" >&6; }
8263fi
8264
8265
8266  test -n "$HEAD" && break
8267done
8268
8269  else
8270    # The variable is set, but is it from the command line or the environment?
8271
8272    # Try to remove the string !HEAD! from our list.
8273    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8274    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8275      # If it failed, the variable was not from the command line. Ignore it,
8276      # but warn the user (except for BASH, which is always set by the calling BASH).
8277      if test "xHEAD" != xBASH; then
8278        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8279$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8280      fi
8281      # Try to locate tool using the code snippet
8282      for ac_prog in head
8283do
8284  # Extract the first word of "$ac_prog", so it can be a program name with args.
8285set dummy $ac_prog; ac_word=$2
8286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8287$as_echo_n "checking for $ac_word... " >&6; }
8288if ${ac_cv_path_HEAD+:} false; then :
8289  $as_echo_n "(cached) " >&6
8290else
8291  case $HEAD in
8292  [\\/]* | ?:[\\/]*)
8293  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8294  ;;
8295  *)
8296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8297for as_dir in $PATH
8298do
8299  IFS=$as_save_IFS
8300  test -z "$as_dir" && as_dir=.
8301    for ac_exec_ext in '' $ac_executable_extensions; do
8302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8303    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8305    break 2
8306  fi
8307done
8308  done
8309IFS=$as_save_IFS
8310
8311  ;;
8312esac
8313fi
8314HEAD=$ac_cv_path_HEAD
8315if test -n "$HEAD"; then
8316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8317$as_echo "$HEAD" >&6; }
8318else
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8320$as_echo "no" >&6; }
8321fi
8322
8323
8324  test -n "$HEAD" && break
8325done
8326
8327    else
8328      # If it succeeded, then it was overridden by the user. We will use it
8329      # for the tool.
8330
8331      # First remove it from the list of overridden variables, so we can test
8332      # for unknown variables in the end.
8333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8334
8335      # Check if we try to supply an empty value
8336      if test "x$HEAD" = x; then
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8338$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8340$as_echo_n "checking for HEAD... " >&6; }
8341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8342$as_echo "disabled" >&6; }
8343      else
8344        # Check if the provided tool contains a complete path.
8345        tool_specified="$HEAD"
8346        tool_basename="${tool_specified##*/}"
8347        if test "x$tool_basename" = "x$tool_specified"; then
8348          # A command without a complete path is provided, search $PATH.
8349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8350$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8351          # Extract the first word of "$tool_basename", so it can be a program name with args.
8352set dummy $tool_basename; ac_word=$2
8353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8354$as_echo_n "checking for $ac_word... " >&6; }
8355if ${ac_cv_path_HEAD+:} false; then :
8356  $as_echo_n "(cached) " >&6
8357else
8358  case $HEAD in
8359  [\\/]* | ?:[\\/]*)
8360  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8361  ;;
8362  *)
8363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8364for as_dir in $PATH
8365do
8366  IFS=$as_save_IFS
8367  test -z "$as_dir" && as_dir=.
8368    for ac_exec_ext in '' $ac_executable_extensions; do
8369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8370    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8372    break 2
8373  fi
8374done
8375  done
8376IFS=$as_save_IFS
8377
8378  ;;
8379esac
8380fi
8381HEAD=$ac_cv_path_HEAD
8382if test -n "$HEAD"; then
8383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8384$as_echo "$HEAD" >&6; }
8385else
8386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8387$as_echo "no" >&6; }
8388fi
8389
8390
8391          if test "x$HEAD" = x; then
8392            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8393          fi
8394        else
8395          # Otherwise we believe it is a complete path. Use it as it is.
8396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8397$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8399$as_echo_n "checking for HEAD... " >&6; }
8400          if test ! -x "$tool_specified"; then
8401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8402$as_echo "not found" >&6; }
8403            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8404          fi
8405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8406$as_echo "$tool_specified" >&6; }
8407        fi
8408      fi
8409    fi
8410
8411  fi
8412
8413
8414
8415  if test "x$HEAD" = x; then
8416    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8417  fi
8418
8419
8420
8421
8422
8423  # Publish this variable in the help.
8424
8425
8426  if [ -z "${GUNZIP+x}" ]; then
8427    # The variable is not set by user, try to locate tool using the code snippet
8428    for ac_prog in gunzip
8429do
8430  # Extract the first word of "$ac_prog", so it can be a program name with args.
8431set dummy $ac_prog; ac_word=$2
8432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8433$as_echo_n "checking for $ac_word... " >&6; }
8434if ${ac_cv_path_GUNZIP+:} false; then :
8435  $as_echo_n "(cached) " >&6
8436else
8437  case $GUNZIP in
8438  [\\/]* | ?:[\\/]*)
8439  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8440  ;;
8441  *)
8442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8443for as_dir in $PATH
8444do
8445  IFS=$as_save_IFS
8446  test -z "$as_dir" && as_dir=.
8447    for ac_exec_ext in '' $ac_executable_extensions; do
8448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8449    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8451    break 2
8452  fi
8453done
8454  done
8455IFS=$as_save_IFS
8456
8457  ;;
8458esac
8459fi
8460GUNZIP=$ac_cv_path_GUNZIP
8461if test -n "$GUNZIP"; then
8462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8463$as_echo "$GUNZIP" >&6; }
8464else
8465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8466$as_echo "no" >&6; }
8467fi
8468
8469
8470  test -n "$GUNZIP" && break
8471done
8472
8473  else
8474    # The variable is set, but is it from the command line or the environment?
8475
8476    # Try to remove the string !GUNZIP! from our list.
8477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8479      # If it failed, the variable was not from the command line. Ignore it,
8480      # but warn the user (except for BASH, which is always set by the calling BASH).
8481      if test "xGUNZIP" != xBASH; then
8482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8483$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8484      fi
8485      # Try to locate tool using the code snippet
8486      for ac_prog in gunzip
8487do
8488  # Extract the first word of "$ac_prog", so it can be a program name with args.
8489set dummy $ac_prog; ac_word=$2
8490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8491$as_echo_n "checking for $ac_word... " >&6; }
8492if ${ac_cv_path_GUNZIP+:} false; then :
8493  $as_echo_n "(cached) " >&6
8494else
8495  case $GUNZIP in
8496  [\\/]* | ?:[\\/]*)
8497  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8498  ;;
8499  *)
8500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8501for as_dir in $PATH
8502do
8503  IFS=$as_save_IFS
8504  test -z "$as_dir" && as_dir=.
8505    for ac_exec_ext in '' $ac_executable_extensions; do
8506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8507    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8509    break 2
8510  fi
8511done
8512  done
8513IFS=$as_save_IFS
8514
8515  ;;
8516esac
8517fi
8518GUNZIP=$ac_cv_path_GUNZIP
8519if test -n "$GUNZIP"; then
8520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8521$as_echo "$GUNZIP" >&6; }
8522else
8523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8524$as_echo "no" >&6; }
8525fi
8526
8527
8528  test -n "$GUNZIP" && break
8529done
8530
8531    else
8532      # If it succeeded, then it was overridden by the user. We will use it
8533      # for the tool.
8534
8535      # First remove it from the list of overridden variables, so we can test
8536      # for unknown variables in the end.
8537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8538
8539      # Check if we try to supply an empty value
8540      if test "x$GUNZIP" = x; then
8541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8542$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8544$as_echo_n "checking for GUNZIP... " >&6; }
8545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8546$as_echo "disabled" >&6; }
8547      else
8548        # Check if the provided tool contains a complete path.
8549        tool_specified="$GUNZIP"
8550        tool_basename="${tool_specified##*/}"
8551        if test "x$tool_basename" = "x$tool_specified"; then
8552          # A command without a complete path is provided, search $PATH.
8553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8554$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8555          # Extract the first word of "$tool_basename", so it can be a program name with args.
8556set dummy $tool_basename; ac_word=$2
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8558$as_echo_n "checking for $ac_word... " >&6; }
8559if ${ac_cv_path_GUNZIP+:} false; then :
8560  $as_echo_n "(cached) " >&6
8561else
8562  case $GUNZIP in
8563  [\\/]* | ?:[\\/]*)
8564  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8565  ;;
8566  *)
8567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568for as_dir in $PATH
8569do
8570  IFS=$as_save_IFS
8571  test -z "$as_dir" && as_dir=.
8572    for ac_exec_ext in '' $ac_executable_extensions; do
8573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8574    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8576    break 2
8577  fi
8578done
8579  done
8580IFS=$as_save_IFS
8581
8582  ;;
8583esac
8584fi
8585GUNZIP=$ac_cv_path_GUNZIP
8586if test -n "$GUNZIP"; then
8587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8588$as_echo "$GUNZIP" >&6; }
8589else
8590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591$as_echo "no" >&6; }
8592fi
8593
8594
8595          if test "x$GUNZIP" = x; then
8596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8597          fi
8598        else
8599          # Otherwise we believe it is a complete path. Use it as it is.
8600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8601$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8603$as_echo_n "checking for GUNZIP... " >&6; }
8604          if test ! -x "$tool_specified"; then
8605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8606$as_echo "not found" >&6; }
8607            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8608          fi
8609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8610$as_echo "$tool_specified" >&6; }
8611        fi
8612      fi
8613    fi
8614
8615  fi
8616
8617
8618
8619  if test "x$GUNZIP" = x; then
8620    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8621  fi
8622
8623
8624
8625
8626
8627  # Publish this variable in the help.
8628
8629
8630  if [ -z "${GZIP+x}" ]; then
8631    # The variable is not set by user, try to locate tool using the code snippet
8632    for ac_prog in pigz gzip
8633do
8634  # Extract the first word of "$ac_prog", so it can be a program name with args.
8635set dummy $ac_prog; ac_word=$2
8636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8637$as_echo_n "checking for $ac_word... " >&6; }
8638if ${ac_cv_path_GZIP+:} false; then :
8639  $as_echo_n "(cached) " >&6
8640else
8641  case $GZIP in
8642  [\\/]* | ?:[\\/]*)
8643  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8644  ;;
8645  *)
8646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8647for as_dir in $PATH
8648do
8649  IFS=$as_save_IFS
8650  test -z "$as_dir" && as_dir=.
8651    for ac_exec_ext in '' $ac_executable_extensions; do
8652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8653    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8655    break 2
8656  fi
8657done
8658  done
8659IFS=$as_save_IFS
8660
8661  ;;
8662esac
8663fi
8664GZIP=$ac_cv_path_GZIP
8665if test -n "$GZIP"; then
8666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8667$as_echo "$GZIP" >&6; }
8668else
8669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8670$as_echo "no" >&6; }
8671fi
8672
8673
8674  test -n "$GZIP" && break
8675done
8676
8677  else
8678    # The variable is set, but is it from the command line or the environment?
8679
8680    # Try to remove the string !GZIP! from our list.
8681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8683      # If it failed, the variable was not from the command line. Ignore it,
8684      # but warn the user (except for BASH, which is always set by the calling BASH).
8685      if test "xGZIP" != xBASH; then
8686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8687$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8688      fi
8689      # Try to locate tool using the code snippet
8690      for ac_prog in pigz gzip
8691do
8692  # Extract the first word of "$ac_prog", so it can be a program name with args.
8693set dummy $ac_prog; ac_word=$2
8694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8695$as_echo_n "checking for $ac_word... " >&6; }
8696if ${ac_cv_path_GZIP+:} false; then :
8697  $as_echo_n "(cached) " >&6
8698else
8699  case $GZIP in
8700  [\\/]* | ?:[\\/]*)
8701  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8702  ;;
8703  *)
8704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8705for as_dir in $PATH
8706do
8707  IFS=$as_save_IFS
8708  test -z "$as_dir" && as_dir=.
8709    for ac_exec_ext in '' $ac_executable_extensions; do
8710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8711    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8713    break 2
8714  fi
8715done
8716  done
8717IFS=$as_save_IFS
8718
8719  ;;
8720esac
8721fi
8722GZIP=$ac_cv_path_GZIP
8723if test -n "$GZIP"; then
8724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8725$as_echo "$GZIP" >&6; }
8726else
8727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8728$as_echo "no" >&6; }
8729fi
8730
8731
8732  test -n "$GZIP" && break
8733done
8734
8735    else
8736      # If it succeeded, then it was overridden by the user. We will use it
8737      # for the tool.
8738
8739      # First remove it from the list of overridden variables, so we can test
8740      # for unknown variables in the end.
8741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8742
8743      # Check if we try to supply an empty value
8744      if test "x$GZIP" = x; then
8745        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8746$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8748$as_echo_n "checking for GZIP... " >&6; }
8749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8750$as_echo "disabled" >&6; }
8751      else
8752        # Check if the provided tool contains a complete path.
8753        tool_specified="$GZIP"
8754        tool_basename="${tool_specified##*/}"
8755        if test "x$tool_basename" = "x$tool_specified"; then
8756          # A command without a complete path is provided, search $PATH.
8757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8758$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8759          # Extract the first word of "$tool_basename", so it can be a program name with args.
8760set dummy $tool_basename; ac_word=$2
8761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8762$as_echo_n "checking for $ac_word... " >&6; }
8763if ${ac_cv_path_GZIP+:} false; then :
8764  $as_echo_n "(cached) " >&6
8765else
8766  case $GZIP in
8767  [\\/]* | ?:[\\/]*)
8768  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8769  ;;
8770  *)
8771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8772for as_dir in $PATH
8773do
8774  IFS=$as_save_IFS
8775  test -z "$as_dir" && as_dir=.
8776    for ac_exec_ext in '' $ac_executable_extensions; do
8777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8778    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8780    break 2
8781  fi
8782done
8783  done
8784IFS=$as_save_IFS
8785
8786  ;;
8787esac
8788fi
8789GZIP=$ac_cv_path_GZIP
8790if test -n "$GZIP"; then
8791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8792$as_echo "$GZIP" >&6; }
8793else
8794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8795$as_echo "no" >&6; }
8796fi
8797
8798
8799          if test "x$GZIP" = x; then
8800            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8801          fi
8802        else
8803          # Otherwise we believe it is a complete path. Use it as it is.
8804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8805$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8806          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8807$as_echo_n "checking for GZIP... " >&6; }
8808          if test ! -x "$tool_specified"; then
8809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8810$as_echo "not found" >&6; }
8811            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8812          fi
8813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8814$as_echo "$tool_specified" >&6; }
8815        fi
8816      fi
8817    fi
8818
8819  fi
8820
8821
8822
8823  if test "x$GZIP" = x; then
8824    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8825  fi
8826
8827
8828
8829
8830
8831  # Publish this variable in the help.
8832
8833
8834  if [ -z "${LN+x}" ]; then
8835    # The variable is not set by user, try to locate tool using the code snippet
8836    for ac_prog in ln
8837do
8838  # Extract the first word of "$ac_prog", so it can be a program name with args.
8839set dummy $ac_prog; ac_word=$2
8840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8841$as_echo_n "checking for $ac_word... " >&6; }
8842if ${ac_cv_path_LN+:} false; then :
8843  $as_echo_n "(cached) " >&6
8844else
8845  case $LN in
8846  [\\/]* | ?:[\\/]*)
8847  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8848  ;;
8849  *)
8850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8851for as_dir in $PATH
8852do
8853  IFS=$as_save_IFS
8854  test -z "$as_dir" && as_dir=.
8855    for ac_exec_ext in '' $ac_executable_extensions; do
8856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8857    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8859    break 2
8860  fi
8861done
8862  done
8863IFS=$as_save_IFS
8864
8865  ;;
8866esac
8867fi
8868LN=$ac_cv_path_LN
8869if test -n "$LN"; then
8870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8871$as_echo "$LN" >&6; }
8872else
8873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8874$as_echo "no" >&6; }
8875fi
8876
8877
8878  test -n "$LN" && break
8879done
8880
8881  else
8882    # The variable is set, but is it from the command line or the environment?
8883
8884    # Try to remove the string !LN! from our list.
8885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8887      # If it failed, the variable was not from the command line. Ignore it,
8888      # but warn the user (except for BASH, which is always set by the calling BASH).
8889      if test "xLN" != xBASH; then
8890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8891$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8892      fi
8893      # Try to locate tool using the code snippet
8894      for ac_prog in ln
8895do
8896  # Extract the first word of "$ac_prog", so it can be a program name with args.
8897set dummy $ac_prog; ac_word=$2
8898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8899$as_echo_n "checking for $ac_word... " >&6; }
8900if ${ac_cv_path_LN+:} false; then :
8901  $as_echo_n "(cached) " >&6
8902else
8903  case $LN in
8904  [\\/]* | ?:[\\/]*)
8905  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8906  ;;
8907  *)
8908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8909for as_dir in $PATH
8910do
8911  IFS=$as_save_IFS
8912  test -z "$as_dir" && as_dir=.
8913    for ac_exec_ext in '' $ac_executable_extensions; do
8914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8915    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8917    break 2
8918  fi
8919done
8920  done
8921IFS=$as_save_IFS
8922
8923  ;;
8924esac
8925fi
8926LN=$ac_cv_path_LN
8927if test -n "$LN"; then
8928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8929$as_echo "$LN" >&6; }
8930else
8931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932$as_echo "no" >&6; }
8933fi
8934
8935
8936  test -n "$LN" && break
8937done
8938
8939    else
8940      # If it succeeded, then it was overridden by the user. We will use it
8941      # for the tool.
8942
8943      # First remove it from the list of overridden variables, so we can test
8944      # for unknown variables in the end.
8945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8946
8947      # Check if we try to supply an empty value
8948      if test "x$LN" = x; then
8949        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8950$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8952$as_echo_n "checking for LN... " >&6; }
8953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8954$as_echo "disabled" >&6; }
8955      else
8956        # Check if the provided tool contains a complete path.
8957        tool_specified="$LN"
8958        tool_basename="${tool_specified##*/}"
8959        if test "x$tool_basename" = "x$tool_specified"; then
8960          # A command without a complete path is provided, search $PATH.
8961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8962$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8963          # Extract the first word of "$tool_basename", so it can be a program name with args.
8964set dummy $tool_basename; ac_word=$2
8965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8966$as_echo_n "checking for $ac_word... " >&6; }
8967if ${ac_cv_path_LN+:} false; then :
8968  $as_echo_n "(cached) " >&6
8969else
8970  case $LN in
8971  [\\/]* | ?:[\\/]*)
8972  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8973  ;;
8974  *)
8975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8976for as_dir in $PATH
8977do
8978  IFS=$as_save_IFS
8979  test -z "$as_dir" && as_dir=.
8980    for ac_exec_ext in '' $ac_executable_extensions; do
8981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8982    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8984    break 2
8985  fi
8986done
8987  done
8988IFS=$as_save_IFS
8989
8990  ;;
8991esac
8992fi
8993LN=$ac_cv_path_LN
8994if test -n "$LN"; then
8995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8996$as_echo "$LN" >&6; }
8997else
8998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8999$as_echo "no" >&6; }
9000fi
9001
9002
9003          if test "x$LN" = x; then
9004            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9005          fi
9006        else
9007          # Otherwise we believe it is a complete path. Use it as it is.
9008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9009$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9010          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9011$as_echo_n "checking for LN... " >&6; }
9012          if test ! -x "$tool_specified"; then
9013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9014$as_echo "not found" >&6; }
9015            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9016          fi
9017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9018$as_echo "$tool_specified" >&6; }
9019        fi
9020      fi
9021    fi
9022
9023  fi
9024
9025
9026
9027  if test "x$LN" = x; then
9028    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9029  fi
9030
9031
9032
9033
9034
9035  # Publish this variable in the help.
9036
9037
9038  if [ -z "${LS+x}" ]; then
9039    # The variable is not set by user, try to locate tool using the code snippet
9040    for ac_prog in ls
9041do
9042  # Extract the first word of "$ac_prog", so it can be a program name with args.
9043set dummy $ac_prog; ac_word=$2
9044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9045$as_echo_n "checking for $ac_word... " >&6; }
9046if ${ac_cv_path_LS+:} false; then :
9047  $as_echo_n "(cached) " >&6
9048else
9049  case $LS in
9050  [\\/]* | ?:[\\/]*)
9051  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9052  ;;
9053  *)
9054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9055for as_dir in $PATH
9056do
9057  IFS=$as_save_IFS
9058  test -z "$as_dir" && as_dir=.
9059    for ac_exec_ext in '' $ac_executable_extensions; do
9060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9061    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9063    break 2
9064  fi
9065done
9066  done
9067IFS=$as_save_IFS
9068
9069  ;;
9070esac
9071fi
9072LS=$ac_cv_path_LS
9073if test -n "$LS"; then
9074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9075$as_echo "$LS" >&6; }
9076else
9077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9078$as_echo "no" >&6; }
9079fi
9080
9081
9082  test -n "$LS" && break
9083done
9084
9085  else
9086    # The variable is set, but is it from the command line or the environment?
9087
9088    # Try to remove the string !LS! from our list.
9089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9091      # If it failed, the variable was not from the command line. Ignore it,
9092      # but warn the user (except for BASH, which is always set by the calling BASH).
9093      if test "xLS" != xBASH; then
9094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9095$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9096      fi
9097      # Try to locate tool using the code snippet
9098      for ac_prog in ls
9099do
9100  # Extract the first word of "$ac_prog", so it can be a program name with args.
9101set dummy $ac_prog; ac_word=$2
9102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9103$as_echo_n "checking for $ac_word... " >&6; }
9104if ${ac_cv_path_LS+:} false; then :
9105  $as_echo_n "(cached) " >&6
9106else
9107  case $LS in
9108  [\\/]* | ?:[\\/]*)
9109  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9110  ;;
9111  *)
9112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9113for as_dir in $PATH
9114do
9115  IFS=$as_save_IFS
9116  test -z "$as_dir" && as_dir=.
9117    for ac_exec_ext in '' $ac_executable_extensions; do
9118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9119    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9121    break 2
9122  fi
9123done
9124  done
9125IFS=$as_save_IFS
9126
9127  ;;
9128esac
9129fi
9130LS=$ac_cv_path_LS
9131if test -n "$LS"; then
9132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9133$as_echo "$LS" >&6; }
9134else
9135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136$as_echo "no" >&6; }
9137fi
9138
9139
9140  test -n "$LS" && break
9141done
9142
9143    else
9144      # If it succeeded, then it was overridden by the user. We will use it
9145      # for the tool.
9146
9147      # First remove it from the list of overridden variables, so we can test
9148      # for unknown variables in the end.
9149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9150
9151      # Check if we try to supply an empty value
9152      if test "x$LS" = x; then
9153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9154$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9156$as_echo_n "checking for LS... " >&6; }
9157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9158$as_echo "disabled" >&6; }
9159      else
9160        # Check if the provided tool contains a complete path.
9161        tool_specified="$LS"
9162        tool_basename="${tool_specified##*/}"
9163        if test "x$tool_basename" = "x$tool_specified"; then
9164          # A command without a complete path is provided, search $PATH.
9165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9166$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9167          # Extract the first word of "$tool_basename", so it can be a program name with args.
9168set dummy $tool_basename; ac_word=$2
9169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9170$as_echo_n "checking for $ac_word... " >&6; }
9171if ${ac_cv_path_LS+:} false; then :
9172  $as_echo_n "(cached) " >&6
9173else
9174  case $LS in
9175  [\\/]* | ?:[\\/]*)
9176  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9177  ;;
9178  *)
9179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9180for as_dir in $PATH
9181do
9182  IFS=$as_save_IFS
9183  test -z "$as_dir" && as_dir=.
9184    for ac_exec_ext in '' $ac_executable_extensions; do
9185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9186    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9188    break 2
9189  fi
9190done
9191  done
9192IFS=$as_save_IFS
9193
9194  ;;
9195esac
9196fi
9197LS=$ac_cv_path_LS
9198if test -n "$LS"; then
9199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9200$as_echo "$LS" >&6; }
9201else
9202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203$as_echo "no" >&6; }
9204fi
9205
9206
9207          if test "x$LS" = x; then
9208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9209          fi
9210        else
9211          # Otherwise we believe it is a complete path. Use it as it is.
9212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9213$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9215$as_echo_n "checking for LS... " >&6; }
9216          if test ! -x "$tool_specified"; then
9217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9218$as_echo "not found" >&6; }
9219            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9220          fi
9221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9222$as_echo "$tool_specified" >&6; }
9223        fi
9224      fi
9225    fi
9226
9227  fi
9228
9229
9230
9231  if test "x$LS" = x; then
9232    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9233  fi
9234
9235
9236
9237
9238
9239  # Publish this variable in the help.
9240
9241
9242  if [ -z "${MKDIR+x}" ]; then
9243    # The variable is not set by user, try to locate tool using the code snippet
9244    for ac_prog in mkdir
9245do
9246  # Extract the first word of "$ac_prog", so it can be a program name with args.
9247set dummy $ac_prog; ac_word=$2
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9249$as_echo_n "checking for $ac_word... " >&6; }
9250if ${ac_cv_path_MKDIR+:} false; then :
9251  $as_echo_n "(cached) " >&6
9252else
9253  case $MKDIR in
9254  [\\/]* | ?:[\\/]*)
9255  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9256  ;;
9257  *)
9258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9259for as_dir in $PATH
9260do
9261  IFS=$as_save_IFS
9262  test -z "$as_dir" && as_dir=.
9263    for ac_exec_ext in '' $ac_executable_extensions; do
9264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9265    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9267    break 2
9268  fi
9269done
9270  done
9271IFS=$as_save_IFS
9272
9273  ;;
9274esac
9275fi
9276MKDIR=$ac_cv_path_MKDIR
9277if test -n "$MKDIR"; then
9278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9279$as_echo "$MKDIR" >&6; }
9280else
9281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282$as_echo "no" >&6; }
9283fi
9284
9285
9286  test -n "$MKDIR" && break
9287done
9288
9289  else
9290    # The variable is set, but is it from the command line or the environment?
9291
9292    # Try to remove the string !MKDIR! from our list.
9293    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9294    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9295      # If it failed, the variable was not from the command line. Ignore it,
9296      # but warn the user (except for BASH, which is always set by the calling BASH).
9297      if test "xMKDIR" != xBASH; then
9298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9299$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9300      fi
9301      # Try to locate tool using the code snippet
9302      for ac_prog in mkdir
9303do
9304  # Extract the first word of "$ac_prog", so it can be a program name with args.
9305set dummy $ac_prog; ac_word=$2
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9307$as_echo_n "checking for $ac_word... " >&6; }
9308if ${ac_cv_path_MKDIR+:} false; then :
9309  $as_echo_n "(cached) " >&6
9310else
9311  case $MKDIR in
9312  [\\/]* | ?:[\\/]*)
9313  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9314  ;;
9315  *)
9316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9317for as_dir in $PATH
9318do
9319  IFS=$as_save_IFS
9320  test -z "$as_dir" && as_dir=.
9321    for ac_exec_ext in '' $ac_executable_extensions; do
9322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9323    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9325    break 2
9326  fi
9327done
9328  done
9329IFS=$as_save_IFS
9330
9331  ;;
9332esac
9333fi
9334MKDIR=$ac_cv_path_MKDIR
9335if test -n "$MKDIR"; then
9336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9337$as_echo "$MKDIR" >&6; }
9338else
9339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9340$as_echo "no" >&6; }
9341fi
9342
9343
9344  test -n "$MKDIR" && break
9345done
9346
9347    else
9348      # If it succeeded, then it was overridden by the user. We will use it
9349      # for the tool.
9350
9351      # First remove it from the list of overridden variables, so we can test
9352      # for unknown variables in the end.
9353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9354
9355      # Check if we try to supply an empty value
9356      if test "x$MKDIR" = x; then
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9358$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9360$as_echo_n "checking for MKDIR... " >&6; }
9361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9362$as_echo "disabled" >&6; }
9363      else
9364        # Check if the provided tool contains a complete path.
9365        tool_specified="$MKDIR"
9366        tool_basename="${tool_specified##*/}"
9367        if test "x$tool_basename" = "x$tool_specified"; then
9368          # A command without a complete path is provided, search $PATH.
9369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9370$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9371          # Extract the first word of "$tool_basename", so it can be a program name with args.
9372set dummy $tool_basename; ac_word=$2
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9374$as_echo_n "checking for $ac_word... " >&6; }
9375if ${ac_cv_path_MKDIR+:} false; then :
9376  $as_echo_n "(cached) " >&6
9377else
9378  case $MKDIR in
9379  [\\/]* | ?:[\\/]*)
9380  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9381  ;;
9382  *)
9383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9384for as_dir in $PATH
9385do
9386  IFS=$as_save_IFS
9387  test -z "$as_dir" && as_dir=.
9388    for ac_exec_ext in '' $ac_executable_extensions; do
9389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9390    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9392    break 2
9393  fi
9394done
9395  done
9396IFS=$as_save_IFS
9397
9398  ;;
9399esac
9400fi
9401MKDIR=$ac_cv_path_MKDIR
9402if test -n "$MKDIR"; then
9403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9404$as_echo "$MKDIR" >&6; }
9405else
9406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9407$as_echo "no" >&6; }
9408fi
9409
9410
9411          if test "x$MKDIR" = x; then
9412            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9413          fi
9414        else
9415          # Otherwise we believe it is a complete path. Use it as it is.
9416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9417$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9418          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9419$as_echo_n "checking for MKDIR... " >&6; }
9420          if test ! -x "$tool_specified"; then
9421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9422$as_echo "not found" >&6; }
9423            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9424          fi
9425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9426$as_echo "$tool_specified" >&6; }
9427        fi
9428      fi
9429    fi
9430
9431  fi
9432
9433
9434
9435  if test "x$MKDIR" = x; then
9436    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9437  fi
9438
9439
9440
9441
9442
9443  # Publish this variable in the help.
9444
9445
9446  if [ -z "${MKTEMP+x}" ]; then
9447    # The variable is not set by user, try to locate tool using the code snippet
9448    for ac_prog in mktemp
9449do
9450  # Extract the first word of "$ac_prog", so it can be a program name with args.
9451set dummy $ac_prog; ac_word=$2
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9453$as_echo_n "checking for $ac_word... " >&6; }
9454if ${ac_cv_path_MKTEMP+:} false; then :
9455  $as_echo_n "(cached) " >&6
9456else
9457  case $MKTEMP in
9458  [\\/]* | ?:[\\/]*)
9459  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9460  ;;
9461  *)
9462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9463for as_dir in $PATH
9464do
9465  IFS=$as_save_IFS
9466  test -z "$as_dir" && as_dir=.
9467    for ac_exec_ext in '' $ac_executable_extensions; do
9468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9469    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9471    break 2
9472  fi
9473done
9474  done
9475IFS=$as_save_IFS
9476
9477  ;;
9478esac
9479fi
9480MKTEMP=$ac_cv_path_MKTEMP
9481if test -n "$MKTEMP"; then
9482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9483$as_echo "$MKTEMP" >&6; }
9484else
9485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486$as_echo "no" >&6; }
9487fi
9488
9489
9490  test -n "$MKTEMP" && break
9491done
9492
9493  else
9494    # The variable is set, but is it from the command line or the environment?
9495
9496    # Try to remove the string !MKTEMP! from our list.
9497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9499      # If it failed, the variable was not from the command line. Ignore it,
9500      # but warn the user (except for BASH, which is always set by the calling BASH).
9501      if test "xMKTEMP" != xBASH; then
9502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9503$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9504      fi
9505      # Try to locate tool using the code snippet
9506      for ac_prog in mktemp
9507do
9508  # Extract the first word of "$ac_prog", so it can be a program name with args.
9509set dummy $ac_prog; ac_word=$2
9510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9511$as_echo_n "checking for $ac_word... " >&6; }
9512if ${ac_cv_path_MKTEMP+:} false; then :
9513  $as_echo_n "(cached) " >&6
9514else
9515  case $MKTEMP in
9516  [\\/]* | ?:[\\/]*)
9517  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9518  ;;
9519  *)
9520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9521for as_dir in $PATH
9522do
9523  IFS=$as_save_IFS
9524  test -z "$as_dir" && as_dir=.
9525    for ac_exec_ext in '' $ac_executable_extensions; do
9526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9527    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9529    break 2
9530  fi
9531done
9532  done
9533IFS=$as_save_IFS
9534
9535  ;;
9536esac
9537fi
9538MKTEMP=$ac_cv_path_MKTEMP
9539if test -n "$MKTEMP"; then
9540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9541$as_echo "$MKTEMP" >&6; }
9542else
9543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9544$as_echo "no" >&6; }
9545fi
9546
9547
9548  test -n "$MKTEMP" && break
9549done
9550
9551    else
9552      # If it succeeded, then it was overridden by the user. We will use it
9553      # for the tool.
9554
9555      # First remove it from the list of overridden variables, so we can test
9556      # for unknown variables in the end.
9557      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9558
9559      # Check if we try to supply an empty value
9560      if test "x$MKTEMP" = x; then
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9562$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9563        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9564$as_echo_n "checking for MKTEMP... " >&6; }
9565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9566$as_echo "disabled" >&6; }
9567      else
9568        # Check if the provided tool contains a complete path.
9569        tool_specified="$MKTEMP"
9570        tool_basename="${tool_specified##*/}"
9571        if test "x$tool_basename" = "x$tool_specified"; then
9572          # A command without a complete path is provided, search $PATH.
9573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9574$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9575          # Extract the first word of "$tool_basename", so it can be a program name with args.
9576set dummy $tool_basename; ac_word=$2
9577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9578$as_echo_n "checking for $ac_word... " >&6; }
9579if ${ac_cv_path_MKTEMP+:} false; then :
9580  $as_echo_n "(cached) " >&6
9581else
9582  case $MKTEMP in
9583  [\\/]* | ?:[\\/]*)
9584  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9585  ;;
9586  *)
9587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9588for as_dir in $PATH
9589do
9590  IFS=$as_save_IFS
9591  test -z "$as_dir" && as_dir=.
9592    for ac_exec_ext in '' $ac_executable_extensions; do
9593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9594    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9596    break 2
9597  fi
9598done
9599  done
9600IFS=$as_save_IFS
9601
9602  ;;
9603esac
9604fi
9605MKTEMP=$ac_cv_path_MKTEMP
9606if test -n "$MKTEMP"; then
9607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9608$as_echo "$MKTEMP" >&6; }
9609else
9610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611$as_echo "no" >&6; }
9612fi
9613
9614
9615          if test "x$MKTEMP" = x; then
9616            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9617          fi
9618        else
9619          # Otherwise we believe it is a complete path. Use it as it is.
9620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9621$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9622          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9623$as_echo_n "checking for MKTEMP... " >&6; }
9624          if test ! -x "$tool_specified"; then
9625            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9626$as_echo "not found" >&6; }
9627            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9628          fi
9629          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9630$as_echo "$tool_specified" >&6; }
9631        fi
9632      fi
9633    fi
9634
9635  fi
9636
9637
9638
9639  if test "x$MKTEMP" = x; then
9640    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9641  fi
9642
9643
9644
9645
9646
9647  # Publish this variable in the help.
9648
9649
9650  if [ -z "${MV+x}" ]; then
9651    # The variable is not set by user, try to locate tool using the code snippet
9652    for ac_prog in mv
9653do
9654  # Extract the first word of "$ac_prog", so it can be a program name with args.
9655set dummy $ac_prog; ac_word=$2
9656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9657$as_echo_n "checking for $ac_word... " >&6; }
9658if ${ac_cv_path_MV+:} false; then :
9659  $as_echo_n "(cached) " >&6
9660else
9661  case $MV in
9662  [\\/]* | ?:[\\/]*)
9663  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9664  ;;
9665  *)
9666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9667for as_dir in $PATH
9668do
9669  IFS=$as_save_IFS
9670  test -z "$as_dir" && as_dir=.
9671    for ac_exec_ext in '' $ac_executable_extensions; do
9672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9673    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9675    break 2
9676  fi
9677done
9678  done
9679IFS=$as_save_IFS
9680
9681  ;;
9682esac
9683fi
9684MV=$ac_cv_path_MV
9685if test -n "$MV"; then
9686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9687$as_echo "$MV" >&6; }
9688else
9689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9690$as_echo "no" >&6; }
9691fi
9692
9693
9694  test -n "$MV" && break
9695done
9696
9697  else
9698    # The variable is set, but is it from the command line or the environment?
9699
9700    # Try to remove the string !MV! from our list.
9701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9703      # If it failed, the variable was not from the command line. Ignore it,
9704      # but warn the user (except for BASH, which is always set by the calling BASH).
9705      if test "xMV" != xBASH; then
9706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9707$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9708      fi
9709      # Try to locate tool using the code snippet
9710      for ac_prog in mv
9711do
9712  # Extract the first word of "$ac_prog", so it can be a program name with args.
9713set dummy $ac_prog; ac_word=$2
9714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9715$as_echo_n "checking for $ac_word... " >&6; }
9716if ${ac_cv_path_MV+:} false; then :
9717  $as_echo_n "(cached) " >&6
9718else
9719  case $MV in
9720  [\\/]* | ?:[\\/]*)
9721  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9722  ;;
9723  *)
9724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9725for as_dir in $PATH
9726do
9727  IFS=$as_save_IFS
9728  test -z "$as_dir" && as_dir=.
9729    for ac_exec_ext in '' $ac_executable_extensions; do
9730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9731    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9733    break 2
9734  fi
9735done
9736  done
9737IFS=$as_save_IFS
9738
9739  ;;
9740esac
9741fi
9742MV=$ac_cv_path_MV
9743if test -n "$MV"; then
9744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9745$as_echo "$MV" >&6; }
9746else
9747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748$as_echo "no" >&6; }
9749fi
9750
9751
9752  test -n "$MV" && break
9753done
9754
9755    else
9756      # If it succeeded, then it was overridden by the user. We will use it
9757      # for the tool.
9758
9759      # First remove it from the list of overridden variables, so we can test
9760      # for unknown variables in the end.
9761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9762
9763      # Check if we try to supply an empty value
9764      if test "x$MV" = x; then
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9766$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9768$as_echo_n "checking for MV... " >&6; }
9769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9770$as_echo "disabled" >&6; }
9771      else
9772        # Check if the provided tool contains a complete path.
9773        tool_specified="$MV"
9774        tool_basename="${tool_specified##*/}"
9775        if test "x$tool_basename" = "x$tool_specified"; then
9776          # A command without a complete path is provided, search $PATH.
9777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9778$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9779          # Extract the first word of "$tool_basename", so it can be a program name with args.
9780set dummy $tool_basename; ac_word=$2
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9782$as_echo_n "checking for $ac_word... " >&6; }
9783if ${ac_cv_path_MV+:} false; then :
9784  $as_echo_n "(cached) " >&6
9785else
9786  case $MV in
9787  [\\/]* | ?:[\\/]*)
9788  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9789  ;;
9790  *)
9791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9792for as_dir in $PATH
9793do
9794  IFS=$as_save_IFS
9795  test -z "$as_dir" && as_dir=.
9796    for ac_exec_ext in '' $ac_executable_extensions; do
9797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9798    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9800    break 2
9801  fi
9802done
9803  done
9804IFS=$as_save_IFS
9805
9806  ;;
9807esac
9808fi
9809MV=$ac_cv_path_MV
9810if test -n "$MV"; then
9811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9812$as_echo "$MV" >&6; }
9813else
9814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815$as_echo "no" >&6; }
9816fi
9817
9818
9819          if test "x$MV" = x; then
9820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9821          fi
9822        else
9823          # Otherwise we believe it is a complete path. Use it as it is.
9824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9825$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9827$as_echo_n "checking for MV... " >&6; }
9828          if test ! -x "$tool_specified"; then
9829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9830$as_echo "not found" >&6; }
9831            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9832          fi
9833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9834$as_echo "$tool_specified" >&6; }
9835        fi
9836      fi
9837    fi
9838
9839  fi
9840
9841
9842
9843  if test "x$MV" = x; then
9844    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9845  fi
9846
9847
9848
9849
9850
9851  # Publish this variable in the help.
9852
9853
9854  if [ -z "${NAWK+x}" ]; then
9855    # The variable is not set by user, try to locate tool using the code snippet
9856    for ac_prog in nawk gawk awk
9857do
9858  # Extract the first word of "$ac_prog", so it can be a program name with args.
9859set dummy $ac_prog; ac_word=$2
9860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9861$as_echo_n "checking for $ac_word... " >&6; }
9862if ${ac_cv_path_NAWK+:} false; then :
9863  $as_echo_n "(cached) " >&6
9864else
9865  case $NAWK in
9866  [\\/]* | ?:[\\/]*)
9867  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9868  ;;
9869  *)
9870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9871for as_dir in $PATH
9872do
9873  IFS=$as_save_IFS
9874  test -z "$as_dir" && as_dir=.
9875    for ac_exec_ext in '' $ac_executable_extensions; do
9876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9877    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9879    break 2
9880  fi
9881done
9882  done
9883IFS=$as_save_IFS
9884
9885  ;;
9886esac
9887fi
9888NAWK=$ac_cv_path_NAWK
9889if test -n "$NAWK"; then
9890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9891$as_echo "$NAWK" >&6; }
9892else
9893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9894$as_echo "no" >&6; }
9895fi
9896
9897
9898  test -n "$NAWK" && break
9899done
9900
9901  else
9902    # The variable is set, but is it from the command line or the environment?
9903
9904    # Try to remove the string !NAWK! from our list.
9905    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9906    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9907      # If it failed, the variable was not from the command line. Ignore it,
9908      # but warn the user (except for BASH, which is always set by the calling BASH).
9909      if test "xNAWK" != xBASH; then
9910        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9911$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9912      fi
9913      # Try to locate tool using the code snippet
9914      for ac_prog in nawk gawk awk
9915do
9916  # Extract the first word of "$ac_prog", so it can be a program name with args.
9917set dummy $ac_prog; ac_word=$2
9918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9919$as_echo_n "checking for $ac_word... " >&6; }
9920if ${ac_cv_path_NAWK+:} false; then :
9921  $as_echo_n "(cached) " >&6
9922else
9923  case $NAWK in
9924  [\\/]* | ?:[\\/]*)
9925  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9926  ;;
9927  *)
9928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9929for as_dir in $PATH
9930do
9931  IFS=$as_save_IFS
9932  test -z "$as_dir" && as_dir=.
9933    for ac_exec_ext in '' $ac_executable_extensions; do
9934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9935    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9937    break 2
9938  fi
9939done
9940  done
9941IFS=$as_save_IFS
9942
9943  ;;
9944esac
9945fi
9946NAWK=$ac_cv_path_NAWK
9947if test -n "$NAWK"; then
9948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9949$as_echo "$NAWK" >&6; }
9950else
9951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9952$as_echo "no" >&6; }
9953fi
9954
9955
9956  test -n "$NAWK" && break
9957done
9958
9959    else
9960      # If it succeeded, then it was overridden by the user. We will use it
9961      # for the tool.
9962
9963      # First remove it from the list of overridden variables, so we can test
9964      # for unknown variables in the end.
9965      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9966
9967      # Check if we try to supply an empty value
9968      if test "x$NAWK" = x; then
9969        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9970$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9972$as_echo_n "checking for NAWK... " >&6; }
9973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9974$as_echo "disabled" >&6; }
9975      else
9976        # Check if the provided tool contains a complete path.
9977        tool_specified="$NAWK"
9978        tool_basename="${tool_specified##*/}"
9979        if test "x$tool_basename" = "x$tool_specified"; then
9980          # A command without a complete path is provided, search $PATH.
9981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9982$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9983          # Extract the first word of "$tool_basename", so it can be a program name with args.
9984set dummy $tool_basename; ac_word=$2
9985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9986$as_echo_n "checking for $ac_word... " >&6; }
9987if ${ac_cv_path_NAWK+:} false; then :
9988  $as_echo_n "(cached) " >&6
9989else
9990  case $NAWK in
9991  [\\/]* | ?:[\\/]*)
9992  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9993  ;;
9994  *)
9995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9996for as_dir in $PATH
9997do
9998  IFS=$as_save_IFS
9999  test -z "$as_dir" && as_dir=.
10000    for ac_exec_ext in '' $ac_executable_extensions; do
10001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10002    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10004    break 2
10005  fi
10006done
10007  done
10008IFS=$as_save_IFS
10009
10010  ;;
10011esac
10012fi
10013NAWK=$ac_cv_path_NAWK
10014if test -n "$NAWK"; then
10015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10016$as_echo "$NAWK" >&6; }
10017else
10018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019$as_echo "no" >&6; }
10020fi
10021
10022
10023          if test "x$NAWK" = x; then
10024            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10025          fi
10026        else
10027          # Otherwise we believe it is a complete path. Use it as it is.
10028          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10029$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10030          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10031$as_echo_n "checking for NAWK... " >&6; }
10032          if test ! -x "$tool_specified"; then
10033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10034$as_echo "not found" >&6; }
10035            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10036          fi
10037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10038$as_echo "$tool_specified" >&6; }
10039        fi
10040      fi
10041    fi
10042
10043  fi
10044
10045
10046
10047  if test "x$NAWK" = x; then
10048    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10049  fi
10050
10051
10052
10053
10054
10055  # Publish this variable in the help.
10056
10057
10058  if [ -z "${PRINTF+x}" ]; then
10059    # The variable is not set by user, try to locate tool using the code snippet
10060    for ac_prog in printf
10061do
10062  # Extract the first word of "$ac_prog", so it can be a program name with args.
10063set dummy $ac_prog; ac_word=$2
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065$as_echo_n "checking for $ac_word... " >&6; }
10066if ${ac_cv_path_PRINTF+:} false; then :
10067  $as_echo_n "(cached) " >&6
10068else
10069  case $PRINTF in
10070  [\\/]* | ?:[\\/]*)
10071  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10072  ;;
10073  *)
10074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075for as_dir in $PATH
10076do
10077  IFS=$as_save_IFS
10078  test -z "$as_dir" && as_dir=.
10079    for ac_exec_ext in '' $ac_executable_extensions; do
10080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10081    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083    break 2
10084  fi
10085done
10086  done
10087IFS=$as_save_IFS
10088
10089  ;;
10090esac
10091fi
10092PRINTF=$ac_cv_path_PRINTF
10093if test -n "$PRINTF"; then
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10095$as_echo "$PRINTF" >&6; }
10096else
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
10099fi
10100
10101
10102  test -n "$PRINTF" && break
10103done
10104
10105  else
10106    # The variable is set, but is it from the command line or the environment?
10107
10108    # Try to remove the string !PRINTF! from our list.
10109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10111      # If it failed, the variable was not from the command line. Ignore it,
10112      # but warn the user (except for BASH, which is always set by the calling BASH).
10113      if test "xPRINTF" != xBASH; then
10114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10115$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10116      fi
10117      # Try to locate tool using the code snippet
10118      for ac_prog in printf
10119do
10120  # Extract the first word of "$ac_prog", so it can be a program name with args.
10121set dummy $ac_prog; ac_word=$2
10122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10123$as_echo_n "checking for $ac_word... " >&6; }
10124if ${ac_cv_path_PRINTF+:} false; then :
10125  $as_echo_n "(cached) " >&6
10126else
10127  case $PRINTF in
10128  [\\/]* | ?:[\\/]*)
10129  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10130  ;;
10131  *)
10132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10133for as_dir in $PATH
10134do
10135  IFS=$as_save_IFS
10136  test -z "$as_dir" && as_dir=.
10137    for ac_exec_ext in '' $ac_executable_extensions; do
10138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10139    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10141    break 2
10142  fi
10143done
10144  done
10145IFS=$as_save_IFS
10146
10147  ;;
10148esac
10149fi
10150PRINTF=$ac_cv_path_PRINTF
10151if test -n "$PRINTF"; then
10152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10153$as_echo "$PRINTF" >&6; }
10154else
10155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10156$as_echo "no" >&6; }
10157fi
10158
10159
10160  test -n "$PRINTF" && break
10161done
10162
10163    else
10164      # If it succeeded, then it was overridden by the user. We will use it
10165      # for the tool.
10166
10167      # First remove it from the list of overridden variables, so we can test
10168      # for unknown variables in the end.
10169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10170
10171      # Check if we try to supply an empty value
10172      if test "x$PRINTF" = x; then
10173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10174$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10176$as_echo_n "checking for PRINTF... " >&6; }
10177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10178$as_echo "disabled" >&6; }
10179      else
10180        # Check if the provided tool contains a complete path.
10181        tool_specified="$PRINTF"
10182        tool_basename="${tool_specified##*/}"
10183        if test "x$tool_basename" = "x$tool_specified"; then
10184          # A command without a complete path is provided, search $PATH.
10185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10186$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10187          # Extract the first word of "$tool_basename", so it can be a program name with args.
10188set dummy $tool_basename; ac_word=$2
10189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10190$as_echo_n "checking for $ac_word... " >&6; }
10191if ${ac_cv_path_PRINTF+:} false; then :
10192  $as_echo_n "(cached) " >&6
10193else
10194  case $PRINTF in
10195  [\\/]* | ?:[\\/]*)
10196  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10197  ;;
10198  *)
10199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10200for as_dir in $PATH
10201do
10202  IFS=$as_save_IFS
10203  test -z "$as_dir" && as_dir=.
10204    for ac_exec_ext in '' $ac_executable_extensions; do
10205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10206    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10208    break 2
10209  fi
10210done
10211  done
10212IFS=$as_save_IFS
10213
10214  ;;
10215esac
10216fi
10217PRINTF=$ac_cv_path_PRINTF
10218if test -n "$PRINTF"; then
10219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10220$as_echo "$PRINTF" >&6; }
10221else
10222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10223$as_echo "no" >&6; }
10224fi
10225
10226
10227          if test "x$PRINTF" = x; then
10228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10229          fi
10230        else
10231          # Otherwise we believe it is a complete path. Use it as it is.
10232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10233$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10235$as_echo_n "checking for PRINTF... " >&6; }
10236          if test ! -x "$tool_specified"; then
10237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10238$as_echo "not found" >&6; }
10239            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10240          fi
10241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10242$as_echo "$tool_specified" >&6; }
10243        fi
10244      fi
10245    fi
10246
10247  fi
10248
10249
10250
10251  if test "x$PRINTF" = x; then
10252    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10253  fi
10254
10255
10256
10257
10258
10259  # Publish this variable in the help.
10260
10261
10262  if [ -z "${RM+x}" ]; then
10263    # The variable is not set by user, try to locate tool using the code snippet
10264    for ac_prog in rm
10265do
10266  # Extract the first word of "$ac_prog", so it can be a program name with args.
10267set dummy $ac_prog; ac_word=$2
10268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10269$as_echo_n "checking for $ac_word... " >&6; }
10270if ${ac_cv_path_RM+:} false; then :
10271  $as_echo_n "(cached) " >&6
10272else
10273  case $RM in
10274  [\\/]* | ?:[\\/]*)
10275  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10276  ;;
10277  *)
10278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10279for as_dir in $PATH
10280do
10281  IFS=$as_save_IFS
10282  test -z "$as_dir" && as_dir=.
10283    for ac_exec_ext in '' $ac_executable_extensions; do
10284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10285    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10287    break 2
10288  fi
10289done
10290  done
10291IFS=$as_save_IFS
10292
10293  ;;
10294esac
10295fi
10296RM=$ac_cv_path_RM
10297if test -n "$RM"; then
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10299$as_echo "$RM" >&6; }
10300else
10301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302$as_echo "no" >&6; }
10303fi
10304
10305
10306  test -n "$RM" && break
10307done
10308
10309  else
10310    # The variable is set, but is it from the command line or the environment?
10311
10312    # Try to remove the string !RM! from our list.
10313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10315      # If it failed, the variable was not from the command line. Ignore it,
10316      # but warn the user (except for BASH, which is always set by the calling BASH).
10317      if test "xRM" != xBASH; then
10318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10319$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10320      fi
10321      # Try to locate tool using the code snippet
10322      for ac_prog in rm
10323do
10324  # Extract the first word of "$ac_prog", so it can be a program name with args.
10325set dummy $ac_prog; ac_word=$2
10326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10327$as_echo_n "checking for $ac_word... " >&6; }
10328if ${ac_cv_path_RM+:} false; then :
10329  $as_echo_n "(cached) " >&6
10330else
10331  case $RM in
10332  [\\/]* | ?:[\\/]*)
10333  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10334  ;;
10335  *)
10336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10337for as_dir in $PATH
10338do
10339  IFS=$as_save_IFS
10340  test -z "$as_dir" && as_dir=.
10341    for ac_exec_ext in '' $ac_executable_extensions; do
10342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10343    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10345    break 2
10346  fi
10347done
10348  done
10349IFS=$as_save_IFS
10350
10351  ;;
10352esac
10353fi
10354RM=$ac_cv_path_RM
10355if test -n "$RM"; then
10356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10357$as_echo "$RM" >&6; }
10358else
10359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360$as_echo "no" >&6; }
10361fi
10362
10363
10364  test -n "$RM" && break
10365done
10366
10367    else
10368      # If it succeeded, then it was overridden by the user. We will use it
10369      # for the tool.
10370
10371      # First remove it from the list of overridden variables, so we can test
10372      # for unknown variables in the end.
10373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10374
10375      # Check if we try to supply an empty value
10376      if test "x$RM" = x; then
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10378$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10380$as_echo_n "checking for RM... " >&6; }
10381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10382$as_echo "disabled" >&6; }
10383      else
10384        # Check if the provided tool contains a complete path.
10385        tool_specified="$RM"
10386        tool_basename="${tool_specified##*/}"
10387        if test "x$tool_basename" = "x$tool_specified"; then
10388          # A command without a complete path is provided, search $PATH.
10389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10390$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10391          # Extract the first word of "$tool_basename", so it can be a program name with args.
10392set dummy $tool_basename; ac_word=$2
10393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10394$as_echo_n "checking for $ac_word... " >&6; }
10395if ${ac_cv_path_RM+:} false; then :
10396  $as_echo_n "(cached) " >&6
10397else
10398  case $RM in
10399  [\\/]* | ?:[\\/]*)
10400  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10401  ;;
10402  *)
10403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10404for as_dir in $PATH
10405do
10406  IFS=$as_save_IFS
10407  test -z "$as_dir" && as_dir=.
10408    for ac_exec_ext in '' $ac_executable_extensions; do
10409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10410    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10412    break 2
10413  fi
10414done
10415  done
10416IFS=$as_save_IFS
10417
10418  ;;
10419esac
10420fi
10421RM=$ac_cv_path_RM
10422if test -n "$RM"; then
10423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10424$as_echo "$RM" >&6; }
10425else
10426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427$as_echo "no" >&6; }
10428fi
10429
10430
10431          if test "x$RM" = x; then
10432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10433          fi
10434        else
10435          # Otherwise we believe it is a complete path. Use it as it is.
10436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10437$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10439$as_echo_n "checking for RM... " >&6; }
10440          if test ! -x "$tool_specified"; then
10441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10442$as_echo "not found" >&6; }
10443            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10444          fi
10445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10446$as_echo "$tool_specified" >&6; }
10447        fi
10448      fi
10449    fi
10450
10451  fi
10452
10453
10454
10455  if test "x$RM" = x; then
10456    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10457  fi
10458
10459
10460
10461
10462
10463  # Publish this variable in the help.
10464
10465
10466  if [ -z "${RMDIR+x}" ]; then
10467    # The variable is not set by user, try to locate tool using the code snippet
10468    for ac_prog in rmdir
10469do
10470  # Extract the first word of "$ac_prog", so it can be a program name with args.
10471set dummy $ac_prog; ac_word=$2
10472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10473$as_echo_n "checking for $ac_word... " >&6; }
10474if ${ac_cv_path_RMDIR+:} false; then :
10475  $as_echo_n "(cached) " >&6
10476else
10477  case $RMDIR in
10478  [\\/]* | ?:[\\/]*)
10479  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10480  ;;
10481  *)
10482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10483for as_dir in $PATH
10484do
10485  IFS=$as_save_IFS
10486  test -z "$as_dir" && as_dir=.
10487    for ac_exec_ext in '' $ac_executable_extensions; do
10488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10489    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10491    break 2
10492  fi
10493done
10494  done
10495IFS=$as_save_IFS
10496
10497  ;;
10498esac
10499fi
10500RMDIR=$ac_cv_path_RMDIR
10501if test -n "$RMDIR"; then
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10503$as_echo "$RMDIR" >&6; }
10504else
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506$as_echo "no" >&6; }
10507fi
10508
10509
10510  test -n "$RMDIR" && break
10511done
10512
10513  else
10514    # The variable is set, but is it from the command line or the environment?
10515
10516    # Try to remove the string !RMDIR! from our list.
10517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10519      # If it failed, the variable was not from the command line. Ignore it,
10520      # but warn the user (except for BASH, which is always set by the calling BASH).
10521      if test "xRMDIR" != xBASH; then
10522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10523$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10524      fi
10525      # Try to locate tool using the code snippet
10526      for ac_prog in rmdir
10527do
10528  # Extract the first word of "$ac_prog", so it can be a program name with args.
10529set dummy $ac_prog; ac_word=$2
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10531$as_echo_n "checking for $ac_word... " >&6; }
10532if ${ac_cv_path_RMDIR+:} false; then :
10533  $as_echo_n "(cached) " >&6
10534else
10535  case $RMDIR in
10536  [\\/]* | ?:[\\/]*)
10537  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10538  ;;
10539  *)
10540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10541for as_dir in $PATH
10542do
10543  IFS=$as_save_IFS
10544  test -z "$as_dir" && as_dir=.
10545    for ac_exec_ext in '' $ac_executable_extensions; do
10546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10547    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10549    break 2
10550  fi
10551done
10552  done
10553IFS=$as_save_IFS
10554
10555  ;;
10556esac
10557fi
10558RMDIR=$ac_cv_path_RMDIR
10559if test -n "$RMDIR"; then
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10561$as_echo "$RMDIR" >&6; }
10562else
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564$as_echo "no" >&6; }
10565fi
10566
10567
10568  test -n "$RMDIR" && break
10569done
10570
10571    else
10572      # If it succeeded, then it was overridden by the user. We will use it
10573      # for the tool.
10574
10575      # First remove it from the list of overridden variables, so we can test
10576      # for unknown variables in the end.
10577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10578
10579      # Check if we try to supply an empty value
10580      if test "x$RMDIR" = x; then
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10582$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10584$as_echo_n "checking for RMDIR... " >&6; }
10585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10586$as_echo "disabled" >&6; }
10587      else
10588        # Check if the provided tool contains a complete path.
10589        tool_specified="$RMDIR"
10590        tool_basename="${tool_specified##*/}"
10591        if test "x$tool_basename" = "x$tool_specified"; then
10592          # A command without a complete path is provided, search $PATH.
10593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10594$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10595          # Extract the first word of "$tool_basename", so it can be a program name with args.
10596set dummy $tool_basename; ac_word=$2
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10598$as_echo_n "checking for $ac_word... " >&6; }
10599if ${ac_cv_path_RMDIR+:} false; then :
10600  $as_echo_n "(cached) " >&6
10601else
10602  case $RMDIR in
10603  [\\/]* | ?:[\\/]*)
10604  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10605  ;;
10606  *)
10607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10608for as_dir in $PATH
10609do
10610  IFS=$as_save_IFS
10611  test -z "$as_dir" && as_dir=.
10612    for ac_exec_ext in '' $ac_executable_extensions; do
10613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10614    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10616    break 2
10617  fi
10618done
10619  done
10620IFS=$as_save_IFS
10621
10622  ;;
10623esac
10624fi
10625RMDIR=$ac_cv_path_RMDIR
10626if test -n "$RMDIR"; then
10627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10628$as_echo "$RMDIR" >&6; }
10629else
10630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10631$as_echo "no" >&6; }
10632fi
10633
10634
10635          if test "x$RMDIR" = x; then
10636            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10637          fi
10638        else
10639          # Otherwise we believe it is a complete path. Use it as it is.
10640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10641$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10642          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10643$as_echo_n "checking for RMDIR... " >&6; }
10644          if test ! -x "$tool_specified"; then
10645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10646$as_echo "not found" >&6; }
10647            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10648          fi
10649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10650$as_echo "$tool_specified" >&6; }
10651        fi
10652      fi
10653    fi
10654
10655  fi
10656
10657
10658
10659  if test "x$RMDIR" = x; then
10660    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10661  fi
10662
10663
10664
10665
10666
10667  # Publish this variable in the help.
10668
10669
10670  if [ -z "${SH+x}" ]; then
10671    # The variable is not set by user, try to locate tool using the code snippet
10672    for ac_prog in sh
10673do
10674  # Extract the first word of "$ac_prog", so it can be a program name with args.
10675set dummy $ac_prog; ac_word=$2
10676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10677$as_echo_n "checking for $ac_word... " >&6; }
10678if ${ac_cv_path_SH+:} false; then :
10679  $as_echo_n "(cached) " >&6
10680else
10681  case $SH in
10682  [\\/]* | ?:[\\/]*)
10683  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10684  ;;
10685  *)
10686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10687for as_dir in $PATH
10688do
10689  IFS=$as_save_IFS
10690  test -z "$as_dir" && as_dir=.
10691    for ac_exec_ext in '' $ac_executable_extensions; do
10692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10693    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10695    break 2
10696  fi
10697done
10698  done
10699IFS=$as_save_IFS
10700
10701  ;;
10702esac
10703fi
10704SH=$ac_cv_path_SH
10705if test -n "$SH"; then
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10707$as_echo "$SH" >&6; }
10708else
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710$as_echo "no" >&6; }
10711fi
10712
10713
10714  test -n "$SH" && break
10715done
10716
10717  else
10718    # The variable is set, but is it from the command line or the environment?
10719
10720    # Try to remove the string !SH! from our list.
10721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10723      # If it failed, the variable was not from the command line. Ignore it,
10724      # but warn the user (except for BASH, which is always set by the calling BASH).
10725      if test "xSH" != xBASH; then
10726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10727$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10728      fi
10729      # Try to locate tool using the code snippet
10730      for ac_prog in sh
10731do
10732  # Extract the first word of "$ac_prog", so it can be a program name with args.
10733set dummy $ac_prog; ac_word=$2
10734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10735$as_echo_n "checking for $ac_word... " >&6; }
10736if ${ac_cv_path_SH+:} false; then :
10737  $as_echo_n "(cached) " >&6
10738else
10739  case $SH in
10740  [\\/]* | ?:[\\/]*)
10741  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10742  ;;
10743  *)
10744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10745for as_dir in $PATH
10746do
10747  IFS=$as_save_IFS
10748  test -z "$as_dir" && as_dir=.
10749    for ac_exec_ext in '' $ac_executable_extensions; do
10750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10751    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10753    break 2
10754  fi
10755done
10756  done
10757IFS=$as_save_IFS
10758
10759  ;;
10760esac
10761fi
10762SH=$ac_cv_path_SH
10763if test -n "$SH"; then
10764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10765$as_echo "$SH" >&6; }
10766else
10767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10768$as_echo "no" >&6; }
10769fi
10770
10771
10772  test -n "$SH" && break
10773done
10774
10775    else
10776      # If it succeeded, then it was overridden by the user. We will use it
10777      # for the tool.
10778
10779      # First remove it from the list of overridden variables, so we can test
10780      # for unknown variables in the end.
10781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10782
10783      # Check if we try to supply an empty value
10784      if test "x$SH" = x; then
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10786$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10788$as_echo_n "checking for SH... " >&6; }
10789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10790$as_echo "disabled" >&6; }
10791      else
10792        # Check if the provided tool contains a complete path.
10793        tool_specified="$SH"
10794        tool_basename="${tool_specified##*/}"
10795        if test "x$tool_basename" = "x$tool_specified"; then
10796          # A command without a complete path is provided, search $PATH.
10797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10798$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10799          # Extract the first word of "$tool_basename", so it can be a program name with args.
10800set dummy $tool_basename; ac_word=$2
10801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10802$as_echo_n "checking for $ac_word... " >&6; }
10803if ${ac_cv_path_SH+:} false; then :
10804  $as_echo_n "(cached) " >&6
10805else
10806  case $SH in
10807  [\\/]* | ?:[\\/]*)
10808  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10809  ;;
10810  *)
10811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10812for as_dir in $PATH
10813do
10814  IFS=$as_save_IFS
10815  test -z "$as_dir" && as_dir=.
10816    for ac_exec_ext in '' $ac_executable_extensions; do
10817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10818    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10820    break 2
10821  fi
10822done
10823  done
10824IFS=$as_save_IFS
10825
10826  ;;
10827esac
10828fi
10829SH=$ac_cv_path_SH
10830if test -n "$SH"; then
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10832$as_echo "$SH" >&6; }
10833else
10834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10835$as_echo "no" >&6; }
10836fi
10837
10838
10839          if test "x$SH" = x; then
10840            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10841          fi
10842        else
10843          # Otherwise we believe it is a complete path. Use it as it is.
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10845$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10846          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10847$as_echo_n "checking for SH... " >&6; }
10848          if test ! -x "$tool_specified"; then
10849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10850$as_echo "not found" >&6; }
10851            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10852          fi
10853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10854$as_echo "$tool_specified" >&6; }
10855        fi
10856      fi
10857    fi
10858
10859  fi
10860
10861
10862
10863  if test "x$SH" = x; then
10864    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10865  fi
10866
10867
10868
10869
10870
10871  # Publish this variable in the help.
10872
10873
10874  if [ -z "${SORT+x}" ]; then
10875    # The variable is not set by user, try to locate tool using the code snippet
10876    for ac_prog in sort
10877do
10878  # Extract the first word of "$ac_prog", so it can be a program name with args.
10879set dummy $ac_prog; ac_word=$2
10880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10881$as_echo_n "checking for $ac_word... " >&6; }
10882if ${ac_cv_path_SORT+:} false; then :
10883  $as_echo_n "(cached) " >&6
10884else
10885  case $SORT in
10886  [\\/]* | ?:[\\/]*)
10887  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10888  ;;
10889  *)
10890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10891for as_dir in $PATH
10892do
10893  IFS=$as_save_IFS
10894  test -z "$as_dir" && as_dir=.
10895    for ac_exec_ext in '' $ac_executable_extensions; do
10896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10897    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10899    break 2
10900  fi
10901done
10902  done
10903IFS=$as_save_IFS
10904
10905  ;;
10906esac
10907fi
10908SORT=$ac_cv_path_SORT
10909if test -n "$SORT"; then
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10911$as_echo "$SORT" >&6; }
10912else
10913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10914$as_echo "no" >&6; }
10915fi
10916
10917
10918  test -n "$SORT" && break
10919done
10920
10921  else
10922    # The variable is set, but is it from the command line or the environment?
10923
10924    # Try to remove the string !SORT! from our list.
10925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10927      # If it failed, the variable was not from the command line. Ignore it,
10928      # but warn the user (except for BASH, which is always set by the calling BASH).
10929      if test "xSORT" != xBASH; then
10930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10931$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10932      fi
10933      # Try to locate tool using the code snippet
10934      for ac_prog in sort
10935do
10936  # Extract the first word of "$ac_prog", so it can be a program name with args.
10937set dummy $ac_prog; ac_word=$2
10938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10939$as_echo_n "checking for $ac_word... " >&6; }
10940if ${ac_cv_path_SORT+:} false; then :
10941  $as_echo_n "(cached) " >&6
10942else
10943  case $SORT in
10944  [\\/]* | ?:[\\/]*)
10945  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10946  ;;
10947  *)
10948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10949for as_dir in $PATH
10950do
10951  IFS=$as_save_IFS
10952  test -z "$as_dir" && as_dir=.
10953    for ac_exec_ext in '' $ac_executable_extensions; do
10954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10955    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10957    break 2
10958  fi
10959done
10960  done
10961IFS=$as_save_IFS
10962
10963  ;;
10964esac
10965fi
10966SORT=$ac_cv_path_SORT
10967if test -n "$SORT"; then
10968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10969$as_echo "$SORT" >&6; }
10970else
10971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10972$as_echo "no" >&6; }
10973fi
10974
10975
10976  test -n "$SORT" && break
10977done
10978
10979    else
10980      # If it succeeded, then it was overridden by the user. We will use it
10981      # for the tool.
10982
10983      # First remove it from the list of overridden variables, so we can test
10984      # for unknown variables in the end.
10985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10986
10987      # Check if we try to supply an empty value
10988      if test "x$SORT" = x; then
10989        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10990$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10992$as_echo_n "checking for SORT... " >&6; }
10993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10994$as_echo "disabled" >&6; }
10995      else
10996        # Check if the provided tool contains a complete path.
10997        tool_specified="$SORT"
10998        tool_basename="${tool_specified##*/}"
10999        if test "x$tool_basename" = "x$tool_specified"; then
11000          # A command without a complete path is provided, search $PATH.
11001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11002$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11003          # Extract the first word of "$tool_basename", so it can be a program name with args.
11004set dummy $tool_basename; ac_word=$2
11005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11006$as_echo_n "checking for $ac_word... " >&6; }
11007if ${ac_cv_path_SORT+:} false; then :
11008  $as_echo_n "(cached) " >&6
11009else
11010  case $SORT in
11011  [\\/]* | ?:[\\/]*)
11012  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11013  ;;
11014  *)
11015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11016for as_dir in $PATH
11017do
11018  IFS=$as_save_IFS
11019  test -z "$as_dir" && as_dir=.
11020    for ac_exec_ext in '' $ac_executable_extensions; do
11021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11022    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11024    break 2
11025  fi
11026done
11027  done
11028IFS=$as_save_IFS
11029
11030  ;;
11031esac
11032fi
11033SORT=$ac_cv_path_SORT
11034if test -n "$SORT"; then
11035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11036$as_echo "$SORT" >&6; }
11037else
11038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11039$as_echo "no" >&6; }
11040fi
11041
11042
11043          if test "x$SORT" = x; then
11044            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11045          fi
11046        else
11047          # Otherwise we believe it is a complete path. Use it as it is.
11048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11049$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11050          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11051$as_echo_n "checking for SORT... " >&6; }
11052          if test ! -x "$tool_specified"; then
11053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11054$as_echo "not found" >&6; }
11055            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11056          fi
11057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11058$as_echo "$tool_specified" >&6; }
11059        fi
11060      fi
11061    fi
11062
11063  fi
11064
11065
11066
11067  if test "x$SORT" = x; then
11068    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11069  fi
11070
11071
11072
11073
11074
11075  # Publish this variable in the help.
11076
11077
11078  if [ -z "${TAIL+x}" ]; then
11079    # The variable is not set by user, try to locate tool using the code snippet
11080    for ac_prog in tail
11081do
11082  # Extract the first word of "$ac_prog", so it can be a program name with args.
11083set dummy $ac_prog; ac_word=$2
11084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11085$as_echo_n "checking for $ac_word... " >&6; }
11086if ${ac_cv_path_TAIL+:} false; then :
11087  $as_echo_n "(cached) " >&6
11088else
11089  case $TAIL in
11090  [\\/]* | ?:[\\/]*)
11091  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11092  ;;
11093  *)
11094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11095for as_dir in $PATH
11096do
11097  IFS=$as_save_IFS
11098  test -z "$as_dir" && as_dir=.
11099    for ac_exec_ext in '' $ac_executable_extensions; do
11100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11101    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11103    break 2
11104  fi
11105done
11106  done
11107IFS=$as_save_IFS
11108
11109  ;;
11110esac
11111fi
11112TAIL=$ac_cv_path_TAIL
11113if test -n "$TAIL"; then
11114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11115$as_echo "$TAIL" >&6; }
11116else
11117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11118$as_echo "no" >&6; }
11119fi
11120
11121
11122  test -n "$TAIL" && break
11123done
11124
11125  else
11126    # The variable is set, but is it from the command line or the environment?
11127
11128    # Try to remove the string !TAIL! from our list.
11129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11131      # If it failed, the variable was not from the command line. Ignore it,
11132      # but warn the user (except for BASH, which is always set by the calling BASH).
11133      if test "xTAIL" != xBASH; then
11134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11135$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11136      fi
11137      # Try to locate tool using the code snippet
11138      for ac_prog in tail
11139do
11140  # Extract the first word of "$ac_prog", so it can be a program name with args.
11141set dummy $ac_prog; ac_word=$2
11142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11143$as_echo_n "checking for $ac_word... " >&6; }
11144if ${ac_cv_path_TAIL+:} false; then :
11145  $as_echo_n "(cached) " >&6
11146else
11147  case $TAIL in
11148  [\\/]* | ?:[\\/]*)
11149  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11150  ;;
11151  *)
11152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11153for as_dir in $PATH
11154do
11155  IFS=$as_save_IFS
11156  test -z "$as_dir" && as_dir=.
11157    for ac_exec_ext in '' $ac_executable_extensions; do
11158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11159    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11161    break 2
11162  fi
11163done
11164  done
11165IFS=$as_save_IFS
11166
11167  ;;
11168esac
11169fi
11170TAIL=$ac_cv_path_TAIL
11171if test -n "$TAIL"; then
11172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11173$as_echo "$TAIL" >&6; }
11174else
11175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11176$as_echo "no" >&6; }
11177fi
11178
11179
11180  test -n "$TAIL" && break
11181done
11182
11183    else
11184      # If it succeeded, then it was overridden by the user. We will use it
11185      # for the tool.
11186
11187      # First remove it from the list of overridden variables, so we can test
11188      # for unknown variables in the end.
11189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11190
11191      # Check if we try to supply an empty value
11192      if test "x$TAIL" = x; then
11193        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11194$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11195        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11196$as_echo_n "checking for TAIL... " >&6; }
11197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11198$as_echo "disabled" >&6; }
11199      else
11200        # Check if the provided tool contains a complete path.
11201        tool_specified="$TAIL"
11202        tool_basename="${tool_specified##*/}"
11203        if test "x$tool_basename" = "x$tool_specified"; then
11204          # A command without a complete path is provided, search $PATH.
11205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11206$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11207          # Extract the first word of "$tool_basename", so it can be a program name with args.
11208set dummy $tool_basename; ac_word=$2
11209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11210$as_echo_n "checking for $ac_word... " >&6; }
11211if ${ac_cv_path_TAIL+:} false; then :
11212  $as_echo_n "(cached) " >&6
11213else
11214  case $TAIL in
11215  [\\/]* | ?:[\\/]*)
11216  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11217  ;;
11218  *)
11219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11220for as_dir in $PATH
11221do
11222  IFS=$as_save_IFS
11223  test -z "$as_dir" && as_dir=.
11224    for ac_exec_ext in '' $ac_executable_extensions; do
11225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11226    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11228    break 2
11229  fi
11230done
11231  done
11232IFS=$as_save_IFS
11233
11234  ;;
11235esac
11236fi
11237TAIL=$ac_cv_path_TAIL
11238if test -n "$TAIL"; then
11239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11240$as_echo "$TAIL" >&6; }
11241else
11242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243$as_echo "no" >&6; }
11244fi
11245
11246
11247          if test "x$TAIL" = x; then
11248            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11249          fi
11250        else
11251          # Otherwise we believe it is a complete path. Use it as it is.
11252          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11253$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11254          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11255$as_echo_n "checking for TAIL... " >&6; }
11256          if test ! -x "$tool_specified"; then
11257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11258$as_echo "not found" >&6; }
11259            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11260          fi
11261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11262$as_echo "$tool_specified" >&6; }
11263        fi
11264      fi
11265    fi
11266
11267  fi
11268
11269
11270
11271  if test "x$TAIL" = x; then
11272    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11273  fi
11274
11275
11276
11277
11278
11279  # Publish this variable in the help.
11280
11281
11282  if [ -z "${TAR+x}" ]; then
11283    # The variable is not set by user, try to locate tool using the code snippet
11284    for ac_prog in gtar tar
11285do
11286  # Extract the first word of "$ac_prog", so it can be a program name with args.
11287set dummy $ac_prog; ac_word=$2
11288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11289$as_echo_n "checking for $ac_word... " >&6; }
11290if ${ac_cv_path_TAR+:} false; then :
11291  $as_echo_n "(cached) " >&6
11292else
11293  case $TAR in
11294  [\\/]* | ?:[\\/]*)
11295  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11296  ;;
11297  *)
11298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11299for as_dir in $PATH
11300do
11301  IFS=$as_save_IFS
11302  test -z "$as_dir" && as_dir=.
11303    for ac_exec_ext in '' $ac_executable_extensions; do
11304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11305    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11307    break 2
11308  fi
11309done
11310  done
11311IFS=$as_save_IFS
11312
11313  ;;
11314esac
11315fi
11316TAR=$ac_cv_path_TAR
11317if test -n "$TAR"; then
11318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11319$as_echo "$TAR" >&6; }
11320else
11321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11322$as_echo "no" >&6; }
11323fi
11324
11325
11326  test -n "$TAR" && break
11327done
11328
11329  else
11330    # The variable is set, but is it from the command line or the environment?
11331
11332    # Try to remove the string !TAR! from our list.
11333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11335      # If it failed, the variable was not from the command line. Ignore it,
11336      # but warn the user (except for BASH, which is always set by the calling BASH).
11337      if test "xTAR" != xBASH; then
11338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11339$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11340      fi
11341      # Try to locate tool using the code snippet
11342      for ac_prog in gtar tar
11343do
11344  # Extract the first word of "$ac_prog", so it can be a program name with args.
11345set dummy $ac_prog; ac_word=$2
11346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11347$as_echo_n "checking for $ac_word... " >&6; }
11348if ${ac_cv_path_TAR+:} false; then :
11349  $as_echo_n "(cached) " >&6
11350else
11351  case $TAR in
11352  [\\/]* | ?:[\\/]*)
11353  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11354  ;;
11355  *)
11356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11357for as_dir in $PATH
11358do
11359  IFS=$as_save_IFS
11360  test -z "$as_dir" && as_dir=.
11361    for ac_exec_ext in '' $ac_executable_extensions; do
11362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11363    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11365    break 2
11366  fi
11367done
11368  done
11369IFS=$as_save_IFS
11370
11371  ;;
11372esac
11373fi
11374TAR=$ac_cv_path_TAR
11375if test -n "$TAR"; then
11376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11377$as_echo "$TAR" >&6; }
11378else
11379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380$as_echo "no" >&6; }
11381fi
11382
11383
11384  test -n "$TAR" && break
11385done
11386
11387    else
11388      # If it succeeded, then it was overridden by the user. We will use it
11389      # for the tool.
11390
11391      # First remove it from the list of overridden variables, so we can test
11392      # for unknown variables in the end.
11393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11394
11395      # Check if we try to supply an empty value
11396      if test "x$TAR" = x; then
11397        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11398$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11400$as_echo_n "checking for TAR... " >&6; }
11401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11402$as_echo "disabled" >&6; }
11403      else
11404        # Check if the provided tool contains a complete path.
11405        tool_specified="$TAR"
11406        tool_basename="${tool_specified##*/}"
11407        if test "x$tool_basename" = "x$tool_specified"; then
11408          # A command without a complete path is provided, search $PATH.
11409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11410$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11411          # Extract the first word of "$tool_basename", so it can be a program name with args.
11412set dummy $tool_basename; ac_word=$2
11413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11414$as_echo_n "checking for $ac_word... " >&6; }
11415if ${ac_cv_path_TAR+:} false; then :
11416  $as_echo_n "(cached) " >&6
11417else
11418  case $TAR in
11419  [\\/]* | ?:[\\/]*)
11420  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11421  ;;
11422  *)
11423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11424for as_dir in $PATH
11425do
11426  IFS=$as_save_IFS
11427  test -z "$as_dir" && as_dir=.
11428    for ac_exec_ext in '' $ac_executable_extensions; do
11429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11430    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11432    break 2
11433  fi
11434done
11435  done
11436IFS=$as_save_IFS
11437
11438  ;;
11439esac
11440fi
11441TAR=$ac_cv_path_TAR
11442if test -n "$TAR"; then
11443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11444$as_echo "$TAR" >&6; }
11445else
11446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447$as_echo "no" >&6; }
11448fi
11449
11450
11451          if test "x$TAR" = x; then
11452            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11453          fi
11454        else
11455          # Otherwise we believe it is a complete path. Use it as it is.
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11457$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11458          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11459$as_echo_n "checking for TAR... " >&6; }
11460          if test ! -x "$tool_specified"; then
11461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11462$as_echo "not found" >&6; }
11463            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11464          fi
11465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11466$as_echo "$tool_specified" >&6; }
11467        fi
11468      fi
11469    fi
11470
11471  fi
11472
11473
11474
11475  if test "x$TAR" = x; then
11476    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11477  fi
11478
11479
11480
11481
11482
11483  # Publish this variable in the help.
11484
11485
11486  if [ -z "${TEE+x}" ]; then
11487    # The variable is not set by user, try to locate tool using the code snippet
11488    for ac_prog in tee
11489do
11490  # Extract the first word of "$ac_prog", so it can be a program name with args.
11491set dummy $ac_prog; ac_word=$2
11492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11493$as_echo_n "checking for $ac_word... " >&6; }
11494if ${ac_cv_path_TEE+:} false; then :
11495  $as_echo_n "(cached) " >&6
11496else
11497  case $TEE in
11498  [\\/]* | ?:[\\/]*)
11499  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11500  ;;
11501  *)
11502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11503for as_dir in $PATH
11504do
11505  IFS=$as_save_IFS
11506  test -z "$as_dir" && as_dir=.
11507    for ac_exec_ext in '' $ac_executable_extensions; do
11508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11509    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11511    break 2
11512  fi
11513done
11514  done
11515IFS=$as_save_IFS
11516
11517  ;;
11518esac
11519fi
11520TEE=$ac_cv_path_TEE
11521if test -n "$TEE"; then
11522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11523$as_echo "$TEE" >&6; }
11524else
11525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526$as_echo "no" >&6; }
11527fi
11528
11529
11530  test -n "$TEE" && break
11531done
11532
11533  else
11534    # The variable is set, but is it from the command line or the environment?
11535
11536    # Try to remove the string !TEE! from our list.
11537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11539      # If it failed, the variable was not from the command line. Ignore it,
11540      # but warn the user (except for BASH, which is always set by the calling BASH).
11541      if test "xTEE" != xBASH; then
11542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11543$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11544      fi
11545      # Try to locate tool using the code snippet
11546      for ac_prog in tee
11547do
11548  # Extract the first word of "$ac_prog", so it can be a program name with args.
11549set dummy $ac_prog; ac_word=$2
11550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11551$as_echo_n "checking for $ac_word... " >&6; }
11552if ${ac_cv_path_TEE+:} false; then :
11553  $as_echo_n "(cached) " >&6
11554else
11555  case $TEE in
11556  [\\/]* | ?:[\\/]*)
11557  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11558  ;;
11559  *)
11560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11561for as_dir in $PATH
11562do
11563  IFS=$as_save_IFS
11564  test -z "$as_dir" && as_dir=.
11565    for ac_exec_ext in '' $ac_executable_extensions; do
11566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11567    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11569    break 2
11570  fi
11571done
11572  done
11573IFS=$as_save_IFS
11574
11575  ;;
11576esac
11577fi
11578TEE=$ac_cv_path_TEE
11579if test -n "$TEE"; then
11580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11581$as_echo "$TEE" >&6; }
11582else
11583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11584$as_echo "no" >&6; }
11585fi
11586
11587
11588  test -n "$TEE" && break
11589done
11590
11591    else
11592      # If it succeeded, then it was overridden by the user. We will use it
11593      # for the tool.
11594
11595      # First remove it from the list of overridden variables, so we can test
11596      # for unknown variables in the end.
11597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11598
11599      # Check if we try to supply an empty value
11600      if test "x$TEE" = x; then
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11602$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11604$as_echo_n "checking for TEE... " >&6; }
11605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11606$as_echo "disabled" >&6; }
11607      else
11608        # Check if the provided tool contains a complete path.
11609        tool_specified="$TEE"
11610        tool_basename="${tool_specified##*/}"
11611        if test "x$tool_basename" = "x$tool_specified"; then
11612          # A command without a complete path is provided, search $PATH.
11613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11614$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11615          # Extract the first word of "$tool_basename", so it can be a program name with args.
11616set dummy $tool_basename; ac_word=$2
11617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11618$as_echo_n "checking for $ac_word... " >&6; }
11619if ${ac_cv_path_TEE+:} false; then :
11620  $as_echo_n "(cached) " >&6
11621else
11622  case $TEE in
11623  [\\/]* | ?:[\\/]*)
11624  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11625  ;;
11626  *)
11627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11628for as_dir in $PATH
11629do
11630  IFS=$as_save_IFS
11631  test -z "$as_dir" && as_dir=.
11632    for ac_exec_ext in '' $ac_executable_extensions; do
11633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11634    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11636    break 2
11637  fi
11638done
11639  done
11640IFS=$as_save_IFS
11641
11642  ;;
11643esac
11644fi
11645TEE=$ac_cv_path_TEE
11646if test -n "$TEE"; then
11647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11648$as_echo "$TEE" >&6; }
11649else
11650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
11652fi
11653
11654
11655          if test "x$TEE" = x; then
11656            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11657          fi
11658        else
11659          # Otherwise we believe it is a complete path. Use it as it is.
11660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11661$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11662          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11663$as_echo_n "checking for TEE... " >&6; }
11664          if test ! -x "$tool_specified"; then
11665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11666$as_echo "not found" >&6; }
11667            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11668          fi
11669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11670$as_echo "$tool_specified" >&6; }
11671        fi
11672      fi
11673    fi
11674
11675  fi
11676
11677
11678
11679  if test "x$TEE" = x; then
11680    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11681  fi
11682
11683
11684
11685
11686
11687  # Publish this variable in the help.
11688
11689
11690  if [ -z "${TOUCH+x}" ]; then
11691    # The variable is not set by user, try to locate tool using the code snippet
11692    for ac_prog in touch
11693do
11694  # Extract the first word of "$ac_prog", so it can be a program name with args.
11695set dummy $ac_prog; ac_word=$2
11696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11697$as_echo_n "checking for $ac_word... " >&6; }
11698if ${ac_cv_path_TOUCH+:} false; then :
11699  $as_echo_n "(cached) " >&6
11700else
11701  case $TOUCH in
11702  [\\/]* | ?:[\\/]*)
11703  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11704  ;;
11705  *)
11706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11707for as_dir in $PATH
11708do
11709  IFS=$as_save_IFS
11710  test -z "$as_dir" && as_dir=.
11711    for ac_exec_ext in '' $ac_executable_extensions; do
11712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11713    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11715    break 2
11716  fi
11717done
11718  done
11719IFS=$as_save_IFS
11720
11721  ;;
11722esac
11723fi
11724TOUCH=$ac_cv_path_TOUCH
11725if test -n "$TOUCH"; then
11726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11727$as_echo "$TOUCH" >&6; }
11728else
11729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11730$as_echo "no" >&6; }
11731fi
11732
11733
11734  test -n "$TOUCH" && break
11735done
11736
11737  else
11738    # The variable is set, but is it from the command line or the environment?
11739
11740    # Try to remove the string !TOUCH! from our list.
11741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11743      # If it failed, the variable was not from the command line. Ignore it,
11744      # but warn the user (except for BASH, which is always set by the calling BASH).
11745      if test "xTOUCH" != xBASH; then
11746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11747$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11748      fi
11749      # Try to locate tool using the code snippet
11750      for ac_prog in touch
11751do
11752  # Extract the first word of "$ac_prog", so it can be a program name with args.
11753set dummy $ac_prog; ac_word=$2
11754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11755$as_echo_n "checking for $ac_word... " >&6; }
11756if ${ac_cv_path_TOUCH+:} false; then :
11757  $as_echo_n "(cached) " >&6
11758else
11759  case $TOUCH in
11760  [\\/]* | ?:[\\/]*)
11761  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11762  ;;
11763  *)
11764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11765for as_dir in $PATH
11766do
11767  IFS=$as_save_IFS
11768  test -z "$as_dir" && as_dir=.
11769    for ac_exec_ext in '' $ac_executable_extensions; do
11770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11771    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11773    break 2
11774  fi
11775done
11776  done
11777IFS=$as_save_IFS
11778
11779  ;;
11780esac
11781fi
11782TOUCH=$ac_cv_path_TOUCH
11783if test -n "$TOUCH"; then
11784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11785$as_echo "$TOUCH" >&6; }
11786else
11787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11788$as_echo "no" >&6; }
11789fi
11790
11791
11792  test -n "$TOUCH" && break
11793done
11794
11795    else
11796      # If it succeeded, then it was overridden by the user. We will use it
11797      # for the tool.
11798
11799      # First remove it from the list of overridden variables, so we can test
11800      # for unknown variables in the end.
11801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11802
11803      # Check if we try to supply an empty value
11804      if test "x$TOUCH" = x; then
11805        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11806$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11808$as_echo_n "checking for TOUCH... " >&6; }
11809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11810$as_echo "disabled" >&6; }
11811      else
11812        # Check if the provided tool contains a complete path.
11813        tool_specified="$TOUCH"
11814        tool_basename="${tool_specified##*/}"
11815        if test "x$tool_basename" = "x$tool_specified"; then
11816          # A command without a complete path is provided, search $PATH.
11817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11818$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11819          # Extract the first word of "$tool_basename", so it can be a program name with args.
11820set dummy $tool_basename; ac_word=$2
11821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11822$as_echo_n "checking for $ac_word... " >&6; }
11823if ${ac_cv_path_TOUCH+:} false; then :
11824  $as_echo_n "(cached) " >&6
11825else
11826  case $TOUCH in
11827  [\\/]* | ?:[\\/]*)
11828  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11829  ;;
11830  *)
11831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11832for as_dir in $PATH
11833do
11834  IFS=$as_save_IFS
11835  test -z "$as_dir" && as_dir=.
11836    for ac_exec_ext in '' $ac_executable_extensions; do
11837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11838    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11840    break 2
11841  fi
11842done
11843  done
11844IFS=$as_save_IFS
11845
11846  ;;
11847esac
11848fi
11849TOUCH=$ac_cv_path_TOUCH
11850if test -n "$TOUCH"; then
11851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11852$as_echo "$TOUCH" >&6; }
11853else
11854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11855$as_echo "no" >&6; }
11856fi
11857
11858
11859          if test "x$TOUCH" = x; then
11860            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11861          fi
11862        else
11863          # Otherwise we believe it is a complete path. Use it as it is.
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11865$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11866          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11867$as_echo_n "checking for TOUCH... " >&6; }
11868          if test ! -x "$tool_specified"; then
11869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11870$as_echo "not found" >&6; }
11871            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11872          fi
11873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11874$as_echo "$tool_specified" >&6; }
11875        fi
11876      fi
11877    fi
11878
11879  fi
11880
11881
11882
11883  if test "x$TOUCH" = x; then
11884    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11885  fi
11886
11887
11888
11889
11890
11891  # Publish this variable in the help.
11892
11893
11894  if [ -z "${TR+x}" ]; then
11895    # The variable is not set by user, try to locate tool using the code snippet
11896    for ac_prog in tr
11897do
11898  # Extract the first word of "$ac_prog", so it can be a program name with args.
11899set dummy $ac_prog; ac_word=$2
11900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11901$as_echo_n "checking for $ac_word... " >&6; }
11902if ${ac_cv_path_TR+:} false; then :
11903  $as_echo_n "(cached) " >&6
11904else
11905  case $TR in
11906  [\\/]* | ?:[\\/]*)
11907  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11908  ;;
11909  *)
11910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11911for as_dir in $PATH
11912do
11913  IFS=$as_save_IFS
11914  test -z "$as_dir" && as_dir=.
11915    for ac_exec_ext in '' $ac_executable_extensions; do
11916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11917    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11919    break 2
11920  fi
11921done
11922  done
11923IFS=$as_save_IFS
11924
11925  ;;
11926esac
11927fi
11928TR=$ac_cv_path_TR
11929if test -n "$TR"; then
11930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11931$as_echo "$TR" >&6; }
11932else
11933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11934$as_echo "no" >&6; }
11935fi
11936
11937
11938  test -n "$TR" && break
11939done
11940
11941  else
11942    # The variable is set, but is it from the command line or the environment?
11943
11944    # Try to remove the string !TR! from our list.
11945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11947      # If it failed, the variable was not from the command line. Ignore it,
11948      # but warn the user (except for BASH, which is always set by the calling BASH).
11949      if test "xTR" != xBASH; then
11950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11951$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11952      fi
11953      # Try to locate tool using the code snippet
11954      for ac_prog in tr
11955do
11956  # Extract the first word of "$ac_prog", so it can be a program name with args.
11957set dummy $ac_prog; ac_word=$2
11958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11959$as_echo_n "checking for $ac_word... " >&6; }
11960if ${ac_cv_path_TR+:} false; then :
11961  $as_echo_n "(cached) " >&6
11962else
11963  case $TR in
11964  [\\/]* | ?:[\\/]*)
11965  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11966  ;;
11967  *)
11968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11969for as_dir in $PATH
11970do
11971  IFS=$as_save_IFS
11972  test -z "$as_dir" && as_dir=.
11973    for ac_exec_ext in '' $ac_executable_extensions; do
11974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11975    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11977    break 2
11978  fi
11979done
11980  done
11981IFS=$as_save_IFS
11982
11983  ;;
11984esac
11985fi
11986TR=$ac_cv_path_TR
11987if test -n "$TR"; then
11988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11989$as_echo "$TR" >&6; }
11990else
11991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992$as_echo "no" >&6; }
11993fi
11994
11995
11996  test -n "$TR" && break
11997done
11998
11999    else
12000      # If it succeeded, then it was overridden by the user. We will use it
12001      # for the tool.
12002
12003      # First remove it from the list of overridden variables, so we can test
12004      # for unknown variables in the end.
12005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12006
12007      # Check if we try to supply an empty value
12008      if test "x$TR" = x; then
12009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12010$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12012$as_echo_n "checking for TR... " >&6; }
12013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12014$as_echo "disabled" >&6; }
12015      else
12016        # Check if the provided tool contains a complete path.
12017        tool_specified="$TR"
12018        tool_basename="${tool_specified##*/}"
12019        if test "x$tool_basename" = "x$tool_specified"; then
12020          # A command without a complete path is provided, search $PATH.
12021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12022$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12023          # Extract the first word of "$tool_basename", so it can be a program name with args.
12024set dummy $tool_basename; ac_word=$2
12025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026$as_echo_n "checking for $ac_word... " >&6; }
12027if ${ac_cv_path_TR+:} false; then :
12028  $as_echo_n "(cached) " >&6
12029else
12030  case $TR in
12031  [\\/]* | ?:[\\/]*)
12032  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12033  ;;
12034  *)
12035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036for as_dir in $PATH
12037do
12038  IFS=$as_save_IFS
12039  test -z "$as_dir" && as_dir=.
12040    for ac_exec_ext in '' $ac_executable_extensions; do
12041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12042    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044    break 2
12045  fi
12046done
12047  done
12048IFS=$as_save_IFS
12049
12050  ;;
12051esac
12052fi
12053TR=$ac_cv_path_TR
12054if test -n "$TR"; then
12055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12056$as_echo "$TR" >&6; }
12057else
12058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
12060fi
12061
12062
12063          if test "x$TR" = x; then
12064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12065          fi
12066        else
12067          # Otherwise we believe it is a complete path. Use it as it is.
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12069$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12071$as_echo_n "checking for TR... " >&6; }
12072          if test ! -x "$tool_specified"; then
12073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12074$as_echo "not found" >&6; }
12075            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12076          fi
12077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12078$as_echo "$tool_specified" >&6; }
12079        fi
12080      fi
12081    fi
12082
12083  fi
12084
12085
12086
12087  if test "x$TR" = x; then
12088    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12089  fi
12090
12091
12092
12093
12094
12095  # Publish this variable in the help.
12096
12097
12098  if [ -z "${UNAME+x}" ]; then
12099    # The variable is not set by user, try to locate tool using the code snippet
12100    for ac_prog in uname
12101do
12102  # Extract the first word of "$ac_prog", so it can be a program name with args.
12103set dummy $ac_prog; ac_word=$2
12104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12105$as_echo_n "checking for $ac_word... " >&6; }
12106if ${ac_cv_path_UNAME+:} false; then :
12107  $as_echo_n "(cached) " >&6
12108else
12109  case $UNAME in
12110  [\\/]* | ?:[\\/]*)
12111  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12112  ;;
12113  *)
12114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12115for as_dir in $PATH
12116do
12117  IFS=$as_save_IFS
12118  test -z "$as_dir" && as_dir=.
12119    for ac_exec_ext in '' $ac_executable_extensions; do
12120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12121    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12123    break 2
12124  fi
12125done
12126  done
12127IFS=$as_save_IFS
12128
12129  ;;
12130esac
12131fi
12132UNAME=$ac_cv_path_UNAME
12133if test -n "$UNAME"; then
12134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12135$as_echo "$UNAME" >&6; }
12136else
12137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12138$as_echo "no" >&6; }
12139fi
12140
12141
12142  test -n "$UNAME" && break
12143done
12144
12145  else
12146    # The variable is set, but is it from the command line or the environment?
12147
12148    # Try to remove the string !UNAME! from our list.
12149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12151      # If it failed, the variable was not from the command line. Ignore it,
12152      # but warn the user (except for BASH, which is always set by the calling BASH).
12153      if test "xUNAME" != xBASH; then
12154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12155$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12156      fi
12157      # Try to locate tool using the code snippet
12158      for ac_prog in uname
12159do
12160  # Extract the first word of "$ac_prog", so it can be a program name with args.
12161set dummy $ac_prog; ac_word=$2
12162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12163$as_echo_n "checking for $ac_word... " >&6; }
12164if ${ac_cv_path_UNAME+:} false; then :
12165  $as_echo_n "(cached) " >&6
12166else
12167  case $UNAME in
12168  [\\/]* | ?:[\\/]*)
12169  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12170  ;;
12171  *)
12172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12173for as_dir in $PATH
12174do
12175  IFS=$as_save_IFS
12176  test -z "$as_dir" && as_dir=.
12177    for ac_exec_ext in '' $ac_executable_extensions; do
12178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12179    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12181    break 2
12182  fi
12183done
12184  done
12185IFS=$as_save_IFS
12186
12187  ;;
12188esac
12189fi
12190UNAME=$ac_cv_path_UNAME
12191if test -n "$UNAME"; then
12192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12193$as_echo "$UNAME" >&6; }
12194else
12195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12196$as_echo "no" >&6; }
12197fi
12198
12199
12200  test -n "$UNAME" && break
12201done
12202
12203    else
12204      # If it succeeded, then it was overridden by the user. We will use it
12205      # for the tool.
12206
12207      # First remove it from the list of overridden variables, so we can test
12208      # for unknown variables in the end.
12209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12210
12211      # Check if we try to supply an empty value
12212      if test "x$UNAME" = x; then
12213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12214$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12216$as_echo_n "checking for UNAME... " >&6; }
12217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12218$as_echo "disabled" >&6; }
12219      else
12220        # Check if the provided tool contains a complete path.
12221        tool_specified="$UNAME"
12222        tool_basename="${tool_specified##*/}"
12223        if test "x$tool_basename" = "x$tool_specified"; then
12224          # A command without a complete path is provided, search $PATH.
12225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12226$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12227          # Extract the first word of "$tool_basename", so it can be a program name with args.
12228set dummy $tool_basename; ac_word=$2
12229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12230$as_echo_n "checking for $ac_word... " >&6; }
12231if ${ac_cv_path_UNAME+:} false; then :
12232  $as_echo_n "(cached) " >&6
12233else
12234  case $UNAME in
12235  [\\/]* | ?:[\\/]*)
12236  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12237  ;;
12238  *)
12239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12240for as_dir in $PATH
12241do
12242  IFS=$as_save_IFS
12243  test -z "$as_dir" && as_dir=.
12244    for ac_exec_ext in '' $ac_executable_extensions; do
12245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12246    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12248    break 2
12249  fi
12250done
12251  done
12252IFS=$as_save_IFS
12253
12254  ;;
12255esac
12256fi
12257UNAME=$ac_cv_path_UNAME
12258if test -n "$UNAME"; then
12259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12260$as_echo "$UNAME" >&6; }
12261else
12262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12263$as_echo "no" >&6; }
12264fi
12265
12266
12267          if test "x$UNAME" = x; then
12268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12269          fi
12270        else
12271          # Otherwise we believe it is a complete path. Use it as it is.
12272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12273$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12275$as_echo_n "checking for UNAME... " >&6; }
12276          if test ! -x "$tool_specified"; then
12277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12278$as_echo "not found" >&6; }
12279            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12280          fi
12281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12282$as_echo "$tool_specified" >&6; }
12283        fi
12284      fi
12285    fi
12286
12287  fi
12288
12289
12290
12291  if test "x$UNAME" = x; then
12292    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12293  fi
12294
12295
12296
12297
12298
12299  # Publish this variable in the help.
12300
12301
12302  if [ -z "${UNIQ+x}" ]; then
12303    # The variable is not set by user, try to locate tool using the code snippet
12304    for ac_prog in uniq
12305do
12306  # Extract the first word of "$ac_prog", so it can be a program name with args.
12307set dummy $ac_prog; ac_word=$2
12308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12309$as_echo_n "checking for $ac_word... " >&6; }
12310if ${ac_cv_path_UNIQ+:} false; then :
12311  $as_echo_n "(cached) " >&6
12312else
12313  case $UNIQ in
12314  [\\/]* | ?:[\\/]*)
12315  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12316  ;;
12317  *)
12318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12319for as_dir in $PATH
12320do
12321  IFS=$as_save_IFS
12322  test -z "$as_dir" && as_dir=.
12323    for ac_exec_ext in '' $ac_executable_extensions; do
12324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12325    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12327    break 2
12328  fi
12329done
12330  done
12331IFS=$as_save_IFS
12332
12333  ;;
12334esac
12335fi
12336UNIQ=$ac_cv_path_UNIQ
12337if test -n "$UNIQ"; then
12338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12339$as_echo "$UNIQ" >&6; }
12340else
12341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12342$as_echo "no" >&6; }
12343fi
12344
12345
12346  test -n "$UNIQ" && break
12347done
12348
12349  else
12350    # The variable is set, but is it from the command line or the environment?
12351
12352    # Try to remove the string !UNIQ! from our list.
12353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12355      # If it failed, the variable was not from the command line. Ignore it,
12356      # but warn the user (except for BASH, which is always set by the calling BASH).
12357      if test "xUNIQ" != xBASH; then
12358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12359$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12360      fi
12361      # Try to locate tool using the code snippet
12362      for ac_prog in uniq
12363do
12364  # Extract the first word of "$ac_prog", so it can be a program name with args.
12365set dummy $ac_prog; ac_word=$2
12366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12367$as_echo_n "checking for $ac_word... " >&6; }
12368if ${ac_cv_path_UNIQ+:} false; then :
12369  $as_echo_n "(cached) " >&6
12370else
12371  case $UNIQ in
12372  [\\/]* | ?:[\\/]*)
12373  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12374  ;;
12375  *)
12376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12377for as_dir in $PATH
12378do
12379  IFS=$as_save_IFS
12380  test -z "$as_dir" && as_dir=.
12381    for ac_exec_ext in '' $ac_executable_extensions; do
12382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12383    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12385    break 2
12386  fi
12387done
12388  done
12389IFS=$as_save_IFS
12390
12391  ;;
12392esac
12393fi
12394UNIQ=$ac_cv_path_UNIQ
12395if test -n "$UNIQ"; then
12396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12397$as_echo "$UNIQ" >&6; }
12398else
12399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12400$as_echo "no" >&6; }
12401fi
12402
12403
12404  test -n "$UNIQ" && break
12405done
12406
12407    else
12408      # If it succeeded, then it was overridden by the user. We will use it
12409      # for the tool.
12410
12411      # First remove it from the list of overridden variables, so we can test
12412      # for unknown variables in the end.
12413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12414
12415      # Check if we try to supply an empty value
12416      if test "x$UNIQ" = x; then
12417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12418$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12420$as_echo_n "checking for UNIQ... " >&6; }
12421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12422$as_echo "disabled" >&6; }
12423      else
12424        # Check if the provided tool contains a complete path.
12425        tool_specified="$UNIQ"
12426        tool_basename="${tool_specified##*/}"
12427        if test "x$tool_basename" = "x$tool_specified"; then
12428          # A command without a complete path is provided, search $PATH.
12429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12430$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12431          # Extract the first word of "$tool_basename", so it can be a program name with args.
12432set dummy $tool_basename; ac_word=$2
12433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12434$as_echo_n "checking for $ac_word... " >&6; }
12435if ${ac_cv_path_UNIQ+:} false; then :
12436  $as_echo_n "(cached) " >&6
12437else
12438  case $UNIQ in
12439  [\\/]* | ?:[\\/]*)
12440  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12441  ;;
12442  *)
12443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12444for as_dir in $PATH
12445do
12446  IFS=$as_save_IFS
12447  test -z "$as_dir" && as_dir=.
12448    for ac_exec_ext in '' $ac_executable_extensions; do
12449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12450    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12452    break 2
12453  fi
12454done
12455  done
12456IFS=$as_save_IFS
12457
12458  ;;
12459esac
12460fi
12461UNIQ=$ac_cv_path_UNIQ
12462if test -n "$UNIQ"; then
12463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12464$as_echo "$UNIQ" >&6; }
12465else
12466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12467$as_echo "no" >&6; }
12468fi
12469
12470
12471          if test "x$UNIQ" = x; then
12472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12473          fi
12474        else
12475          # Otherwise we believe it is a complete path. Use it as it is.
12476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12477$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12479$as_echo_n "checking for UNIQ... " >&6; }
12480          if test ! -x "$tool_specified"; then
12481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12482$as_echo "not found" >&6; }
12483            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12484          fi
12485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12486$as_echo "$tool_specified" >&6; }
12487        fi
12488      fi
12489    fi
12490
12491  fi
12492
12493
12494
12495  if test "x$UNIQ" = x; then
12496    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12497  fi
12498
12499
12500
12501
12502
12503  # Publish this variable in the help.
12504
12505
12506  if [ -z "${WC+x}" ]; then
12507    # The variable is not set by user, try to locate tool using the code snippet
12508    for ac_prog in wc
12509do
12510  # Extract the first word of "$ac_prog", so it can be a program name with args.
12511set dummy $ac_prog; ac_word=$2
12512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12513$as_echo_n "checking for $ac_word... " >&6; }
12514if ${ac_cv_path_WC+:} false; then :
12515  $as_echo_n "(cached) " >&6
12516else
12517  case $WC in
12518  [\\/]* | ?:[\\/]*)
12519  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12520  ;;
12521  *)
12522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12523for as_dir in $PATH
12524do
12525  IFS=$as_save_IFS
12526  test -z "$as_dir" && as_dir=.
12527    for ac_exec_ext in '' $ac_executable_extensions; do
12528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12529    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12531    break 2
12532  fi
12533done
12534  done
12535IFS=$as_save_IFS
12536
12537  ;;
12538esac
12539fi
12540WC=$ac_cv_path_WC
12541if test -n "$WC"; then
12542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12543$as_echo "$WC" >&6; }
12544else
12545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12546$as_echo "no" >&6; }
12547fi
12548
12549
12550  test -n "$WC" && break
12551done
12552
12553  else
12554    # The variable is set, but is it from the command line or the environment?
12555
12556    # Try to remove the string !WC! from our list.
12557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12559      # If it failed, the variable was not from the command line. Ignore it,
12560      # but warn the user (except for BASH, which is always set by the calling BASH).
12561      if test "xWC" != xBASH; then
12562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12563$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12564      fi
12565      # Try to locate tool using the code snippet
12566      for ac_prog in wc
12567do
12568  # Extract the first word of "$ac_prog", so it can be a program name with args.
12569set dummy $ac_prog; ac_word=$2
12570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12571$as_echo_n "checking for $ac_word... " >&6; }
12572if ${ac_cv_path_WC+:} false; then :
12573  $as_echo_n "(cached) " >&6
12574else
12575  case $WC in
12576  [\\/]* | ?:[\\/]*)
12577  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12578  ;;
12579  *)
12580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12581for as_dir in $PATH
12582do
12583  IFS=$as_save_IFS
12584  test -z "$as_dir" && as_dir=.
12585    for ac_exec_ext in '' $ac_executable_extensions; do
12586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12587    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12589    break 2
12590  fi
12591done
12592  done
12593IFS=$as_save_IFS
12594
12595  ;;
12596esac
12597fi
12598WC=$ac_cv_path_WC
12599if test -n "$WC"; then
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12601$as_echo "$WC" >&6; }
12602else
12603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12604$as_echo "no" >&6; }
12605fi
12606
12607
12608  test -n "$WC" && break
12609done
12610
12611    else
12612      # If it succeeded, then it was overridden by the user. We will use it
12613      # for the tool.
12614
12615      # First remove it from the list of overridden variables, so we can test
12616      # for unknown variables in the end.
12617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12618
12619      # Check if we try to supply an empty value
12620      if test "x$WC" = x; then
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12622$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12624$as_echo_n "checking for WC... " >&6; }
12625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12626$as_echo "disabled" >&6; }
12627      else
12628        # Check if the provided tool contains a complete path.
12629        tool_specified="$WC"
12630        tool_basename="${tool_specified##*/}"
12631        if test "x$tool_basename" = "x$tool_specified"; then
12632          # A command without a complete path is provided, search $PATH.
12633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12634$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12635          # Extract the first word of "$tool_basename", so it can be a program name with args.
12636set dummy $tool_basename; ac_word=$2
12637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12638$as_echo_n "checking for $ac_word... " >&6; }
12639if ${ac_cv_path_WC+:} false; then :
12640  $as_echo_n "(cached) " >&6
12641else
12642  case $WC in
12643  [\\/]* | ?:[\\/]*)
12644  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12645  ;;
12646  *)
12647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12648for as_dir in $PATH
12649do
12650  IFS=$as_save_IFS
12651  test -z "$as_dir" && as_dir=.
12652    for ac_exec_ext in '' $ac_executable_extensions; do
12653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12654    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12656    break 2
12657  fi
12658done
12659  done
12660IFS=$as_save_IFS
12661
12662  ;;
12663esac
12664fi
12665WC=$ac_cv_path_WC
12666if test -n "$WC"; then
12667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12668$as_echo "$WC" >&6; }
12669else
12670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12671$as_echo "no" >&6; }
12672fi
12673
12674
12675          if test "x$WC" = x; then
12676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12677          fi
12678        else
12679          # Otherwise we believe it is a complete path. Use it as it is.
12680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12681$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12683$as_echo_n "checking for WC... " >&6; }
12684          if test ! -x "$tool_specified"; then
12685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12686$as_echo "not found" >&6; }
12687            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12688          fi
12689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12690$as_echo "$tool_specified" >&6; }
12691        fi
12692      fi
12693    fi
12694
12695  fi
12696
12697
12698
12699  if test "x$WC" = x; then
12700    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12701  fi
12702
12703
12704
12705
12706
12707  # Publish this variable in the help.
12708
12709
12710  if [ -z "${WHICH+x}" ]; then
12711    # The variable is not set by user, try to locate tool using the code snippet
12712    for ac_prog in which
12713do
12714  # Extract the first word of "$ac_prog", so it can be a program name with args.
12715set dummy $ac_prog; ac_word=$2
12716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12717$as_echo_n "checking for $ac_word... " >&6; }
12718if ${ac_cv_path_WHICH+:} false; then :
12719  $as_echo_n "(cached) " >&6
12720else
12721  case $WHICH in
12722  [\\/]* | ?:[\\/]*)
12723  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12724  ;;
12725  *)
12726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12727for as_dir in $PATH
12728do
12729  IFS=$as_save_IFS
12730  test -z "$as_dir" && as_dir=.
12731    for ac_exec_ext in '' $ac_executable_extensions; do
12732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12733    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12735    break 2
12736  fi
12737done
12738  done
12739IFS=$as_save_IFS
12740
12741  ;;
12742esac
12743fi
12744WHICH=$ac_cv_path_WHICH
12745if test -n "$WHICH"; then
12746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12747$as_echo "$WHICH" >&6; }
12748else
12749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12750$as_echo "no" >&6; }
12751fi
12752
12753
12754  test -n "$WHICH" && break
12755done
12756
12757  else
12758    # The variable is set, but is it from the command line or the environment?
12759
12760    # Try to remove the string !WHICH! from our list.
12761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12763      # If it failed, the variable was not from the command line. Ignore it,
12764      # but warn the user (except for BASH, which is always set by the calling BASH).
12765      if test "xWHICH" != xBASH; then
12766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12767$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12768      fi
12769      # Try to locate tool using the code snippet
12770      for ac_prog in which
12771do
12772  # Extract the first word of "$ac_prog", so it can be a program name with args.
12773set dummy $ac_prog; ac_word=$2
12774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12775$as_echo_n "checking for $ac_word... " >&6; }
12776if ${ac_cv_path_WHICH+:} false; then :
12777  $as_echo_n "(cached) " >&6
12778else
12779  case $WHICH in
12780  [\\/]* | ?:[\\/]*)
12781  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12782  ;;
12783  *)
12784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12785for as_dir in $PATH
12786do
12787  IFS=$as_save_IFS
12788  test -z "$as_dir" && as_dir=.
12789    for ac_exec_ext in '' $ac_executable_extensions; do
12790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12791    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12793    break 2
12794  fi
12795done
12796  done
12797IFS=$as_save_IFS
12798
12799  ;;
12800esac
12801fi
12802WHICH=$ac_cv_path_WHICH
12803if test -n "$WHICH"; then
12804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12805$as_echo "$WHICH" >&6; }
12806else
12807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12808$as_echo "no" >&6; }
12809fi
12810
12811
12812  test -n "$WHICH" && break
12813done
12814
12815    else
12816      # If it succeeded, then it was overridden by the user. We will use it
12817      # for the tool.
12818
12819      # First remove it from the list of overridden variables, so we can test
12820      # for unknown variables in the end.
12821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12822
12823      # Check if we try to supply an empty value
12824      if test "x$WHICH" = x; then
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12826$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12828$as_echo_n "checking for WHICH... " >&6; }
12829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12830$as_echo "disabled" >&6; }
12831      else
12832        # Check if the provided tool contains a complete path.
12833        tool_specified="$WHICH"
12834        tool_basename="${tool_specified##*/}"
12835        if test "x$tool_basename" = "x$tool_specified"; then
12836          # A command without a complete path is provided, search $PATH.
12837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12838$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12839          # Extract the first word of "$tool_basename", so it can be a program name with args.
12840set dummy $tool_basename; ac_word=$2
12841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12842$as_echo_n "checking for $ac_word... " >&6; }
12843if ${ac_cv_path_WHICH+:} false; then :
12844  $as_echo_n "(cached) " >&6
12845else
12846  case $WHICH in
12847  [\\/]* | ?:[\\/]*)
12848  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12849  ;;
12850  *)
12851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12852for as_dir in $PATH
12853do
12854  IFS=$as_save_IFS
12855  test -z "$as_dir" && as_dir=.
12856    for ac_exec_ext in '' $ac_executable_extensions; do
12857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12858    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12860    break 2
12861  fi
12862done
12863  done
12864IFS=$as_save_IFS
12865
12866  ;;
12867esac
12868fi
12869WHICH=$ac_cv_path_WHICH
12870if test -n "$WHICH"; then
12871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12872$as_echo "$WHICH" >&6; }
12873else
12874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12875$as_echo "no" >&6; }
12876fi
12877
12878
12879          if test "x$WHICH" = x; then
12880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12881          fi
12882        else
12883          # Otherwise we believe it is a complete path. Use it as it is.
12884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12885$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12887$as_echo_n "checking for WHICH... " >&6; }
12888          if test ! -x "$tool_specified"; then
12889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12890$as_echo "not found" >&6; }
12891            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12892          fi
12893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12894$as_echo "$tool_specified" >&6; }
12895        fi
12896      fi
12897    fi
12898
12899  fi
12900
12901
12902
12903  if test "x$WHICH" = x; then
12904    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12905  fi
12906
12907
12908
12909
12910
12911  # Publish this variable in the help.
12912
12913
12914  if [ -z "${XARGS+x}" ]; then
12915    # The variable is not set by user, try to locate tool using the code snippet
12916    for ac_prog in xargs
12917do
12918  # Extract the first word of "$ac_prog", so it can be a program name with args.
12919set dummy $ac_prog; ac_word=$2
12920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12921$as_echo_n "checking for $ac_word... " >&6; }
12922if ${ac_cv_path_XARGS+:} false; then :
12923  $as_echo_n "(cached) " >&6
12924else
12925  case $XARGS in
12926  [\\/]* | ?:[\\/]*)
12927  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12928  ;;
12929  *)
12930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12931for as_dir in $PATH
12932do
12933  IFS=$as_save_IFS
12934  test -z "$as_dir" && as_dir=.
12935    for ac_exec_ext in '' $ac_executable_extensions; do
12936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12937    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12939    break 2
12940  fi
12941done
12942  done
12943IFS=$as_save_IFS
12944
12945  ;;
12946esac
12947fi
12948XARGS=$ac_cv_path_XARGS
12949if test -n "$XARGS"; then
12950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12951$as_echo "$XARGS" >&6; }
12952else
12953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12954$as_echo "no" >&6; }
12955fi
12956
12957
12958  test -n "$XARGS" && break
12959done
12960
12961  else
12962    # The variable is set, but is it from the command line or the environment?
12963
12964    # Try to remove the string !XARGS! from our list.
12965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12967      # If it failed, the variable was not from the command line. Ignore it,
12968      # but warn the user (except for BASH, which is always set by the calling BASH).
12969      if test "xXARGS" != xBASH; then
12970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12971$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12972      fi
12973      # Try to locate tool using the code snippet
12974      for ac_prog in xargs
12975do
12976  # Extract the first word of "$ac_prog", so it can be a program name with args.
12977set dummy $ac_prog; ac_word=$2
12978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12979$as_echo_n "checking for $ac_word... " >&6; }
12980if ${ac_cv_path_XARGS+:} false; then :
12981  $as_echo_n "(cached) " >&6
12982else
12983  case $XARGS in
12984  [\\/]* | ?:[\\/]*)
12985  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12986  ;;
12987  *)
12988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12989for as_dir in $PATH
12990do
12991  IFS=$as_save_IFS
12992  test -z "$as_dir" && as_dir=.
12993    for ac_exec_ext in '' $ac_executable_extensions; do
12994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12995    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12997    break 2
12998  fi
12999done
13000  done
13001IFS=$as_save_IFS
13002
13003  ;;
13004esac
13005fi
13006XARGS=$ac_cv_path_XARGS
13007if test -n "$XARGS"; then
13008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13009$as_echo "$XARGS" >&6; }
13010else
13011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13012$as_echo "no" >&6; }
13013fi
13014
13015
13016  test -n "$XARGS" && break
13017done
13018
13019    else
13020      # If it succeeded, then it was overridden by the user. We will use it
13021      # for the tool.
13022
13023      # First remove it from the list of overridden variables, so we can test
13024      # for unknown variables in the end.
13025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13026
13027      # Check if we try to supply an empty value
13028      if test "x$XARGS" = x; then
13029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13030$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13032$as_echo_n "checking for XARGS... " >&6; }
13033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13034$as_echo "disabled" >&6; }
13035      else
13036        # Check if the provided tool contains a complete path.
13037        tool_specified="$XARGS"
13038        tool_basename="${tool_specified##*/}"
13039        if test "x$tool_basename" = "x$tool_specified"; then
13040          # A command without a complete path is provided, search $PATH.
13041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13042$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13043          # Extract the first word of "$tool_basename", so it can be a program name with args.
13044set dummy $tool_basename; ac_word=$2
13045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13046$as_echo_n "checking for $ac_word... " >&6; }
13047if ${ac_cv_path_XARGS+:} false; then :
13048  $as_echo_n "(cached) " >&6
13049else
13050  case $XARGS in
13051  [\\/]* | ?:[\\/]*)
13052  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13053  ;;
13054  *)
13055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13056for as_dir in $PATH
13057do
13058  IFS=$as_save_IFS
13059  test -z "$as_dir" && as_dir=.
13060    for ac_exec_ext in '' $ac_executable_extensions; do
13061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13062    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13064    break 2
13065  fi
13066done
13067  done
13068IFS=$as_save_IFS
13069
13070  ;;
13071esac
13072fi
13073XARGS=$ac_cv_path_XARGS
13074if test -n "$XARGS"; then
13075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13076$as_echo "$XARGS" >&6; }
13077else
13078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13079$as_echo "no" >&6; }
13080fi
13081
13082
13083          if test "x$XARGS" = x; then
13084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13085          fi
13086        else
13087          # Otherwise we believe it is a complete path. Use it as it is.
13088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13089$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13091$as_echo_n "checking for XARGS... " >&6; }
13092          if test ! -x "$tool_specified"; then
13093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13094$as_echo "not found" >&6; }
13095            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13096          fi
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13098$as_echo "$tool_specified" >&6; }
13099        fi
13100      fi
13101    fi
13102
13103  fi
13104
13105
13106
13107  if test "x$XARGS" = x; then
13108    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13109  fi
13110
13111
13112
13113  # Then required tools that require some special treatment.
13114
13115
13116  # Publish this variable in the help.
13117
13118
13119  if [ -z "${AWK+x}" ]; then
13120    # The variable is not set by user, try to locate tool using the code snippet
13121    for ac_prog in gawk mawk nawk awk
13122do
13123  # Extract the first word of "$ac_prog", so it can be a program name with args.
13124set dummy $ac_prog; ac_word=$2
13125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13126$as_echo_n "checking for $ac_word... " >&6; }
13127if ${ac_cv_prog_AWK+:} false; then :
13128  $as_echo_n "(cached) " >&6
13129else
13130  if test -n "$AWK"; then
13131  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13132else
13133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13134for as_dir in $PATH
13135do
13136  IFS=$as_save_IFS
13137  test -z "$as_dir" && as_dir=.
13138    for ac_exec_ext in '' $ac_executable_extensions; do
13139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13140    ac_cv_prog_AWK="$ac_prog"
13141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13142    break 2
13143  fi
13144done
13145  done
13146IFS=$as_save_IFS
13147
13148fi
13149fi
13150AWK=$ac_cv_prog_AWK
13151if test -n "$AWK"; then
13152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13153$as_echo "$AWK" >&6; }
13154else
13155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13156$as_echo "no" >&6; }
13157fi
13158
13159
13160  test -n "$AWK" && break
13161done
13162
13163  else
13164    # The variable is set, but is it from the command line or the environment?
13165
13166    # Try to remove the string !AWK! from our list.
13167    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13168    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13169      # If it failed, the variable was not from the command line. Ignore it,
13170      # but warn the user (except for BASH, which is always set by the calling BASH).
13171      if test "xAWK" != xBASH; then
13172        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13173$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13174      fi
13175      # Try to locate tool using the code snippet
13176      for ac_prog in gawk mawk nawk awk
13177do
13178  # Extract the first word of "$ac_prog", so it can be a program name with args.
13179set dummy $ac_prog; ac_word=$2
13180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13181$as_echo_n "checking for $ac_word... " >&6; }
13182if ${ac_cv_prog_AWK+:} false; then :
13183  $as_echo_n "(cached) " >&6
13184else
13185  if test -n "$AWK"; then
13186  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13187else
13188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13189for as_dir in $PATH
13190do
13191  IFS=$as_save_IFS
13192  test -z "$as_dir" && as_dir=.
13193    for ac_exec_ext in '' $ac_executable_extensions; do
13194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13195    ac_cv_prog_AWK="$ac_prog"
13196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13197    break 2
13198  fi
13199done
13200  done
13201IFS=$as_save_IFS
13202
13203fi
13204fi
13205AWK=$ac_cv_prog_AWK
13206if test -n "$AWK"; then
13207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13208$as_echo "$AWK" >&6; }
13209else
13210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13211$as_echo "no" >&6; }
13212fi
13213
13214
13215  test -n "$AWK" && break
13216done
13217
13218    else
13219      # If it succeeded, then it was overridden by the user. We will use it
13220      # for the tool.
13221
13222      # First remove it from the list of overridden variables, so we can test
13223      # for unknown variables in the end.
13224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13225
13226      # Check if we try to supply an empty value
13227      if test "x$AWK" = x; then
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13229$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13231$as_echo_n "checking for AWK... " >&6; }
13232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13233$as_echo "disabled" >&6; }
13234      else
13235        # Check if the provided tool contains a complete path.
13236        tool_specified="$AWK"
13237        tool_basename="${tool_specified##*/}"
13238        if test "x$tool_basename" = "x$tool_specified"; then
13239          # A command without a complete path is provided, search $PATH.
13240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13241$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13242          # Extract the first word of "$tool_basename", so it can be a program name with args.
13243set dummy $tool_basename; ac_word=$2
13244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13245$as_echo_n "checking for $ac_word... " >&6; }
13246if ${ac_cv_path_AWK+:} false; then :
13247  $as_echo_n "(cached) " >&6
13248else
13249  case $AWK in
13250  [\\/]* | ?:[\\/]*)
13251  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13252  ;;
13253  *)
13254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13255for as_dir in $PATH
13256do
13257  IFS=$as_save_IFS
13258  test -z "$as_dir" && as_dir=.
13259    for ac_exec_ext in '' $ac_executable_extensions; do
13260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13261    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13263    break 2
13264  fi
13265done
13266  done
13267IFS=$as_save_IFS
13268
13269  ;;
13270esac
13271fi
13272AWK=$ac_cv_path_AWK
13273if test -n "$AWK"; then
13274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13275$as_echo "$AWK" >&6; }
13276else
13277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13278$as_echo "no" >&6; }
13279fi
13280
13281
13282          if test "x$AWK" = x; then
13283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13284          fi
13285        else
13286          # Otherwise we believe it is a complete path. Use it as it is.
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13288$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13290$as_echo_n "checking for AWK... " >&6; }
13291          if test ! -x "$tool_specified"; then
13292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13293$as_echo "not found" >&6; }
13294            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13295          fi
13296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13297$as_echo "$tool_specified" >&6; }
13298        fi
13299      fi
13300    fi
13301
13302  fi
13303
13304
13305  if test "x$AWK" = x; then
13306    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13307  fi
13308
13309
13310
13311
13312  # Publish this variable in the help.
13313
13314
13315  if [ -z "${GREP+x}" ]; then
13316    # The variable is not set by user, try to locate tool using the code snippet
13317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13318$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13319if ${ac_cv_path_GREP+:} false; then :
13320  $as_echo_n "(cached) " >&6
13321else
13322  if test -z "$GREP"; then
13323  ac_path_GREP_found=false
13324  # Loop through the user's path and test for each of PROGNAME-LIST
13325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13326for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13327do
13328  IFS=$as_save_IFS
13329  test -z "$as_dir" && as_dir=.
13330    for ac_prog in grep ggrep; do
13331    for ac_exec_ext in '' $ac_executable_extensions; do
13332      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13333      as_fn_executable_p "$ac_path_GREP" || continue
13334# Check for GNU ac_path_GREP and select it if it is found.
13335  # Check for GNU $ac_path_GREP
13336case `"$ac_path_GREP" --version 2>&1` in
13337*GNU*)
13338  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13339*)
13340  ac_count=0
13341  $as_echo_n 0123456789 >"conftest.in"
13342  while :
13343  do
13344    cat "conftest.in" "conftest.in" >"conftest.tmp"
13345    mv "conftest.tmp" "conftest.in"
13346    cp "conftest.in" "conftest.nl"
13347    $as_echo 'GREP' >> "conftest.nl"
13348    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13349    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13350    as_fn_arith $ac_count + 1 && ac_count=$as_val
13351    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13352      # Best one so far, save it but keep looking for a better one
13353      ac_cv_path_GREP="$ac_path_GREP"
13354      ac_path_GREP_max=$ac_count
13355    fi
13356    # 10*(2^10) chars as input seems more than enough
13357    test $ac_count -gt 10 && break
13358  done
13359  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13360esac
13361
13362      $ac_path_GREP_found && break 3
13363    done
13364  done
13365  done
13366IFS=$as_save_IFS
13367  if test -z "$ac_cv_path_GREP"; then
13368    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13369  fi
13370else
13371  ac_cv_path_GREP=$GREP
13372fi
13373
13374fi
13375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13376$as_echo "$ac_cv_path_GREP" >&6; }
13377 GREP="$ac_cv_path_GREP"
13378
13379
13380  else
13381    # The variable is set, but is it from the command line or the environment?
13382
13383    # Try to remove the string !GREP! from our list.
13384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13386      # If it failed, the variable was not from the command line. Ignore it,
13387      # but warn the user (except for BASH, which is always set by the calling BASH).
13388      if test "xGREP" != xBASH; then
13389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13390$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13391      fi
13392      # Try to locate tool using the code snippet
13393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13394$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13395if ${ac_cv_path_GREP+:} false; then :
13396  $as_echo_n "(cached) " >&6
13397else
13398  if test -z "$GREP"; then
13399  ac_path_GREP_found=false
13400  # Loop through the user's path and test for each of PROGNAME-LIST
13401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13402for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13403do
13404  IFS=$as_save_IFS
13405  test -z "$as_dir" && as_dir=.
13406    for ac_prog in grep ggrep; do
13407    for ac_exec_ext in '' $ac_executable_extensions; do
13408      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13409      as_fn_executable_p "$ac_path_GREP" || continue
13410# Check for GNU ac_path_GREP and select it if it is found.
13411  # Check for GNU $ac_path_GREP
13412case `"$ac_path_GREP" --version 2>&1` in
13413*GNU*)
13414  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13415*)
13416  ac_count=0
13417  $as_echo_n 0123456789 >"conftest.in"
13418  while :
13419  do
13420    cat "conftest.in" "conftest.in" >"conftest.tmp"
13421    mv "conftest.tmp" "conftest.in"
13422    cp "conftest.in" "conftest.nl"
13423    $as_echo 'GREP' >> "conftest.nl"
13424    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13425    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13426    as_fn_arith $ac_count + 1 && ac_count=$as_val
13427    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13428      # Best one so far, save it but keep looking for a better one
13429      ac_cv_path_GREP="$ac_path_GREP"
13430      ac_path_GREP_max=$ac_count
13431    fi
13432    # 10*(2^10) chars as input seems more than enough
13433    test $ac_count -gt 10 && break
13434  done
13435  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13436esac
13437
13438      $ac_path_GREP_found && break 3
13439    done
13440  done
13441  done
13442IFS=$as_save_IFS
13443  if test -z "$ac_cv_path_GREP"; then
13444    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13445  fi
13446else
13447  ac_cv_path_GREP=$GREP
13448fi
13449
13450fi
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13452$as_echo "$ac_cv_path_GREP" >&6; }
13453 GREP="$ac_cv_path_GREP"
13454
13455
13456    else
13457      # If it succeeded, then it was overridden by the user. We will use it
13458      # for the tool.
13459
13460      # First remove it from the list of overridden variables, so we can test
13461      # for unknown variables in the end.
13462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13463
13464      # Check if we try to supply an empty value
13465      if test "x$GREP" = x; then
13466        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13467$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13469$as_echo_n "checking for GREP... " >&6; }
13470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13471$as_echo "disabled" >&6; }
13472      else
13473        # Check if the provided tool contains a complete path.
13474        tool_specified="$GREP"
13475        tool_basename="${tool_specified##*/}"
13476        if test "x$tool_basename" = "x$tool_specified"; then
13477          # A command without a complete path is provided, search $PATH.
13478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13479$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13480          # Extract the first word of "$tool_basename", so it can be a program name with args.
13481set dummy $tool_basename; ac_word=$2
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13483$as_echo_n "checking for $ac_word... " >&6; }
13484if ${ac_cv_path_GREP+:} false; then :
13485  $as_echo_n "(cached) " >&6
13486else
13487  case $GREP in
13488  [\\/]* | ?:[\\/]*)
13489  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13490  ;;
13491  *)
13492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13493for as_dir in $PATH
13494do
13495  IFS=$as_save_IFS
13496  test -z "$as_dir" && as_dir=.
13497    for ac_exec_ext in '' $ac_executable_extensions; do
13498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13499    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13501    break 2
13502  fi
13503done
13504  done
13505IFS=$as_save_IFS
13506
13507  ;;
13508esac
13509fi
13510GREP=$ac_cv_path_GREP
13511if test -n "$GREP"; then
13512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13513$as_echo "$GREP" >&6; }
13514else
13515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13516$as_echo "no" >&6; }
13517fi
13518
13519
13520          if test "x$GREP" = x; then
13521            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13522          fi
13523        else
13524          # Otherwise we believe it is a complete path. Use it as it is.
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13526$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13527          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13528$as_echo_n "checking for GREP... " >&6; }
13529          if test ! -x "$tool_specified"; then
13530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13531$as_echo "not found" >&6; }
13532            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13533          fi
13534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13535$as_echo "$tool_specified" >&6; }
13536        fi
13537      fi
13538    fi
13539
13540  fi
13541
13542
13543  if test "x$GREP" = x; then
13544    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13545  fi
13546
13547
13548
13549
13550  # Publish this variable in the help.
13551
13552
13553  if [ -z "${EGREP+x}" ]; then
13554    # The variable is not set by user, try to locate tool using the code snippet
13555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13556$as_echo_n "checking for egrep... " >&6; }
13557if ${ac_cv_path_EGREP+:} false; then :
13558  $as_echo_n "(cached) " >&6
13559else
13560  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13561   then ac_cv_path_EGREP="$GREP -E"
13562   else
13563     if test -z "$EGREP"; then
13564  ac_path_EGREP_found=false
13565  # Loop through the user's path and test for each of PROGNAME-LIST
13566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13567for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13568do
13569  IFS=$as_save_IFS
13570  test -z "$as_dir" && as_dir=.
13571    for ac_prog in egrep; do
13572    for ac_exec_ext in '' $ac_executable_extensions; do
13573      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13574      as_fn_executable_p "$ac_path_EGREP" || continue
13575# Check for GNU ac_path_EGREP and select it if it is found.
13576  # Check for GNU $ac_path_EGREP
13577case `"$ac_path_EGREP" --version 2>&1` in
13578*GNU*)
13579  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13580*)
13581  ac_count=0
13582  $as_echo_n 0123456789 >"conftest.in"
13583  while :
13584  do
13585    cat "conftest.in" "conftest.in" >"conftest.tmp"
13586    mv "conftest.tmp" "conftest.in"
13587    cp "conftest.in" "conftest.nl"
13588    $as_echo 'EGREP' >> "conftest.nl"
13589    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13590    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13591    as_fn_arith $ac_count + 1 && ac_count=$as_val
13592    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13593      # Best one so far, save it but keep looking for a better one
13594      ac_cv_path_EGREP="$ac_path_EGREP"
13595      ac_path_EGREP_max=$ac_count
13596    fi
13597    # 10*(2^10) chars as input seems more than enough
13598    test $ac_count -gt 10 && break
13599  done
13600  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13601esac
13602
13603      $ac_path_EGREP_found && break 3
13604    done
13605  done
13606  done
13607IFS=$as_save_IFS
13608  if test -z "$ac_cv_path_EGREP"; then
13609    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13610  fi
13611else
13612  ac_cv_path_EGREP=$EGREP
13613fi
13614
13615   fi
13616fi
13617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13618$as_echo "$ac_cv_path_EGREP" >&6; }
13619 EGREP="$ac_cv_path_EGREP"
13620
13621
13622  else
13623    # The variable is set, but is it from the command line or the environment?
13624
13625    # Try to remove the string !EGREP! from our list.
13626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13628      # If it failed, the variable was not from the command line. Ignore it,
13629      # but warn the user (except for BASH, which is always set by the calling BASH).
13630      if test "xEGREP" != xBASH; then
13631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13632$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13633      fi
13634      # Try to locate tool using the code snippet
13635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13636$as_echo_n "checking for egrep... " >&6; }
13637if ${ac_cv_path_EGREP+:} false; then :
13638  $as_echo_n "(cached) " >&6
13639else
13640  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13641   then ac_cv_path_EGREP="$GREP -E"
13642   else
13643     if test -z "$EGREP"; then
13644  ac_path_EGREP_found=false
13645  # Loop through the user's path and test for each of PROGNAME-LIST
13646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13647for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13648do
13649  IFS=$as_save_IFS
13650  test -z "$as_dir" && as_dir=.
13651    for ac_prog in egrep; do
13652    for ac_exec_ext in '' $ac_executable_extensions; do
13653      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13654      as_fn_executable_p "$ac_path_EGREP" || continue
13655# Check for GNU ac_path_EGREP and select it if it is found.
13656  # Check for GNU $ac_path_EGREP
13657case `"$ac_path_EGREP" --version 2>&1` in
13658*GNU*)
13659  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13660*)
13661  ac_count=0
13662  $as_echo_n 0123456789 >"conftest.in"
13663  while :
13664  do
13665    cat "conftest.in" "conftest.in" >"conftest.tmp"
13666    mv "conftest.tmp" "conftest.in"
13667    cp "conftest.in" "conftest.nl"
13668    $as_echo 'EGREP' >> "conftest.nl"
13669    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13670    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13671    as_fn_arith $ac_count + 1 && ac_count=$as_val
13672    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13673      # Best one so far, save it but keep looking for a better one
13674      ac_cv_path_EGREP="$ac_path_EGREP"
13675      ac_path_EGREP_max=$ac_count
13676    fi
13677    # 10*(2^10) chars as input seems more than enough
13678    test $ac_count -gt 10 && break
13679  done
13680  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13681esac
13682
13683      $ac_path_EGREP_found && break 3
13684    done
13685  done
13686  done
13687IFS=$as_save_IFS
13688  if test -z "$ac_cv_path_EGREP"; then
13689    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13690  fi
13691else
13692  ac_cv_path_EGREP=$EGREP
13693fi
13694
13695   fi
13696fi
13697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13698$as_echo "$ac_cv_path_EGREP" >&6; }
13699 EGREP="$ac_cv_path_EGREP"
13700
13701
13702    else
13703      # If it succeeded, then it was overridden by the user. We will use it
13704      # for the tool.
13705
13706      # First remove it from the list of overridden variables, so we can test
13707      # for unknown variables in the end.
13708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13709
13710      # Check if we try to supply an empty value
13711      if test "x$EGREP" = x; then
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13713$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13715$as_echo_n "checking for EGREP... " >&6; }
13716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13717$as_echo "disabled" >&6; }
13718      else
13719        # Check if the provided tool contains a complete path.
13720        tool_specified="$EGREP"
13721        tool_basename="${tool_specified##*/}"
13722        if test "x$tool_basename" = "x$tool_specified"; then
13723          # A command without a complete path is provided, search $PATH.
13724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13725$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13726          # Extract the first word of "$tool_basename", so it can be a program name with args.
13727set dummy $tool_basename; ac_word=$2
13728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13729$as_echo_n "checking for $ac_word... " >&6; }
13730if ${ac_cv_path_EGREP+:} false; then :
13731  $as_echo_n "(cached) " >&6
13732else
13733  case $EGREP in
13734  [\\/]* | ?:[\\/]*)
13735  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13736  ;;
13737  *)
13738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13739for as_dir in $PATH
13740do
13741  IFS=$as_save_IFS
13742  test -z "$as_dir" && as_dir=.
13743    for ac_exec_ext in '' $ac_executable_extensions; do
13744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13745    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13747    break 2
13748  fi
13749done
13750  done
13751IFS=$as_save_IFS
13752
13753  ;;
13754esac
13755fi
13756EGREP=$ac_cv_path_EGREP
13757if test -n "$EGREP"; then
13758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13759$as_echo "$EGREP" >&6; }
13760else
13761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13762$as_echo "no" >&6; }
13763fi
13764
13765
13766          if test "x$EGREP" = x; then
13767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13768          fi
13769        else
13770          # Otherwise we believe it is a complete path. Use it as it is.
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13772$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13774$as_echo_n "checking for EGREP... " >&6; }
13775          if test ! -x "$tool_specified"; then
13776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13777$as_echo "not found" >&6; }
13778            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13779          fi
13780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13781$as_echo "$tool_specified" >&6; }
13782        fi
13783      fi
13784    fi
13785
13786  fi
13787
13788
13789  if test "x$EGREP" = x; then
13790    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13791  fi
13792
13793
13794
13795
13796  # Publish this variable in the help.
13797
13798
13799  if [ -z "${FGREP+x}" ]; then
13800    # The variable is not set by user, try to locate tool using the code snippet
13801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13802$as_echo_n "checking for fgrep... " >&6; }
13803if ${ac_cv_path_FGREP+:} false; then :
13804  $as_echo_n "(cached) " >&6
13805else
13806  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13807   then ac_cv_path_FGREP="$GREP -F"
13808   else
13809     if test -z "$FGREP"; then
13810  ac_path_FGREP_found=false
13811  # Loop through the user's path and test for each of PROGNAME-LIST
13812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13813for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13814do
13815  IFS=$as_save_IFS
13816  test -z "$as_dir" && as_dir=.
13817    for ac_prog in fgrep; do
13818    for ac_exec_ext in '' $ac_executable_extensions; do
13819      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13820      as_fn_executable_p "$ac_path_FGREP" || continue
13821# Check for GNU ac_path_FGREP and select it if it is found.
13822  # Check for GNU $ac_path_FGREP
13823case `"$ac_path_FGREP" --version 2>&1` in
13824*GNU*)
13825  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13826*)
13827  ac_count=0
13828  $as_echo_n 0123456789 >"conftest.in"
13829  while :
13830  do
13831    cat "conftest.in" "conftest.in" >"conftest.tmp"
13832    mv "conftest.tmp" "conftest.in"
13833    cp "conftest.in" "conftest.nl"
13834    $as_echo 'FGREP' >> "conftest.nl"
13835    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13836    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13837    as_fn_arith $ac_count + 1 && ac_count=$as_val
13838    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13839      # Best one so far, save it but keep looking for a better one
13840      ac_cv_path_FGREP="$ac_path_FGREP"
13841      ac_path_FGREP_max=$ac_count
13842    fi
13843    # 10*(2^10) chars as input seems more than enough
13844    test $ac_count -gt 10 && break
13845  done
13846  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13847esac
13848
13849      $ac_path_FGREP_found && break 3
13850    done
13851  done
13852  done
13853IFS=$as_save_IFS
13854  if test -z "$ac_cv_path_FGREP"; then
13855    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13856  fi
13857else
13858  ac_cv_path_FGREP=$FGREP
13859fi
13860
13861   fi
13862fi
13863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13864$as_echo "$ac_cv_path_FGREP" >&6; }
13865 FGREP="$ac_cv_path_FGREP"
13866
13867
13868  else
13869    # The variable is set, but is it from the command line or the environment?
13870
13871    # Try to remove the string !FGREP! from our list.
13872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13874      # If it failed, the variable was not from the command line. Ignore it,
13875      # but warn the user (except for BASH, which is always set by the calling BASH).
13876      if test "xFGREP" != xBASH; then
13877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13878$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13879      fi
13880      # Try to locate tool using the code snippet
13881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13882$as_echo_n "checking for fgrep... " >&6; }
13883if ${ac_cv_path_FGREP+:} false; then :
13884  $as_echo_n "(cached) " >&6
13885else
13886  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13887   then ac_cv_path_FGREP="$GREP -F"
13888   else
13889     if test -z "$FGREP"; then
13890  ac_path_FGREP_found=false
13891  # Loop through the user's path and test for each of PROGNAME-LIST
13892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13893for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13894do
13895  IFS=$as_save_IFS
13896  test -z "$as_dir" && as_dir=.
13897    for ac_prog in fgrep; do
13898    for ac_exec_ext in '' $ac_executable_extensions; do
13899      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13900      as_fn_executable_p "$ac_path_FGREP" || continue
13901# Check for GNU ac_path_FGREP and select it if it is found.
13902  # Check for GNU $ac_path_FGREP
13903case `"$ac_path_FGREP" --version 2>&1` in
13904*GNU*)
13905  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13906*)
13907  ac_count=0
13908  $as_echo_n 0123456789 >"conftest.in"
13909  while :
13910  do
13911    cat "conftest.in" "conftest.in" >"conftest.tmp"
13912    mv "conftest.tmp" "conftest.in"
13913    cp "conftest.in" "conftest.nl"
13914    $as_echo 'FGREP' >> "conftest.nl"
13915    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13916    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13917    as_fn_arith $ac_count + 1 && ac_count=$as_val
13918    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13919      # Best one so far, save it but keep looking for a better one
13920      ac_cv_path_FGREP="$ac_path_FGREP"
13921      ac_path_FGREP_max=$ac_count
13922    fi
13923    # 10*(2^10) chars as input seems more than enough
13924    test $ac_count -gt 10 && break
13925  done
13926  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13927esac
13928
13929      $ac_path_FGREP_found && break 3
13930    done
13931  done
13932  done
13933IFS=$as_save_IFS
13934  if test -z "$ac_cv_path_FGREP"; then
13935    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13936  fi
13937else
13938  ac_cv_path_FGREP=$FGREP
13939fi
13940
13941   fi
13942fi
13943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13944$as_echo "$ac_cv_path_FGREP" >&6; }
13945 FGREP="$ac_cv_path_FGREP"
13946
13947
13948    else
13949      # If it succeeded, then it was overridden by the user. We will use it
13950      # for the tool.
13951
13952      # First remove it from the list of overridden variables, so we can test
13953      # for unknown variables in the end.
13954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13955
13956      # Check if we try to supply an empty value
13957      if test "x$FGREP" = x; then
13958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13959$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13961$as_echo_n "checking for FGREP... " >&6; }
13962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13963$as_echo "disabled" >&6; }
13964      else
13965        # Check if the provided tool contains a complete path.
13966        tool_specified="$FGREP"
13967        tool_basename="${tool_specified##*/}"
13968        if test "x$tool_basename" = "x$tool_specified"; then
13969          # A command without a complete path is provided, search $PATH.
13970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13971$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13972          # Extract the first word of "$tool_basename", so it can be a program name with args.
13973set dummy $tool_basename; ac_word=$2
13974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13975$as_echo_n "checking for $ac_word... " >&6; }
13976if ${ac_cv_path_FGREP+:} false; then :
13977  $as_echo_n "(cached) " >&6
13978else
13979  case $FGREP in
13980  [\\/]* | ?:[\\/]*)
13981  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13982  ;;
13983  *)
13984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13985for as_dir in $PATH
13986do
13987  IFS=$as_save_IFS
13988  test -z "$as_dir" && as_dir=.
13989    for ac_exec_ext in '' $ac_executable_extensions; do
13990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13991    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13993    break 2
13994  fi
13995done
13996  done
13997IFS=$as_save_IFS
13998
13999  ;;
14000esac
14001fi
14002FGREP=$ac_cv_path_FGREP
14003if test -n "$FGREP"; then
14004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14005$as_echo "$FGREP" >&6; }
14006else
14007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14008$as_echo "no" >&6; }
14009fi
14010
14011
14012          if test "x$FGREP" = x; then
14013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14014          fi
14015        else
14016          # Otherwise we believe it is a complete path. Use it as it is.
14017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14018$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14020$as_echo_n "checking for FGREP... " >&6; }
14021          if test ! -x "$tool_specified"; then
14022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14023$as_echo "not found" >&6; }
14024            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14025          fi
14026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14027$as_echo "$tool_specified" >&6; }
14028        fi
14029      fi
14030    fi
14031
14032  fi
14033
14034
14035  if test "x$FGREP" = x; then
14036    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14037  fi
14038
14039
14040
14041
14042  # Publish this variable in the help.
14043
14044
14045  if [ -z "${SED+x}" ]; then
14046    # The variable is not set by user, try to locate tool using the code snippet
14047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14048$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14049if ${ac_cv_path_SED+:} false; then :
14050  $as_echo_n "(cached) " >&6
14051else
14052            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14053     for ac_i in 1 2 3 4 5 6 7; do
14054       ac_script="$ac_script$as_nl$ac_script"
14055     done
14056     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14057     { ac_script=; unset ac_script;}
14058     if test -z "$SED"; then
14059  ac_path_SED_found=false
14060  # Loop through the user's path and test for each of PROGNAME-LIST
14061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14062for as_dir in $PATH
14063do
14064  IFS=$as_save_IFS
14065  test -z "$as_dir" && as_dir=.
14066    for ac_prog in sed gsed; do
14067    for ac_exec_ext in '' $ac_executable_extensions; do
14068      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14069      as_fn_executable_p "$ac_path_SED" || continue
14070# Check for GNU ac_path_SED and select it if it is found.
14071  # Check for GNU $ac_path_SED
14072case `"$ac_path_SED" --version 2>&1` in
14073*GNU*)
14074  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14075*)
14076  ac_count=0
14077  $as_echo_n 0123456789 >"conftest.in"
14078  while :
14079  do
14080    cat "conftest.in" "conftest.in" >"conftest.tmp"
14081    mv "conftest.tmp" "conftest.in"
14082    cp "conftest.in" "conftest.nl"
14083    $as_echo '' >> "conftest.nl"
14084    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14085    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14086    as_fn_arith $ac_count + 1 && ac_count=$as_val
14087    if test $ac_count -gt ${ac_path_SED_max-0}; then
14088      # Best one so far, save it but keep looking for a better one
14089      ac_cv_path_SED="$ac_path_SED"
14090      ac_path_SED_max=$ac_count
14091    fi
14092    # 10*(2^10) chars as input seems more than enough
14093    test $ac_count -gt 10 && break
14094  done
14095  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14096esac
14097
14098      $ac_path_SED_found && break 3
14099    done
14100  done
14101  done
14102IFS=$as_save_IFS
14103  if test -z "$ac_cv_path_SED"; then
14104    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14105  fi
14106else
14107  ac_cv_path_SED=$SED
14108fi
14109
14110fi
14111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14112$as_echo "$ac_cv_path_SED" >&6; }
14113 SED="$ac_cv_path_SED"
14114  rm -f conftest.sed
14115
14116  else
14117    # The variable is set, but is it from the command line or the environment?
14118
14119    # Try to remove the string !SED! from our list.
14120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14122      # If it failed, the variable was not from the command line. Ignore it,
14123      # but warn the user (except for BASH, which is always set by the calling BASH).
14124      if test "xSED" != xBASH; then
14125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14126$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14127      fi
14128      # Try to locate tool using the code snippet
14129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14130$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14131if ${ac_cv_path_SED+:} false; then :
14132  $as_echo_n "(cached) " >&6
14133else
14134            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14135     for ac_i in 1 2 3 4 5 6 7; do
14136       ac_script="$ac_script$as_nl$ac_script"
14137     done
14138     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14139     { ac_script=; unset ac_script;}
14140     if test -z "$SED"; then
14141  ac_path_SED_found=false
14142  # Loop through the user's path and test for each of PROGNAME-LIST
14143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14144for as_dir in $PATH
14145do
14146  IFS=$as_save_IFS
14147  test -z "$as_dir" && as_dir=.
14148    for ac_prog in sed gsed; do
14149    for ac_exec_ext in '' $ac_executable_extensions; do
14150      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14151      as_fn_executable_p "$ac_path_SED" || continue
14152# Check for GNU ac_path_SED and select it if it is found.
14153  # Check for GNU $ac_path_SED
14154case `"$ac_path_SED" --version 2>&1` in
14155*GNU*)
14156  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14157*)
14158  ac_count=0
14159  $as_echo_n 0123456789 >"conftest.in"
14160  while :
14161  do
14162    cat "conftest.in" "conftest.in" >"conftest.tmp"
14163    mv "conftest.tmp" "conftest.in"
14164    cp "conftest.in" "conftest.nl"
14165    $as_echo '' >> "conftest.nl"
14166    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14167    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14168    as_fn_arith $ac_count + 1 && ac_count=$as_val
14169    if test $ac_count -gt ${ac_path_SED_max-0}; then
14170      # Best one so far, save it but keep looking for a better one
14171      ac_cv_path_SED="$ac_path_SED"
14172      ac_path_SED_max=$ac_count
14173    fi
14174    # 10*(2^10) chars as input seems more than enough
14175    test $ac_count -gt 10 && break
14176  done
14177  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14178esac
14179
14180      $ac_path_SED_found && break 3
14181    done
14182  done
14183  done
14184IFS=$as_save_IFS
14185  if test -z "$ac_cv_path_SED"; then
14186    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14187  fi
14188else
14189  ac_cv_path_SED=$SED
14190fi
14191
14192fi
14193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14194$as_echo "$ac_cv_path_SED" >&6; }
14195 SED="$ac_cv_path_SED"
14196  rm -f conftest.sed
14197
14198    else
14199      # If it succeeded, then it was overridden by the user. We will use it
14200      # for the tool.
14201
14202      # First remove it from the list of overridden variables, so we can test
14203      # for unknown variables in the end.
14204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14205
14206      # Check if we try to supply an empty value
14207      if test "x$SED" = x; then
14208        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14209$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14211$as_echo_n "checking for SED... " >&6; }
14212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14213$as_echo "disabled" >&6; }
14214      else
14215        # Check if the provided tool contains a complete path.
14216        tool_specified="$SED"
14217        tool_basename="${tool_specified##*/}"
14218        if test "x$tool_basename" = "x$tool_specified"; then
14219          # A command without a complete path is provided, search $PATH.
14220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14221$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14222          # Extract the first word of "$tool_basename", so it can be a program name with args.
14223set dummy $tool_basename; ac_word=$2
14224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14225$as_echo_n "checking for $ac_word... " >&6; }
14226if ${ac_cv_path_SED+:} false; then :
14227  $as_echo_n "(cached) " >&6
14228else
14229  case $SED in
14230  [\\/]* | ?:[\\/]*)
14231  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14232  ;;
14233  *)
14234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14235for as_dir in $PATH
14236do
14237  IFS=$as_save_IFS
14238  test -z "$as_dir" && as_dir=.
14239    for ac_exec_ext in '' $ac_executable_extensions; do
14240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14241    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14243    break 2
14244  fi
14245done
14246  done
14247IFS=$as_save_IFS
14248
14249  ;;
14250esac
14251fi
14252SED=$ac_cv_path_SED
14253if test -n "$SED"; then
14254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14255$as_echo "$SED" >&6; }
14256else
14257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14258$as_echo "no" >&6; }
14259fi
14260
14261
14262          if test "x$SED" = x; then
14263            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14264          fi
14265        else
14266          # Otherwise we believe it is a complete path. Use it as it is.
14267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14268$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14269          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14270$as_echo_n "checking for SED... " >&6; }
14271          if test ! -x "$tool_specified"; then
14272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14273$as_echo "not found" >&6; }
14274            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14275          fi
14276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14277$as_echo "$tool_specified" >&6; }
14278        fi
14279      fi
14280    fi
14281
14282  fi
14283
14284
14285  if test "x$SED" = x; then
14286    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14287  fi
14288
14289
14290
14291  # Always force rm.
14292  RM="$RM -f"
14293
14294  # pwd behaves differently on various platforms and some don't support the -L flag.
14295  # Always use the bash builtin pwd to get uniform behavior.
14296  THEPWDCMD=pwd
14297
14298  # These are not required on all platforms
14299
14300
14301  # Publish this variable in the help.
14302
14303
14304  if [ -z "${CYGPATH+x}" ]; then
14305    # The variable is not set by user, try to locate tool using the code snippet
14306    for ac_prog in cygpath
14307do
14308  # Extract the first word of "$ac_prog", so it can be a program name with args.
14309set dummy $ac_prog; ac_word=$2
14310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14311$as_echo_n "checking for $ac_word... " >&6; }
14312if ${ac_cv_path_CYGPATH+:} false; then :
14313  $as_echo_n "(cached) " >&6
14314else
14315  case $CYGPATH in
14316  [\\/]* | ?:[\\/]*)
14317  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14318  ;;
14319  *)
14320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14321for as_dir in $PATH
14322do
14323  IFS=$as_save_IFS
14324  test -z "$as_dir" && as_dir=.
14325    for ac_exec_ext in '' $ac_executable_extensions; do
14326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14327    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14329    break 2
14330  fi
14331done
14332  done
14333IFS=$as_save_IFS
14334
14335  ;;
14336esac
14337fi
14338CYGPATH=$ac_cv_path_CYGPATH
14339if test -n "$CYGPATH"; then
14340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14341$as_echo "$CYGPATH" >&6; }
14342else
14343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14344$as_echo "no" >&6; }
14345fi
14346
14347
14348  test -n "$CYGPATH" && break
14349done
14350
14351  else
14352    # The variable is set, but is it from the command line or the environment?
14353
14354    # Try to remove the string !CYGPATH! from our list.
14355    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14356    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14357      # If it failed, the variable was not from the command line. Ignore it,
14358      # but warn the user (except for BASH, which is always set by the calling BASH).
14359      if test "xCYGPATH" != xBASH; then
14360        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14361$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14362      fi
14363      # Try to locate tool using the code snippet
14364      for ac_prog in cygpath
14365do
14366  # Extract the first word of "$ac_prog", so it can be a program name with args.
14367set dummy $ac_prog; ac_word=$2
14368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14369$as_echo_n "checking for $ac_word... " >&6; }
14370if ${ac_cv_path_CYGPATH+:} false; then :
14371  $as_echo_n "(cached) " >&6
14372else
14373  case $CYGPATH in
14374  [\\/]* | ?:[\\/]*)
14375  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14376  ;;
14377  *)
14378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14379for as_dir in $PATH
14380do
14381  IFS=$as_save_IFS
14382  test -z "$as_dir" && as_dir=.
14383    for ac_exec_ext in '' $ac_executable_extensions; do
14384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14385    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14387    break 2
14388  fi
14389done
14390  done
14391IFS=$as_save_IFS
14392
14393  ;;
14394esac
14395fi
14396CYGPATH=$ac_cv_path_CYGPATH
14397if test -n "$CYGPATH"; then
14398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14399$as_echo "$CYGPATH" >&6; }
14400else
14401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14402$as_echo "no" >&6; }
14403fi
14404
14405
14406  test -n "$CYGPATH" && break
14407done
14408
14409    else
14410      # If it succeeded, then it was overridden by the user. We will use it
14411      # for the tool.
14412
14413      # First remove it from the list of overridden variables, so we can test
14414      # for unknown variables in the end.
14415      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14416
14417      # Check if we try to supply an empty value
14418      if test "x$CYGPATH" = x; then
14419        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14420$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14422$as_echo_n "checking for CYGPATH... " >&6; }
14423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14424$as_echo "disabled" >&6; }
14425      else
14426        # Check if the provided tool contains a complete path.
14427        tool_specified="$CYGPATH"
14428        tool_basename="${tool_specified##*/}"
14429        if test "x$tool_basename" = "x$tool_specified"; then
14430          # A command without a complete path is provided, search $PATH.
14431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14432$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14433          # Extract the first word of "$tool_basename", so it can be a program name with args.
14434set dummy $tool_basename; ac_word=$2
14435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14436$as_echo_n "checking for $ac_word... " >&6; }
14437if ${ac_cv_path_CYGPATH+:} false; then :
14438  $as_echo_n "(cached) " >&6
14439else
14440  case $CYGPATH in
14441  [\\/]* | ?:[\\/]*)
14442  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14443  ;;
14444  *)
14445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14446for as_dir in $PATH
14447do
14448  IFS=$as_save_IFS
14449  test -z "$as_dir" && as_dir=.
14450    for ac_exec_ext in '' $ac_executable_extensions; do
14451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14452    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14454    break 2
14455  fi
14456done
14457  done
14458IFS=$as_save_IFS
14459
14460  ;;
14461esac
14462fi
14463CYGPATH=$ac_cv_path_CYGPATH
14464if test -n "$CYGPATH"; then
14465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14466$as_echo "$CYGPATH" >&6; }
14467else
14468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14469$as_echo "no" >&6; }
14470fi
14471
14472
14473          if test "x$CYGPATH" = x; then
14474            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14475          fi
14476        else
14477          # Otherwise we believe it is a complete path. Use it as it is.
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14479$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14480          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14481$as_echo_n "checking for CYGPATH... " >&6; }
14482          if test ! -x "$tool_specified"; then
14483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14484$as_echo "not found" >&6; }
14485            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14486          fi
14487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14488$as_echo "$tool_specified" >&6; }
14489        fi
14490      fi
14491    fi
14492
14493  fi
14494
14495
14496
14497
14498  # Publish this variable in the help.
14499
14500
14501  if [ -z "${READLINK+x}" ]; then
14502    # The variable is not set by user, try to locate tool using the code snippet
14503    for ac_prog in greadlink readlink
14504do
14505  # Extract the first word of "$ac_prog", so it can be a program name with args.
14506set dummy $ac_prog; ac_word=$2
14507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14508$as_echo_n "checking for $ac_word... " >&6; }
14509if ${ac_cv_path_READLINK+:} false; then :
14510  $as_echo_n "(cached) " >&6
14511else
14512  case $READLINK in
14513  [\\/]* | ?:[\\/]*)
14514  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14515  ;;
14516  *)
14517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14518for as_dir in $PATH
14519do
14520  IFS=$as_save_IFS
14521  test -z "$as_dir" && as_dir=.
14522    for ac_exec_ext in '' $ac_executable_extensions; do
14523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14524    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14526    break 2
14527  fi
14528done
14529  done
14530IFS=$as_save_IFS
14531
14532  ;;
14533esac
14534fi
14535READLINK=$ac_cv_path_READLINK
14536if test -n "$READLINK"; then
14537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14538$as_echo "$READLINK" >&6; }
14539else
14540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14541$as_echo "no" >&6; }
14542fi
14543
14544
14545  test -n "$READLINK" && break
14546done
14547
14548  else
14549    # The variable is set, but is it from the command line or the environment?
14550
14551    # Try to remove the string !READLINK! from our list.
14552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14554      # If it failed, the variable was not from the command line. Ignore it,
14555      # but warn the user (except for BASH, which is always set by the calling BASH).
14556      if test "xREADLINK" != xBASH; then
14557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14558$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14559      fi
14560      # Try to locate tool using the code snippet
14561      for ac_prog in greadlink readlink
14562do
14563  # Extract the first word of "$ac_prog", so it can be a program name with args.
14564set dummy $ac_prog; ac_word=$2
14565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14566$as_echo_n "checking for $ac_word... " >&6; }
14567if ${ac_cv_path_READLINK+:} false; then :
14568  $as_echo_n "(cached) " >&6
14569else
14570  case $READLINK in
14571  [\\/]* | ?:[\\/]*)
14572  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14573  ;;
14574  *)
14575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14576for as_dir in $PATH
14577do
14578  IFS=$as_save_IFS
14579  test -z "$as_dir" && as_dir=.
14580    for ac_exec_ext in '' $ac_executable_extensions; do
14581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14582    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14584    break 2
14585  fi
14586done
14587  done
14588IFS=$as_save_IFS
14589
14590  ;;
14591esac
14592fi
14593READLINK=$ac_cv_path_READLINK
14594if test -n "$READLINK"; then
14595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14596$as_echo "$READLINK" >&6; }
14597else
14598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14599$as_echo "no" >&6; }
14600fi
14601
14602
14603  test -n "$READLINK" && break
14604done
14605
14606    else
14607      # If it succeeded, then it was overridden by the user. We will use it
14608      # for the tool.
14609
14610      # First remove it from the list of overridden variables, so we can test
14611      # for unknown variables in the end.
14612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14613
14614      # Check if we try to supply an empty value
14615      if test "x$READLINK" = x; then
14616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14617$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14619$as_echo_n "checking for READLINK... " >&6; }
14620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14621$as_echo "disabled" >&6; }
14622      else
14623        # Check if the provided tool contains a complete path.
14624        tool_specified="$READLINK"
14625        tool_basename="${tool_specified##*/}"
14626        if test "x$tool_basename" = "x$tool_specified"; then
14627          # A command without a complete path is provided, search $PATH.
14628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14629$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14630          # Extract the first word of "$tool_basename", so it can be a program name with args.
14631set dummy $tool_basename; ac_word=$2
14632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14633$as_echo_n "checking for $ac_word... " >&6; }
14634if ${ac_cv_path_READLINK+:} false; then :
14635  $as_echo_n "(cached) " >&6
14636else
14637  case $READLINK in
14638  [\\/]* | ?:[\\/]*)
14639  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14640  ;;
14641  *)
14642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14643for as_dir in $PATH
14644do
14645  IFS=$as_save_IFS
14646  test -z "$as_dir" && as_dir=.
14647    for ac_exec_ext in '' $ac_executable_extensions; do
14648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14649    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14651    break 2
14652  fi
14653done
14654  done
14655IFS=$as_save_IFS
14656
14657  ;;
14658esac
14659fi
14660READLINK=$ac_cv_path_READLINK
14661if test -n "$READLINK"; then
14662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14663$as_echo "$READLINK" >&6; }
14664else
14665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14666$as_echo "no" >&6; }
14667fi
14668
14669
14670          if test "x$READLINK" = x; then
14671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14672          fi
14673        else
14674          # Otherwise we believe it is a complete path. Use it as it is.
14675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14676$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14678$as_echo_n "checking for READLINK... " >&6; }
14679          if test ! -x "$tool_specified"; then
14680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14681$as_echo "not found" >&6; }
14682            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14683          fi
14684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14685$as_echo "$tool_specified" >&6; }
14686        fi
14687      fi
14688    fi
14689
14690  fi
14691
14692
14693
14694
14695  # Publish this variable in the help.
14696
14697
14698  if [ -z "${DF+x}" ]; then
14699    # The variable is not set by user, try to locate tool using the code snippet
14700    for ac_prog in df
14701do
14702  # Extract the first word of "$ac_prog", so it can be a program name with args.
14703set dummy $ac_prog; ac_word=$2
14704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14705$as_echo_n "checking for $ac_word... " >&6; }
14706if ${ac_cv_path_DF+:} false; then :
14707  $as_echo_n "(cached) " >&6
14708else
14709  case $DF in
14710  [\\/]* | ?:[\\/]*)
14711  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14712  ;;
14713  *)
14714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14715for as_dir in $PATH
14716do
14717  IFS=$as_save_IFS
14718  test -z "$as_dir" && as_dir=.
14719    for ac_exec_ext in '' $ac_executable_extensions; do
14720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14721    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14723    break 2
14724  fi
14725done
14726  done
14727IFS=$as_save_IFS
14728
14729  ;;
14730esac
14731fi
14732DF=$ac_cv_path_DF
14733if test -n "$DF"; then
14734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14735$as_echo "$DF" >&6; }
14736else
14737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14738$as_echo "no" >&6; }
14739fi
14740
14741
14742  test -n "$DF" && break
14743done
14744
14745  else
14746    # The variable is set, but is it from the command line or the environment?
14747
14748    # Try to remove the string !DF! from our list.
14749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14751      # If it failed, the variable was not from the command line. Ignore it,
14752      # but warn the user (except for BASH, which is always set by the calling BASH).
14753      if test "xDF" != xBASH; then
14754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14755$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14756      fi
14757      # Try to locate tool using the code snippet
14758      for ac_prog in df
14759do
14760  # Extract the first word of "$ac_prog", so it can be a program name with args.
14761set dummy $ac_prog; ac_word=$2
14762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14763$as_echo_n "checking for $ac_word... " >&6; }
14764if ${ac_cv_path_DF+:} false; then :
14765  $as_echo_n "(cached) " >&6
14766else
14767  case $DF in
14768  [\\/]* | ?:[\\/]*)
14769  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14770  ;;
14771  *)
14772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14773for as_dir in $PATH
14774do
14775  IFS=$as_save_IFS
14776  test -z "$as_dir" && as_dir=.
14777    for ac_exec_ext in '' $ac_executable_extensions; do
14778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14779    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14781    break 2
14782  fi
14783done
14784  done
14785IFS=$as_save_IFS
14786
14787  ;;
14788esac
14789fi
14790DF=$ac_cv_path_DF
14791if test -n "$DF"; then
14792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14793$as_echo "$DF" >&6; }
14794else
14795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14796$as_echo "no" >&6; }
14797fi
14798
14799
14800  test -n "$DF" && break
14801done
14802
14803    else
14804      # If it succeeded, then it was overridden by the user. We will use it
14805      # for the tool.
14806
14807      # First remove it from the list of overridden variables, so we can test
14808      # for unknown variables in the end.
14809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14810
14811      # Check if we try to supply an empty value
14812      if test "x$DF" = x; then
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14814$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14816$as_echo_n "checking for DF... " >&6; }
14817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14818$as_echo "disabled" >&6; }
14819      else
14820        # Check if the provided tool contains a complete path.
14821        tool_specified="$DF"
14822        tool_basename="${tool_specified##*/}"
14823        if test "x$tool_basename" = "x$tool_specified"; then
14824          # A command without a complete path is provided, search $PATH.
14825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14826$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14827          # Extract the first word of "$tool_basename", so it can be a program name with args.
14828set dummy $tool_basename; ac_word=$2
14829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14830$as_echo_n "checking for $ac_word... " >&6; }
14831if ${ac_cv_path_DF+:} false; then :
14832  $as_echo_n "(cached) " >&6
14833else
14834  case $DF in
14835  [\\/]* | ?:[\\/]*)
14836  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14837  ;;
14838  *)
14839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14840for as_dir in $PATH
14841do
14842  IFS=$as_save_IFS
14843  test -z "$as_dir" && as_dir=.
14844    for ac_exec_ext in '' $ac_executable_extensions; do
14845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14846    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14848    break 2
14849  fi
14850done
14851  done
14852IFS=$as_save_IFS
14853
14854  ;;
14855esac
14856fi
14857DF=$ac_cv_path_DF
14858if test -n "$DF"; then
14859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14860$as_echo "$DF" >&6; }
14861else
14862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14863$as_echo "no" >&6; }
14864fi
14865
14866
14867          if test "x$DF" = x; then
14868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14869          fi
14870        else
14871          # Otherwise we believe it is a complete path. Use it as it is.
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14873$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14875$as_echo_n "checking for DF... " >&6; }
14876          if test ! -x "$tool_specified"; then
14877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14878$as_echo "not found" >&6; }
14879            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14880          fi
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14882$as_echo "$tool_specified" >&6; }
14883        fi
14884      fi
14885    fi
14886
14887  fi
14888
14889
14890
14891
14892  # Publish this variable in the help.
14893
14894
14895  if [ -z "${CPIO+x}" ]; then
14896    # The variable is not set by user, try to locate tool using the code snippet
14897    for ac_prog in cpio bsdcpio
14898do
14899  # Extract the first word of "$ac_prog", so it can be a program name with args.
14900set dummy $ac_prog; ac_word=$2
14901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14902$as_echo_n "checking for $ac_word... " >&6; }
14903if ${ac_cv_path_CPIO+:} false; then :
14904  $as_echo_n "(cached) " >&6
14905else
14906  case $CPIO in
14907  [\\/]* | ?:[\\/]*)
14908  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14909  ;;
14910  *)
14911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14912for as_dir in $PATH
14913do
14914  IFS=$as_save_IFS
14915  test -z "$as_dir" && as_dir=.
14916    for ac_exec_ext in '' $ac_executable_extensions; do
14917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14918    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14920    break 2
14921  fi
14922done
14923  done
14924IFS=$as_save_IFS
14925
14926  ;;
14927esac
14928fi
14929CPIO=$ac_cv_path_CPIO
14930if test -n "$CPIO"; then
14931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14932$as_echo "$CPIO" >&6; }
14933else
14934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14935$as_echo "no" >&6; }
14936fi
14937
14938
14939  test -n "$CPIO" && break
14940done
14941
14942  else
14943    # The variable is set, but is it from the command line or the environment?
14944
14945    # Try to remove the string !CPIO! from our list.
14946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14948      # If it failed, the variable was not from the command line. Ignore it,
14949      # but warn the user (except for BASH, which is always set by the calling BASH).
14950      if test "xCPIO" != xBASH; then
14951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14952$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14953      fi
14954      # Try to locate tool using the code snippet
14955      for ac_prog in cpio bsdcpio
14956do
14957  # Extract the first word of "$ac_prog", so it can be a program name with args.
14958set dummy $ac_prog; ac_word=$2
14959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14960$as_echo_n "checking for $ac_word... " >&6; }
14961if ${ac_cv_path_CPIO+:} false; then :
14962  $as_echo_n "(cached) " >&6
14963else
14964  case $CPIO in
14965  [\\/]* | ?:[\\/]*)
14966  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14967  ;;
14968  *)
14969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14970for as_dir in $PATH
14971do
14972  IFS=$as_save_IFS
14973  test -z "$as_dir" && as_dir=.
14974    for ac_exec_ext in '' $ac_executable_extensions; do
14975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14976    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14978    break 2
14979  fi
14980done
14981  done
14982IFS=$as_save_IFS
14983
14984  ;;
14985esac
14986fi
14987CPIO=$ac_cv_path_CPIO
14988if test -n "$CPIO"; then
14989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14990$as_echo "$CPIO" >&6; }
14991else
14992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14993$as_echo "no" >&6; }
14994fi
14995
14996
14997  test -n "$CPIO" && break
14998done
14999
15000    else
15001      # If it succeeded, then it was overridden by the user. We will use it
15002      # for the tool.
15003
15004      # First remove it from the list of overridden variables, so we can test
15005      # for unknown variables in the end.
15006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15007
15008      # Check if we try to supply an empty value
15009      if test "x$CPIO" = x; then
15010        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15011$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15012        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15013$as_echo_n "checking for CPIO... " >&6; }
15014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15015$as_echo "disabled" >&6; }
15016      else
15017        # Check if the provided tool contains a complete path.
15018        tool_specified="$CPIO"
15019        tool_basename="${tool_specified##*/}"
15020        if test "x$tool_basename" = "x$tool_specified"; then
15021          # A command without a complete path is provided, search $PATH.
15022          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15023$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15024          # Extract the first word of "$tool_basename", so it can be a program name with args.
15025set dummy $tool_basename; ac_word=$2
15026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15027$as_echo_n "checking for $ac_word... " >&6; }
15028if ${ac_cv_path_CPIO+:} false; then :
15029  $as_echo_n "(cached) " >&6
15030else
15031  case $CPIO in
15032  [\\/]* | ?:[\\/]*)
15033  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15034  ;;
15035  *)
15036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15037for as_dir in $PATH
15038do
15039  IFS=$as_save_IFS
15040  test -z "$as_dir" && as_dir=.
15041    for ac_exec_ext in '' $ac_executable_extensions; do
15042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15043    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15045    break 2
15046  fi
15047done
15048  done
15049IFS=$as_save_IFS
15050
15051  ;;
15052esac
15053fi
15054CPIO=$ac_cv_path_CPIO
15055if test -n "$CPIO"; then
15056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15057$as_echo "$CPIO" >&6; }
15058else
15059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15060$as_echo "no" >&6; }
15061fi
15062
15063
15064          if test "x$CPIO" = x; then
15065            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15066          fi
15067        else
15068          # Otherwise we believe it is a complete path. Use it as it is.
15069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15070$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15071          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15072$as_echo_n "checking for CPIO... " >&6; }
15073          if test ! -x "$tool_specified"; then
15074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15075$as_echo "not found" >&6; }
15076            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15077          fi
15078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15079$as_echo "$tool_specified" >&6; }
15080        fi
15081      fi
15082    fi
15083
15084  fi
15085
15086
15087
15088
15089  # Publish this variable in the help.
15090
15091
15092  if [ -z "${NICE+x}" ]; then
15093    # The variable is not set by user, try to locate tool using the code snippet
15094    for ac_prog in nice
15095do
15096  # Extract the first word of "$ac_prog", so it can be a program name with args.
15097set dummy $ac_prog; ac_word=$2
15098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15099$as_echo_n "checking for $ac_word... " >&6; }
15100if ${ac_cv_path_NICE+:} false; then :
15101  $as_echo_n "(cached) " >&6
15102else
15103  case $NICE in
15104  [\\/]* | ?:[\\/]*)
15105  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15106  ;;
15107  *)
15108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15109for as_dir in $PATH
15110do
15111  IFS=$as_save_IFS
15112  test -z "$as_dir" && as_dir=.
15113    for ac_exec_ext in '' $ac_executable_extensions; do
15114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15115    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15117    break 2
15118  fi
15119done
15120  done
15121IFS=$as_save_IFS
15122
15123  ;;
15124esac
15125fi
15126NICE=$ac_cv_path_NICE
15127if test -n "$NICE"; then
15128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15129$as_echo "$NICE" >&6; }
15130else
15131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15132$as_echo "no" >&6; }
15133fi
15134
15135
15136  test -n "$NICE" && break
15137done
15138
15139  else
15140    # The variable is set, but is it from the command line or the environment?
15141
15142    # Try to remove the string !NICE! from our list.
15143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15145      # If it failed, the variable was not from the command line. Ignore it,
15146      # but warn the user (except for BASH, which is always set by the calling BASH).
15147      if test "xNICE" != xBASH; then
15148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15149$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15150      fi
15151      # Try to locate tool using the code snippet
15152      for ac_prog in nice
15153do
15154  # Extract the first word of "$ac_prog", so it can be a program name with args.
15155set dummy $ac_prog; ac_word=$2
15156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15157$as_echo_n "checking for $ac_word... " >&6; }
15158if ${ac_cv_path_NICE+:} false; then :
15159  $as_echo_n "(cached) " >&6
15160else
15161  case $NICE in
15162  [\\/]* | ?:[\\/]*)
15163  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15164  ;;
15165  *)
15166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15167for as_dir in $PATH
15168do
15169  IFS=$as_save_IFS
15170  test -z "$as_dir" && as_dir=.
15171    for ac_exec_ext in '' $ac_executable_extensions; do
15172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15173    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15175    break 2
15176  fi
15177done
15178  done
15179IFS=$as_save_IFS
15180
15181  ;;
15182esac
15183fi
15184NICE=$ac_cv_path_NICE
15185if test -n "$NICE"; then
15186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15187$as_echo "$NICE" >&6; }
15188else
15189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15190$as_echo "no" >&6; }
15191fi
15192
15193
15194  test -n "$NICE" && break
15195done
15196
15197    else
15198      # If it succeeded, then it was overridden by the user. We will use it
15199      # for the tool.
15200
15201      # First remove it from the list of overridden variables, so we can test
15202      # for unknown variables in the end.
15203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15204
15205      # Check if we try to supply an empty value
15206      if test "x$NICE" = x; then
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15208$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15210$as_echo_n "checking for NICE... " >&6; }
15211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15212$as_echo "disabled" >&6; }
15213      else
15214        # Check if the provided tool contains a complete path.
15215        tool_specified="$NICE"
15216        tool_basename="${tool_specified##*/}"
15217        if test "x$tool_basename" = "x$tool_specified"; then
15218          # A command without a complete path is provided, search $PATH.
15219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15220$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15221          # Extract the first word of "$tool_basename", so it can be a program name with args.
15222set dummy $tool_basename; ac_word=$2
15223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15224$as_echo_n "checking for $ac_word... " >&6; }
15225if ${ac_cv_path_NICE+:} false; then :
15226  $as_echo_n "(cached) " >&6
15227else
15228  case $NICE in
15229  [\\/]* | ?:[\\/]*)
15230  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15231  ;;
15232  *)
15233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15234for as_dir in $PATH
15235do
15236  IFS=$as_save_IFS
15237  test -z "$as_dir" && as_dir=.
15238    for ac_exec_ext in '' $ac_executable_extensions; do
15239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15240    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15242    break 2
15243  fi
15244done
15245  done
15246IFS=$as_save_IFS
15247
15248  ;;
15249esac
15250fi
15251NICE=$ac_cv_path_NICE
15252if test -n "$NICE"; then
15253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15254$as_echo "$NICE" >&6; }
15255else
15256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15257$as_echo "no" >&6; }
15258fi
15259
15260
15261          if test "x$NICE" = x; then
15262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15263          fi
15264        else
15265          # Otherwise we believe it is a complete path. Use it as it is.
15266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15267$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15269$as_echo_n "checking for NICE... " >&6; }
15270          if test ! -x "$tool_specified"; then
15271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15272$as_echo "not found" >&6; }
15273            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15274          fi
15275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15276$as_echo "$tool_specified" >&6; }
15277        fi
15278      fi
15279    fi
15280
15281  fi
15282
15283
15284
15285
15286# Now we can determine OpenJDK build and target platforms. This is required to
15287# have early on.
15288# Make sure we can run config.sub.
15289$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15290  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15291
15292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15293$as_echo_n "checking build system type... " >&6; }
15294if ${ac_cv_build+:} false; then :
15295  $as_echo_n "(cached) " >&6
15296else
15297  ac_build_alias=$build_alias
15298test "x$ac_build_alias" = x &&
15299  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15300test "x$ac_build_alias" = x &&
15301  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15302ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15303  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15304
15305fi
15306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15307$as_echo "$ac_cv_build" >&6; }
15308case $ac_cv_build in
15309*-*-*) ;;
15310*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15311esac
15312build=$ac_cv_build
15313ac_save_IFS=$IFS; IFS='-'
15314set x $ac_cv_build
15315shift
15316build_cpu=$1
15317build_vendor=$2
15318shift; shift
15319# Remember, the first character of IFS is used to create $*,
15320# except with old shells:
15321build_os=$*
15322IFS=$ac_save_IFS
15323case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15324
15325
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15327$as_echo_n "checking host system type... " >&6; }
15328if ${ac_cv_host+:} false; then :
15329  $as_echo_n "(cached) " >&6
15330else
15331  if test "x$host_alias" = x; then
15332  ac_cv_host=$ac_cv_build
15333else
15334  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15335    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15336fi
15337
15338fi
15339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15340$as_echo "$ac_cv_host" >&6; }
15341case $ac_cv_host in
15342*-*-*) ;;
15343*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15344esac
15345host=$ac_cv_host
15346ac_save_IFS=$IFS; IFS='-'
15347set x $ac_cv_host
15348shift
15349host_cpu=$1
15350host_vendor=$2
15351shift; shift
15352# Remember, the first character of IFS is used to create $*,
15353# except with old shells:
15354host_os=$*
15355IFS=$ac_save_IFS
15356case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15357
15358
15359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15360$as_echo_n "checking target system type... " >&6; }
15361if ${ac_cv_target+:} false; then :
15362  $as_echo_n "(cached) " >&6
15363else
15364  if test "x$target_alias" = x; then
15365  ac_cv_target=$ac_cv_host
15366else
15367  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15368    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15369fi
15370
15371fi
15372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15373$as_echo "$ac_cv_target" >&6; }
15374case $ac_cv_target in
15375*-*-*) ;;
15376*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15377esac
15378target=$ac_cv_target
15379ac_save_IFS=$IFS; IFS='-'
15380set x $ac_cv_target
15381shift
15382target_cpu=$1
15383target_vendor=$2
15384shift; shift
15385# Remember, the first character of IFS is used to create $*,
15386# except with old shells:
15387target_os=$*
15388IFS=$ac_save_IFS
15389case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15390
15391
15392# The aliases save the names the user supplied, while $host etc.
15393# will get canonicalized.
15394test -n "$target_alias" &&
15395  test "$program_prefix$program_suffix$program_transform_name" = \
15396    NONENONEs,x,x, &&
15397  program_prefix=${target_alias}-
15398
15399  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15400  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15401  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15402  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15403  # to use the configure naming style.
15404
15405
15406
15407
15408
15409  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15410  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15411  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15412  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15413  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15414  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15415
15416
15417
15418  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15419
15420  case "$build_os" in
15421    *linux*)
15422      VAR_OS=linux
15423      VAR_OS_TYPE=unix
15424      ;;
15425    *solaris*)
15426      VAR_OS=solaris
15427      VAR_OS_TYPE=unix
15428      ;;
15429    *darwin*)
15430      VAR_OS=macosx
15431      VAR_OS_TYPE=unix
15432      ;;
15433    *bsd*)
15434      VAR_OS=bsd
15435      VAR_OS_TYPE=unix
15436      ;;
15437    *cygwin*)
15438      VAR_OS=windows
15439      VAR_OS_ENV=windows.cygwin
15440      ;;
15441    *mingw*)
15442      VAR_OS=windows
15443      VAR_OS_ENV=windows.msys
15444      ;;
15445    *aix*)
15446      VAR_OS=aix
15447      VAR_OS_TYPE=unix
15448      ;;
15449    *)
15450      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15451      ;;
15452  esac
15453
15454
15455  # First argument is the cpu name from the trip/quad
15456  case "$build_cpu" in
15457    x86_64)
15458      VAR_CPU=x86_64
15459      VAR_CPU_ARCH=x86
15460      VAR_CPU_BITS=64
15461      VAR_CPU_ENDIAN=little
15462      ;;
15463    i?86)
15464      VAR_CPU=x86
15465      VAR_CPU_ARCH=x86
15466      VAR_CPU_BITS=32
15467      VAR_CPU_ENDIAN=little
15468      ;;
15469    arm*)
15470      VAR_CPU=arm
15471      VAR_CPU_ARCH=arm
15472      VAR_CPU_BITS=32
15473      VAR_CPU_ENDIAN=little
15474      ;;
15475    aarch64)
15476      VAR_CPU=aarch64
15477      VAR_CPU_ARCH=aarch64
15478      VAR_CPU_BITS=64
15479      VAR_CPU_ENDIAN=little
15480      ;;
15481    powerpc)
15482      VAR_CPU=ppc
15483      VAR_CPU_ARCH=ppc
15484      VAR_CPU_BITS=32
15485      VAR_CPU_ENDIAN=big
15486      ;;
15487    powerpc64)
15488      VAR_CPU=ppc64
15489      VAR_CPU_ARCH=ppc
15490      VAR_CPU_BITS=64
15491      VAR_CPU_ENDIAN=big
15492      ;;
15493    powerpc64le)
15494      VAR_CPU=ppc64le
15495      VAR_CPU_ARCH=ppc
15496      VAR_CPU_BITS=64
15497      VAR_CPU_ENDIAN=little
15498      ;;
15499    s390)
15500      VAR_CPU=s390
15501      VAR_CPU_ARCH=s390
15502      VAR_CPU_BITS=32
15503      VAR_CPU_ENDIAN=big
15504      ;;
15505    s390x)
15506      VAR_CPU=s390x
15507      VAR_CPU_ARCH=s390
15508      VAR_CPU_BITS=64
15509      VAR_CPU_ENDIAN=big
15510      ;;
15511    sparc)
15512      VAR_CPU=sparc
15513      VAR_CPU_ARCH=sparc
15514      VAR_CPU_BITS=32
15515      VAR_CPU_ENDIAN=big
15516      ;;
15517    sparcv9|sparc64)
15518      VAR_CPU=sparcv9
15519      VAR_CPU_ARCH=sparc
15520      VAR_CPU_BITS=64
15521      VAR_CPU_ENDIAN=big
15522      ;;
15523    *)
15524      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15525      ;;
15526  esac
15527
15528  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15529  OPENJDK_BUILD_OS="$VAR_OS"
15530  if test "x$VAR_OS_TYPE" != x; then
15531    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15532  else
15533    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15534  fi
15535  if test "x$VAR_OS_ENV" != x; then
15536    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15537  else
15538    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15539  fi
15540  OPENJDK_BUILD_CPU="$VAR_CPU"
15541  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15542  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15543  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15544
15545
15546
15547
15548
15549
15550
15551
15552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15553$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15555$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15556
15557  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15558
15559  case "$host_os" in
15560    *linux*)
15561      VAR_OS=linux
15562      VAR_OS_TYPE=unix
15563      ;;
15564    *solaris*)
15565      VAR_OS=solaris
15566      VAR_OS_TYPE=unix
15567      ;;
15568    *darwin*)
15569      VAR_OS=macosx
15570      VAR_OS_TYPE=unix
15571      ;;
15572    *bsd*)
15573      VAR_OS=bsd
15574      VAR_OS_TYPE=unix
15575      ;;
15576    *cygwin*)
15577      VAR_OS=windows
15578      VAR_OS_ENV=windows.cygwin
15579      ;;
15580    *mingw*)
15581      VAR_OS=windows
15582      VAR_OS_ENV=windows.msys
15583      ;;
15584    *aix*)
15585      VAR_OS=aix
15586      VAR_OS_TYPE=unix
15587      ;;
15588    *)
15589      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15590      ;;
15591  esac
15592
15593
15594  # First argument is the cpu name from the trip/quad
15595  case "$host_cpu" in
15596    x86_64)
15597      VAR_CPU=x86_64
15598      VAR_CPU_ARCH=x86
15599      VAR_CPU_BITS=64
15600      VAR_CPU_ENDIAN=little
15601      ;;
15602    i?86)
15603      VAR_CPU=x86
15604      VAR_CPU_ARCH=x86
15605      VAR_CPU_BITS=32
15606      VAR_CPU_ENDIAN=little
15607      ;;
15608    arm*)
15609      VAR_CPU=arm
15610      VAR_CPU_ARCH=arm
15611      VAR_CPU_BITS=32
15612      VAR_CPU_ENDIAN=little
15613      ;;
15614    aarch64)
15615      VAR_CPU=aarch64
15616      VAR_CPU_ARCH=aarch64
15617      VAR_CPU_BITS=64
15618      VAR_CPU_ENDIAN=little
15619      ;;
15620    powerpc)
15621      VAR_CPU=ppc
15622      VAR_CPU_ARCH=ppc
15623      VAR_CPU_BITS=32
15624      VAR_CPU_ENDIAN=big
15625      ;;
15626    powerpc64)
15627      VAR_CPU=ppc64
15628      VAR_CPU_ARCH=ppc
15629      VAR_CPU_BITS=64
15630      VAR_CPU_ENDIAN=big
15631      ;;
15632    powerpc64le)
15633      VAR_CPU=ppc64le
15634      VAR_CPU_ARCH=ppc
15635      VAR_CPU_BITS=64
15636      VAR_CPU_ENDIAN=little
15637      ;;
15638    s390)
15639      VAR_CPU=s390
15640      VAR_CPU_ARCH=s390
15641      VAR_CPU_BITS=32
15642      VAR_CPU_ENDIAN=big
15643      ;;
15644    s390x)
15645      VAR_CPU=s390x
15646      VAR_CPU_ARCH=s390
15647      VAR_CPU_BITS=64
15648      VAR_CPU_ENDIAN=big
15649      ;;
15650    sparc)
15651      VAR_CPU=sparc
15652      VAR_CPU_ARCH=sparc
15653      VAR_CPU_BITS=32
15654      VAR_CPU_ENDIAN=big
15655      ;;
15656    sparcv9|sparc64)
15657      VAR_CPU=sparcv9
15658      VAR_CPU_ARCH=sparc
15659      VAR_CPU_BITS=64
15660      VAR_CPU_ENDIAN=big
15661      ;;
15662    *)
15663      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15664      ;;
15665  esac
15666
15667  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15668  OPENJDK_TARGET_OS="$VAR_OS"
15669  if test "x$VAR_OS_TYPE" != x; then
15670    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15671  else
15672    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15673  fi
15674  if test "x$VAR_OS_ENV" != x; then
15675    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15676  else
15677    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15678  fi
15679  OPENJDK_TARGET_CPU="$VAR_CPU"
15680  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15681  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15682  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15683
15684
15685
15686
15687
15688
15689
15690
15691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15692$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15694$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15695
15696
15697
15698# Check whether --with-target-bits was given.
15699if test "${with_target_bits+set}" = set; then :
15700  withval=$with_target_bits;
15701fi
15702
15703
15704  # We have three types of compiles:
15705  # native  == normal compilation, target system == build system
15706  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15707  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15708  #
15709  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15710    # We're doing a proper cross-compilation
15711    COMPILE_TYPE="cross"
15712  else
15713    COMPILE_TYPE="native"
15714  fi
15715
15716  if test "x$with_target_bits" != x; then
15717    if test "x$COMPILE_TYPE" = "xcross"; then
15718      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15719    fi
15720
15721    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15722      # A reduced build is requested
15723      COMPILE_TYPE="reduced"
15724      OPENJDK_TARGET_CPU_BITS=32
15725      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15726        OPENJDK_TARGET_CPU=x86
15727      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15728        OPENJDK_TARGET_CPU=sparc
15729      else
15730        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15731      fi
15732    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15733      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
15734    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15735      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15736$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15737    else
15738      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15739    fi
15740  fi
15741
15742
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15744$as_echo_n "checking compilation type... " >&6; }
15745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15746$as_echo "$COMPILE_TYPE" >&6; }
15747
15748
15749  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15750    REQUIRED_OS_NAME=SunOS
15751    REQUIRED_OS_VERSION=5.10
15752  fi
15753  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15754    REQUIRED_OS_NAME=Linux
15755    REQUIRED_OS_VERSION=2.6
15756  fi
15757  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15758    REQUIRED_OS_NAME=Windows
15759    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15760      REQUIRED_OS_VERSION=5.2
15761    else
15762      REQUIRED_OS_VERSION=5.1
15763    fi
15764  fi
15765  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15766    REQUIRED_OS_NAME=Darwin
15767    REQUIRED_OS_VERSION=11.2
15768  fi
15769  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15770    REQUIRED_OS_NAME=AIX
15771    REQUIRED_OS_VERSION=7.1
15772  fi
15773
15774
15775
15776
15777
15778
15779  # Also store the legacy naming of the cpu.
15780  # Ie i586 and amd64 instead of x86 and x86_64
15781  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15782  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15783    OPENJDK_TARGET_CPU_LEGACY="i586"
15784  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15785    # On all platforms except MacOSX replace x86_64 with amd64.
15786    OPENJDK_TARGET_CPU_LEGACY="amd64"
15787  fi
15788
15789
15790  # And the second legacy naming of the cpu.
15791  # Ie i386 and amd64 instead of x86 and x86_64.
15792  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15793  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15794    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15795  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15796    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15797  fi
15798
15799
15800  # This is the name of the cpu (but using i386 and amd64 instead of
15801  # x86 and x86_64, respectively), preceeded by a /, to be used when
15802  # locating libraries. On macosx, it's empty, though.
15803  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15804  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15805    OPENJDK_TARGET_CPU_LIBDIR=""
15806  fi
15807
15808
15809  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15810  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15811  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15812  OPENJDK_TARGET_CPU_ISADIR=""
15813  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15814    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15815      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15816    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15817      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15818    fi
15819  fi
15820
15821
15822  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15823  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15824  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15825    # On linux only, we replace x86 with i386.
15826    OPENJDK_TARGET_CPU_OSARCH="i386"
15827  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15828    # On all platforms except macosx, we replace x86_64 with amd64.
15829    OPENJDK_TARGET_CPU_OSARCH="amd64"
15830  fi
15831
15832
15833  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15834  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15835    OPENJDK_TARGET_CPU_JLI="i386"
15836  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15837    # On all platforms except macosx, we replace x86_64 with amd64.
15838    OPENJDK_TARGET_CPU_JLI="amd64"
15839  fi
15840  # Now setup the -D flags for building libjli.
15841  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15842  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15843    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15844      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15845    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15846      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15847    fi
15848  fi
15849
15850
15851  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15852      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15853  else
15854      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15855  fi
15856
15857
15858  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15859  # Macosx is osx and x86_64 is x64
15860  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15861    OPENJDK_TARGET_OS_BUNDLE="osx"
15862  else
15863    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15864  fi
15865  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15866    OPENJDK_TARGET_CPU_BUNDLE="x64"
15867  else
15868    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15869  fi
15870  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15871
15872
15873
15874
15875  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15876    A_LP64="LP64:="
15877    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15878    # unpack200.exe
15879    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15880      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15881    fi
15882  fi
15883  LP64=$A_LP64
15884
15885
15886  if test "x$COMPILE_TYPE" = "xcross"; then
15887    # FIXME: ... or should this include reduced builds..?
15888    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15889  else
15890    DEFINE_CROSS_COMPILE_ARCH=""
15891  fi
15892
15893
15894  # Convert openjdk platform names to hotspot names
15895
15896  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15897  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15898    HOTSPOT_TARGET_OS=bsd
15899  fi
15900
15901
15902  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15903  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15904    HOTSPOT_TARGET_OS_TYPE=posix
15905  fi
15906
15907
15908  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15909  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15910    HOTSPOT_TARGET_CPU=x86_32
15911  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15912    HOTSPOT_TARGET_CPU=sparc
15913  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15914    HOTSPOT_TARGET_CPU=ppc_64
15915  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15916    HOTSPOT_TARGET_CPU=ppc_64
15917  fi
15918
15919
15920  # This is identical with OPENJDK_*, but define anyway for consistency.
15921  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15922
15923
15924  # Setup HOTSPOT_TARGET_CPU_DEFINE
15925  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15926    HOTSPOT_TARGET_CPU_DEFINE=IA32
15927  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15928    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15929  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15930    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15931  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15932    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15933  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15934    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15935  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15936    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15937
15938  # The cpu defines below are for zero, we don't support them directly.
15939  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15940    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15941  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15942    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15943  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15944    HOTSPOT_TARGET_CPU_DEFINE=S390
15945  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15946    HOTSPOT_TARGET_CPU_DEFINE=S390
15947  elif test "x$OPENJDK_TARGET_CPU" != x; then
15948    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15949  fi
15950
15951
15952
15953
15954  # Also store the legacy naming of the cpu.
15955  # Ie i586 and amd64 instead of x86 and x86_64
15956  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15957  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15958    OPENJDK_BUILD_CPU_LEGACY="i586"
15959  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15960    # On all platforms except MacOSX replace x86_64 with amd64.
15961    OPENJDK_BUILD_CPU_LEGACY="amd64"
15962  fi
15963
15964
15965  # And the second legacy naming of the cpu.
15966  # Ie i386 and amd64 instead of x86 and x86_64.
15967  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15968  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15969    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15970  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15971    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15972  fi
15973
15974
15975  # This is the name of the cpu (but using i386 and amd64 instead of
15976  # x86 and x86_64, respectively), preceeded by a /, to be used when
15977  # locating libraries. On macosx, it's empty, though.
15978  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15979  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15980    OPENJDK_BUILD_CPU_LIBDIR=""
15981  fi
15982
15983
15984  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15985  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15986  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15987  OPENJDK_BUILD_CPU_ISADIR=""
15988  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15989    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15990      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15991    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15992      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15993    fi
15994  fi
15995
15996
15997  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15998  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15999  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16000    # On linux only, we replace x86 with i386.
16001    OPENJDK_BUILD_CPU_OSARCH="i386"
16002  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16003    # On all platforms except macosx, we replace x86_64 with amd64.
16004    OPENJDK_BUILD_CPU_OSARCH="amd64"
16005  fi
16006
16007
16008  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16009  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16010    OPENJDK_BUILD_CPU_JLI="i386"
16011  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16012    # On all platforms except macosx, we replace x86_64 with amd64.
16013    OPENJDK_BUILD_CPU_JLI="amd64"
16014  fi
16015  # Now setup the -D flags for building libjli.
16016  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16017  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16018    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16019      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16020    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16021      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16022    fi
16023  fi
16024
16025
16026  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16027      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16028  else
16029      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16030  fi
16031
16032
16033  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16034  # Macosx is osx and x86_64 is x64
16035  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16036    OPENJDK_BUILD_OS_BUNDLE="osx"
16037  else
16038    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16039  fi
16040  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16041    OPENJDK_BUILD_CPU_BUNDLE="x64"
16042  else
16043    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16044  fi
16045  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16046
16047
16048
16049
16050  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16051    A_LP64="LP64:="
16052    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16053    # unpack200.exe
16054    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16055      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16056    fi
16057  fi
16058  LP64=$A_LP64
16059
16060
16061  if test "x$COMPILE_TYPE" = "xcross"; then
16062    # FIXME: ... or should this include reduced builds..?
16063    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16064  else
16065    DEFINE_CROSS_COMPILE_ARCH=""
16066  fi
16067
16068
16069  # Convert openjdk platform names to hotspot names
16070
16071  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16072  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16073    HOTSPOT_BUILD_OS=bsd
16074  fi
16075
16076
16077  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16078  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16079    HOTSPOT_BUILD_OS_TYPE=posix
16080  fi
16081
16082
16083  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16084  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16085    HOTSPOT_BUILD_CPU=x86_32
16086  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16087    HOTSPOT_BUILD_CPU=sparc
16088  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16089    HOTSPOT_BUILD_CPU=ppc_64
16090  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16091    HOTSPOT_BUILD_CPU=ppc_64
16092  fi
16093
16094
16095  # This is identical with OPENJDK_*, but define anyway for consistency.
16096  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16097
16098
16099  # Setup HOTSPOT_BUILD_CPU_DEFINE
16100  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16101    HOTSPOT_BUILD_CPU_DEFINE=IA32
16102  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16103    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16104  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16105    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16106  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16107    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16108  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16109    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16110  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16111    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16112
16113  # The cpu defines below are for zero, we don't support them directly.
16114  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16115    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16116  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16117    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16118  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16119    HOTSPOT_BUILD_CPU_DEFINE=S390
16120  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16121    HOTSPOT_BUILD_CPU_DEFINE=S390
16122  elif test "x$OPENJDK_BUILD_CPU" != x; then
16123    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16124  fi
16125
16126
16127
16128
16129  # ZERO_ARCHDEF is used to enable architecture-specific code.
16130  # This is used in legacy hotspot build.
16131  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16132
16133
16134
16135
16136
16137# Continue setting up basic stuff. Most remaining code require fundamental tools.
16138
16139  # Save the current directory this script was started from
16140  CURDIR="$PWD"
16141
16142  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16143  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16144  # was not available at that time.
16145  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16146  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16147    ORIGINAL_PATH="$REWRITTEN_PATH"
16148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16149$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16150  fi
16151
16152  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16153    PATH_SEP=";"
16154
16155  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16156  if test $SRC_ROOT_LENGTH -gt 100; then
16157    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16158  fi
16159
16160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16162$as_echo_n "checking cygwin release... " >&6; }
16163    CYGWIN_VERSION=`$UNAME -r`
16164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16165$as_echo "$CYGWIN_VERSION" >&6; }
16166    WINDOWS_ENV_VENDOR='cygwin'
16167    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16168
16169    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16170    if test "x$CYGWIN_VERSION_OLD" != x; then
16171      { $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
16172$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;}
16173      as_fn_error $? "Cannot continue" "$LINENO" 5
16174    fi
16175    if test "x$CYGPATH" = x; then
16176      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16177    fi
16178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16179$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16180    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16181    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16182    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16183    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16185$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16186    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16187    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16188    if test "x$test_cygdrive_prefix" = x; then
16189      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16190    fi
16191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16193$as_echo_n "checking msys release... " >&6; }
16194    MSYS_VERSION=`$UNAME -r`
16195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16196$as_echo "$MSYS_VERSION" >&6; }
16197
16198    WINDOWS_ENV_VENDOR='msys'
16199    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16200
16201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16202$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16203    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16204    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16205
16206  windows_path="$MSYS_ROOT_PATH"
16207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16208    unix_path=`$CYGPATH -u "$windows_path"`
16209    MSYS_ROOT_PATH="$unix_path"
16210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16212    MSYS_ROOT_PATH="$unix_path"
16213  fi
16214
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16216$as_echo "$MSYS_ROOT_PATH" >&6; }
16217    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16218  else
16219    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16220  fi
16221
16222  # Test if windows or unix (cygwin/msys) find is first in path.
16223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16224$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16225  FIND_BINARY_OUTPUT=`find --version 2>&1`
16226  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16228$as_echo "unix style" >&6; }
16229  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16231$as_echo "Windows" >&6; }
16232    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16233$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16234    { $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
16235$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16236    as_fn_error $? "Cannot continue" "$LINENO" 5
16237  else
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16239$as_echo "unknown" >&6; }
16240    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16241$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16242  fi
16243
16244  else
16245    PATH_SEP=":"
16246  fi
16247
16248
16249  # We get the top-level directory from the supporting wrappers.
16250  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16251$as_echo_n "checking for top-level directory... " >&6; }
16252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16253$as_echo "$TOPDIR" >&6; }
16254
16255
16256  # Save the original version of TOPDIR for string comparisons
16257  ORIGINAL_TOPDIR="$TOPDIR"
16258
16259
16260  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16261
16262  # Only process if variable expands to non-empty
16263
16264  if test "x$CURDIR" != x; then
16265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16266
16267  # Input might be given as Windows format, start by converting to
16268  # unix format.
16269  path="$CURDIR"
16270  new_path=`$CYGPATH -u "$path"`
16271
16272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16275  # "foo.exe" is OK but "foo" is an error.
16276  #
16277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16278  # It is also a way to make sure we got the proper file name for the real test later on.
16279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16280  if test "x$test_shortpath" = x; then
16281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16282$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16283    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16284  fi
16285
16286  # Call helper function which possibly converts this using DOS-style short mode.
16287  # If so, the updated path is stored in $new_path.
16288
16289  input_path="$new_path"
16290  # Check if we need to convert this using DOS-style short mode. If the path
16291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16292  # take no chances and rewrite it.
16293  # Note: m4 eats our [], so we need to use [ and ] instead.
16294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16295  if test "x$has_forbidden_chars" != x; then
16296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16300      # Going to short mode and back again did indeed matter. Since short mode is
16301      # case insensitive, let's make it lowercase to improve readability.
16302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16303      # Now convert it back to Unix-style (cygpath)
16304      input_path=`$CYGPATH -u "$shortmode_path"`
16305      new_path="$input_path"
16306    fi
16307  fi
16308
16309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16310  if test "x$test_cygdrive_prefix" = x; then
16311    # As a simple fix, exclude /usr/bin since it's not a real path.
16312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16314      # a path prefixed by /cygdrive for fixpath to work.
16315      new_path="$CYGWIN_ROOT_PATH$input_path"
16316    fi
16317  fi
16318
16319
16320  if test "x$path" != "x$new_path"; then
16321    CURDIR="$new_path"
16322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16323$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16324  fi
16325
16326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16327
16328  path="$CURDIR"
16329  has_colon=`$ECHO $path | $GREP ^.:`
16330  new_path="$path"
16331  if test "x$has_colon" = x; then
16332    # Not in mixed or Windows style, start by that.
16333    new_path=`cmd //c echo $path`
16334  fi
16335
16336
16337  input_path="$new_path"
16338  # Check if we need to convert this using DOS-style short mode. If the path
16339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16340  # take no chances and rewrite it.
16341  # Note: m4 eats our [], so we need to use [ and ] instead.
16342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16343  if test "x$has_forbidden_chars" != x; then
16344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16346  fi
16347
16348
16349  windows_path="$new_path"
16350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16351    unix_path=`$CYGPATH -u "$windows_path"`
16352    new_path="$unix_path"
16353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16355    new_path="$unix_path"
16356  fi
16357
16358  if test "x$path" != "x$new_path"; then
16359    CURDIR="$new_path"
16360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16361$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16362  fi
16363
16364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16366
16367    else
16368      # We're on a unix platform. Hooray! :)
16369      path="$CURDIR"
16370      has_space=`$ECHO "$path" | $GREP " "`
16371      if test "x$has_space" != x; then
16372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16373$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16375      fi
16376
16377      # Use eval to expand a potential ~
16378      eval path="$path"
16379      if test ! -f "$path" && test ! -d "$path"; then
16380        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16381      fi
16382
16383      if test -d "$path"; then
16384        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16385      else
16386        dir="`$DIRNAME "$path"`"
16387        base="`$BASENAME "$path"`"
16388        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16389      fi
16390    fi
16391  fi
16392
16393
16394  # Only process if variable expands to non-empty
16395
16396  if test "x$TOPDIR" != x; then
16397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16398
16399  # Input might be given as Windows format, start by converting to
16400  # unix format.
16401  path="$TOPDIR"
16402  new_path=`$CYGPATH -u "$path"`
16403
16404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16407  # "foo.exe" is OK but "foo" is an error.
16408  #
16409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16410  # It is also a way to make sure we got the proper file name for the real test later on.
16411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16412  if test "x$test_shortpath" = x; then
16413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16414$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16415    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16416  fi
16417
16418  # Call helper function which possibly converts this using DOS-style short mode.
16419  # If so, the updated path is stored in $new_path.
16420
16421  input_path="$new_path"
16422  # Check if we need to convert this using DOS-style short mode. If the path
16423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16424  # take no chances and rewrite it.
16425  # Note: m4 eats our [], so we need to use [ and ] instead.
16426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16427  if test "x$has_forbidden_chars" != x; then
16428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16432      # Going to short mode and back again did indeed matter. Since short mode is
16433      # case insensitive, let's make it lowercase to improve readability.
16434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16435      # Now convert it back to Unix-style (cygpath)
16436      input_path=`$CYGPATH -u "$shortmode_path"`
16437      new_path="$input_path"
16438    fi
16439  fi
16440
16441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16442  if test "x$test_cygdrive_prefix" = x; then
16443    # As a simple fix, exclude /usr/bin since it's not a real path.
16444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16446      # a path prefixed by /cygdrive for fixpath to work.
16447      new_path="$CYGWIN_ROOT_PATH$input_path"
16448    fi
16449  fi
16450
16451
16452  if test "x$path" != "x$new_path"; then
16453    TOPDIR="$new_path"
16454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16455$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16456  fi
16457
16458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16459
16460  path="$TOPDIR"
16461  has_colon=`$ECHO $path | $GREP ^.:`
16462  new_path="$path"
16463  if test "x$has_colon" = x; then
16464    # Not in mixed or Windows style, start by that.
16465    new_path=`cmd //c echo $path`
16466  fi
16467
16468
16469  input_path="$new_path"
16470  # Check if we need to convert this using DOS-style short mode. If the path
16471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16472  # take no chances and rewrite it.
16473  # Note: m4 eats our [], so we need to use [ and ] instead.
16474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16475  if test "x$has_forbidden_chars" != x; then
16476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16478  fi
16479
16480
16481  windows_path="$new_path"
16482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16483    unix_path=`$CYGPATH -u "$windows_path"`
16484    new_path="$unix_path"
16485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16487    new_path="$unix_path"
16488  fi
16489
16490  if test "x$path" != "x$new_path"; then
16491    TOPDIR="$new_path"
16492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16493$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16494  fi
16495
16496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16498
16499    else
16500      # We're on a unix platform. Hooray! :)
16501      path="$TOPDIR"
16502      has_space=`$ECHO "$path" | $GREP " "`
16503      if test "x$has_space" != x; then
16504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16505$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16507      fi
16508
16509      # Use eval to expand a potential ~
16510      eval path="$path"
16511      if test ! -f "$path" && test ! -d "$path"; then
16512        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16513      fi
16514
16515      if test -d "$path"; then
16516        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16517      else
16518        dir="`$DIRNAME "$path"`"
16519        base="`$BASENAME "$path"`"
16520        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16521      fi
16522    fi
16523  fi
16524
16525  # SRC_ROOT is a traditional alias for TOPDIR.
16526  SRC_ROOT=$TOPDIR
16527
16528  # Calculate a canonical version of TOPDIR for string comparisons
16529  CANONICAL_TOPDIR=$TOPDIR
16530
16531  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16532    # Follow a chain of symbolic links. Use readlink
16533    # where it exists, else fall back to horribly
16534    # complicated shell code.
16535    if test "x$READLINK_TESTED" != yes; then
16536      # On MacOSX there is a readlink tool with a different
16537      # purpose than the GNU readlink tool. Check the found readlink.
16538      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16539      if test "x$ISGNU" = x; then
16540        # A readlink that we do not know how to use.
16541        # Are there other non-GNU readlinks out there?
16542        READLINK_TESTED=yes
16543        READLINK=
16544      fi
16545    fi
16546
16547    if test "x$READLINK" != x; then
16548      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16549    else
16550      # Save the current directory for restoring afterwards
16551      STARTDIR=$PWD
16552      COUNTER=0
16553      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16554      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16555      cd $sym_link_dir
16556      # Use -P flag to resolve symlinks in directories.
16557      cd `$THEPWDCMD -P`
16558      sym_link_dir=`$THEPWDCMD -P`
16559      # Resolve file symlinks
16560      while test $COUNTER -lt 20; do
16561        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16562        if test "x$ISLINK" == x; then
16563          # This is not a symbolic link! We are done!
16564          break
16565        fi
16566        # Again resolve directory symlinks since the target of the just found
16567        # link could be in a different directory
16568        cd `$DIRNAME $ISLINK`
16569        sym_link_dir=`$THEPWDCMD -P`
16570        sym_link_file=`$BASENAME $ISLINK`
16571        let COUNTER=COUNTER+1
16572      done
16573      cd $STARTDIR
16574      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16575    fi
16576  fi
16577
16578
16579
16580  # Locate the directory of this script.
16581  AUTOCONF_DIR=$TOPDIR/common/autoconf
16582
16583  # Setup username (for use in adhoc version strings etc)
16584  # Outer [ ] to quote m4.
16585   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16586
16587
16588
16589# Check if it's a pure open build or if custom sources are to be used.
16590
16591  # Check whether --enable-openjdk-only was given.
16592if test "${enable_openjdk_only+set}" = set; then :
16593  enableval=$enable_openjdk_only;
16594else
16595  enable_openjdk_only="no"
16596fi
16597
16598
16599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16600$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16602$as_echo "$enable_openjdk_only" >&6; }
16603  if test "x$enable_openjdk_only" = "xyes"; then
16604    SUPPRESS_CUSTOM_EXTENSIONS="true"
16605  elif test "x$enable_openjdk_only" = "xno"; then
16606    SUPPRESS_CUSTOM_EXTENSIONS="false"
16607  else
16608    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16609  fi
16610
16611  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16612  # the IncludeCustomExtension macro.
16613
16614
16615# Check whether --with-custom-make-dir was given.
16616if test "${with_custom_make_dir+set}" = set; then :
16617  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
16618$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16619fi
16620
16621
16622
16623
16624# These are needed to be able to create a configuration name (and thus the output directory)
16625
16626  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16627$as_echo_n "checking which variant of the JDK to build... " >&6; }
16628
16629# Check whether --with-jdk-variant was given.
16630if test "${with_jdk_variant+set}" = set; then :
16631  withval=$with_jdk_variant;
16632fi
16633
16634
16635  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16636    JDK_VARIANT="normal"
16637  else
16638    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16639  fi
16640
16641
16642
16643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16644$as_echo "$JDK_VARIANT" >&6; }
16645
16646
16647  DEBUG_LEVEL="release"
16648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16649$as_echo_n "checking which debug level to use... " >&6; }
16650  # Check whether --enable-debug was given.
16651if test "${enable_debug+set}" = set; then :
16652  enableval=$enable_debug;
16653        ENABLE_DEBUG="${enableval}"
16654        DEBUG_LEVEL="fastdebug"
16655
16656else
16657  ENABLE_DEBUG="no"
16658fi
16659
16660
16661
16662# Check whether --with-debug-level was given.
16663if test "${with_debug_level+set}" = set; then :
16664  withval=$with_debug_level;
16665        DEBUG_LEVEL="${withval}"
16666        if test "x$ENABLE_DEBUG" = xyes; then
16667          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16668        fi
16669
16670fi
16671
16672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16673$as_echo "$DEBUG_LEVEL" >&6; }
16674
16675  if test "x$DEBUG_LEVEL" != xrelease && \
16676      test "x$DEBUG_LEVEL" != xoptimized && \
16677      test "x$DEBUG_LEVEL" != xfastdebug && \
16678      test "x$DEBUG_LEVEL" != xslowdebug; then
16679    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16680  fi
16681
16682  # Translate DEBUG_LEVEL to debug level used by Hotspot
16683  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16684  if test "x$DEBUG_LEVEL" = xrelease; then
16685    HOTSPOT_DEBUG_LEVEL="product"
16686  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16687    HOTSPOT_DEBUG_LEVEL="debug"
16688  fi
16689
16690  if test "x$DEBUG_LEVEL" = xoptimized; then
16691    # The debug level 'optimized' is a little special because it is currently only
16692    # applicable to the HotSpot build where it means to build a completely
16693    # optimized version of the VM without any debugging code (like for the
16694    # 'release' debug level which is called 'product' in the HotSpot build) but
16695    # with the exception that it can contain additional code which is otherwise
16696    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16697    # test new and/or experimental features which are not intended for customer
16698    # shipment. Because these new features need to be tested and benchmarked in
16699    # real world scenarios, we want to build the containing JDK at the 'release'
16700    # debug level.
16701    DEBUG_LEVEL="release"
16702  fi
16703
16704
16705
16706
16707
16708
16709# Check whether --with-jvm-variants was given.
16710if test "${with_jvm_variants+set}" = set; then :
16711  withval=$with_jvm_variants;
16712fi
16713
16714
16715  if test "x$with_jvm_variants" = x; then
16716    with_jvm_variants="server"
16717  fi
16718  JVM_VARIANTS_OPT="$with_jvm_variants"
16719
16720  # Has the user listed more than one variant?
16721  # Additional [] needed to keep m4 from mangling shell constructs.
16722  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16723    BUILDING_MULTIPLE_JVM_VARIANTS=true
16724  else
16725    BUILDING_MULTIPLE_JVM_VARIANTS=false
16726  fi
16727  # Replace the commas with AND for use in the build directory name.
16728  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16729
16730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16731$as_echo_n "checking which variants of the JVM to build... " >&6; }
16732  # JVM_VARIANTS is a space-separated list.
16733  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16734  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16736$as_echo "$JVM_VARIANTS" >&6; }
16737
16738  # Check that the selected variants are valid
16739
16740  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16741  # Notice that the original variant failes on SLES 10 and 11
16742  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16743  STACK=${JVM_VARIANTS// /$'\n'}
16744  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16745  if test "x$INVALID_VARIANTS" != x; then
16746    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16747$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16748    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16749  fi
16750
16751  # All "special" variants share the same output directory ("server")
16752  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16753  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16754  STACK=${JVM_VARIANTS// /$'\n'}
16755  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16756  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16757    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16758  fi
16759
16760
16761
16762
16763  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16764    # zero behaves as a platform and rewrites these values. This is really weird. :(
16765    # We are guaranteed that we do not build any other variants when building zero.
16766    HOTSPOT_TARGET_CPU=zero
16767    HOTSPOT_TARGET_CPU_ARCH=zero
16768  fi
16769
16770
16771# With basic setup done, call the custom early hook.
16772
16773
16774# Check if we have devkits, extra paths or sysroot set.
16775
16776
16777# Check whether --with-devkit was given.
16778if test "${with_devkit+set}" = set; then :
16779  withval=$with_devkit;
16780
16781  # Only process if variable expands to non-empty
16782
16783  if test "x$with_devkit" != x; then
16784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16785
16786  # Input might be given as Windows format, start by converting to
16787  # unix format.
16788  path="$with_devkit"
16789  new_path=`$CYGPATH -u "$path"`
16790
16791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16794  # "foo.exe" is OK but "foo" is an error.
16795  #
16796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16797  # It is also a way to make sure we got the proper file name for the real test later on.
16798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16799  if test "x$test_shortpath" = x; then
16800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16801$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16802    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16803  fi
16804
16805  # Call helper function which possibly converts this using DOS-style short mode.
16806  # If so, the updated path is stored in $new_path.
16807
16808  input_path="$new_path"
16809  # Check if we need to convert this using DOS-style short mode. If the path
16810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16811  # take no chances and rewrite it.
16812  # Note: m4 eats our [], so we need to use [ and ] instead.
16813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16814  if test "x$has_forbidden_chars" != x; then
16815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16819      # Going to short mode and back again did indeed matter. Since short mode is
16820      # case insensitive, let's make it lowercase to improve readability.
16821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16822      # Now convert it back to Unix-style (cygpath)
16823      input_path=`$CYGPATH -u "$shortmode_path"`
16824      new_path="$input_path"
16825    fi
16826  fi
16827
16828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16829  if test "x$test_cygdrive_prefix" = x; then
16830    # As a simple fix, exclude /usr/bin since it's not a real path.
16831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16833      # a path prefixed by /cygdrive for fixpath to work.
16834      new_path="$CYGWIN_ROOT_PATH$input_path"
16835    fi
16836  fi
16837
16838
16839  if test "x$path" != "x$new_path"; then
16840    with_devkit="$new_path"
16841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16842$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16843  fi
16844
16845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16846
16847  path="$with_devkit"
16848  has_colon=`$ECHO $path | $GREP ^.:`
16849  new_path="$path"
16850  if test "x$has_colon" = x; then
16851    # Not in mixed or Windows style, start by that.
16852    new_path=`cmd //c echo $path`
16853  fi
16854
16855
16856  input_path="$new_path"
16857  # Check if we need to convert this using DOS-style short mode. If the path
16858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16859  # take no chances and rewrite it.
16860  # Note: m4 eats our [], so we need to use [ and ] instead.
16861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16862  if test "x$has_forbidden_chars" != x; then
16863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16865  fi
16866
16867
16868  windows_path="$new_path"
16869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16870    unix_path=`$CYGPATH -u "$windows_path"`
16871    new_path="$unix_path"
16872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16874    new_path="$unix_path"
16875  fi
16876
16877  if test "x$path" != "x$new_path"; then
16878    with_devkit="$new_path"
16879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16880$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16881  fi
16882
16883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16885
16886    else
16887      # We're on a unix platform. Hooray! :)
16888      path="$with_devkit"
16889      has_space=`$ECHO "$path" | $GREP " "`
16890      if test "x$has_space" != x; then
16891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16892$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16894      fi
16895
16896      # Use eval to expand a potential ~
16897      eval path="$path"
16898      if test ! -f "$path" && test ! -d "$path"; then
16899        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16900      fi
16901
16902      if test -d "$path"; then
16903        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16904      else
16905        dir="`$DIRNAME "$path"`"
16906        base="`$BASENAME "$path"`"
16907        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16908      fi
16909    fi
16910  fi
16911
16912        DEVKIT_ROOT="$with_devkit"
16913        # Check for a meta data info file in the root of the devkit
16914        if test -f "$DEVKIT_ROOT/devkit.info"; then
16915          . $DEVKIT_ROOT/devkit.info
16916          # This potentially sets the following:
16917          # A descriptive name of the devkit
16918
16919  if test "x$DEVKIT_NAME" = x; then
16920    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16921  fi
16922
16923          # Corresponds to --with-extra-path
16924
16925  if test "x$DEVKIT_EXTRA_PATH" = x; then
16926    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16927  fi
16928
16929          # Corresponds to --with-toolchain-path
16930
16931  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16932    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16933  fi
16934
16935          # Corresponds to --with-sysroot
16936
16937  if test "x$DEVKIT_SYSROOT" = x; then
16938    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16939  fi
16940
16941
16942          # Identifies the Visual Studio version in the devkit
16943
16944  if test "x$DEVKIT_VS_VERSION" = x; then
16945    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16946  fi
16947
16948          # The Visual Studio include environment variable
16949
16950  if test "x$DEVKIT_VS_INCLUDE" = x; then
16951    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16952  fi
16953
16954          # The Visual Studio lib environment variable
16955
16956  if test "x$DEVKIT_VS_LIB" = x; then
16957    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16958  fi
16959
16960          # Corresponds to --with-msvcr-dll
16961
16962  if test "x$DEVKIT_MSVCR_DLL" = x; then
16963    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16964  fi
16965
16966          # Corresponds to --with-msvcp-dll
16967
16968  if test "x$DEVKIT_MSVCP_DLL" = x; then
16969    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16970  fi
16971
16972        fi
16973
16974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16975$as_echo_n "checking for devkit... " >&6; }
16976        if test "x$DEVKIT_NAME" != x; then
16977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16978$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16979        else
16980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16981$as_echo "$DEVKIT_ROOT" >&6; }
16982        fi
16983
16984
16985  if test "x$DEVKIT_EXTRA_PATH" != x; then
16986    if test "x$EXTRA_PATH" = x; then
16987      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16988    else
16989      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16990    fi
16991  fi
16992
16993
16994        # Fallback default of just /bin if DEVKIT_PATH is not defined
16995        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16996          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16997        fi
16998
16999  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17000    if test "x$TOOLCHAIN_PATH" = x; then
17001      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17002    else
17003      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17004    fi
17005  fi
17006
17007
17008        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17009        # places for backwards compatiblity.
17010        if test "x$DEVKIT_SYSROOT" != x; then
17011          SYSROOT="$DEVKIT_SYSROOT"
17012        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17013          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17014        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17015          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17016        fi
17017
17018
17019fi
17020
17021
17022  # You can force the sysroot if the sysroot encoded into the compiler tools
17023  # is not correct.
17024
17025# Check whether --with-sys-root was given.
17026if test "${with_sys_root+set}" = set; then :
17027  withval=$with_sys_root; SYSROOT=$with_sys_root
17028
17029fi
17030
17031
17032
17033# Check whether --with-sysroot was given.
17034if test "${with_sysroot+set}" = set; then :
17035  withval=$with_sysroot; SYSROOT=$with_sysroot
17036
17037fi
17038
17039
17040
17041# Check whether --with-tools-dir was given.
17042if test "${with_tools_dir+set}" = set; then :
17043  withval=$with_tools_dir;
17044  if test "x$with_tools_dir" != x; then
17045    if test "x$TOOLCHAIN_PATH" = x; then
17046      TOOLCHAIN_PATH="$with_tools_dir"
17047    else
17048      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17049    fi
17050  fi
17051
17052
17053fi
17054
17055
17056
17057# Check whether --with-toolchain-path was given.
17058if test "${with_toolchain_path+set}" = set; then :
17059  withval=$with_toolchain_path;
17060  if test "x$with_toolchain_path" != x; then
17061    if test "x$TOOLCHAIN_PATH" = x; then
17062      TOOLCHAIN_PATH="$with_toolchain_path"
17063    else
17064      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17065    fi
17066  fi
17067
17068
17069fi
17070
17071
17072
17073# Check whether --with-extra-path was given.
17074if test "${with_extra_path+set}" = set; then :
17075  withval=$with_extra_path;
17076  if test "x$with_extra_path" != x; then
17077    if test "x$EXTRA_PATH" = x; then
17078      EXTRA_PATH="$with_extra_path"
17079    else
17080      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17081    fi
17082  fi
17083
17084
17085fi
17086
17087
17088  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17089    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17090    # If not, detect if Xcode is installed by running xcodebuild -version
17091    # if no Xcode installed, xcodebuild exits with 1
17092    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17093    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17094      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17095      # fall back on the stub binary in /usr/bin/xcodebuild
17096      # Extract the first word of "xcodebuild", so it can be a program name with args.
17097set dummy xcodebuild; 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_XCODEBUILD+:} false; then :
17101  $as_echo_n "(cached) " >&6
17102else
17103  case $XCODEBUILD in
17104  [\\/]* | ?:[\\/]*)
17105  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17106  ;;
17107  *)
17108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17109for as_dir in $TOOLCHAIN_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_XCODEBUILD="$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  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17124  ;;
17125esac
17126fi
17127XCODEBUILD=$ac_cv_path_XCODEBUILD
17128if test -n "$XCODEBUILD"; then
17129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17130$as_echo "$XCODEBUILD" >&6; }
17131else
17132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17133$as_echo "no" >&6; }
17134fi
17135
17136
17137    else
17138      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17139      # when only the command line tools are installed there are no SDKs, so headers
17140      # are copied into the system frameworks
17141      XCODEBUILD=
17142
17143    fi
17144
17145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17146$as_echo_n "checking for sdk name... " >&6; }
17147
17148# Check whether --with-sdk-name was given.
17149if test "${with_sdk_name+set}" = set; then :
17150  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17151
17152fi
17153
17154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17155$as_echo "$SDKNAME" >&6; }
17156
17157    # if toolchain path is specified then don't rely on system headers, they may not compile
17158    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17159    test -z "$TOOLCHAIN_PATH" && \
17160      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17161
17162    if test -z "$SYSROOT"; then
17163      if test -n "$XCODEBUILD"; then
17164        # if we don't have system headers, use default SDK name (last resort)
17165        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17166          SDKNAME=${SDKNAME:-macosx}
17167        fi
17168
17169        if test -n "$SDKNAME"; then
17170          # Call xcodebuild to determine SYSROOT
17171          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17172        fi
17173      else
17174        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17175          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
17176        fi
17177      fi
17178    else
17179      # warn user if --with-sdk-name was also set
17180      if test -n "$with_sdk_name"; then
17181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17182$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17183      fi
17184    fi
17185
17186    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17187      # If no system framework headers, then SYSROOT must be set, or we won't build
17188      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
17189    fi
17190
17191    # Perform a basic sanity test
17192    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17193      if test -z "$SYSROOT"; then
17194        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
17195      else
17196        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17197      fi
17198    fi
17199
17200    # set SDKROOT too, Xcode tools will pick it up
17201    SDKROOT=$SYSROOT
17202
17203  fi
17204
17205  # Prepend the extra path to the global path
17206
17207  if test "x$EXTRA_PATH" != x; then
17208    if test "x$PATH" = x; then
17209      PATH="$EXTRA_PATH"
17210    else
17211      PATH="$EXTRA_PATH:$PATH"
17212    fi
17213  fi
17214
17215
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17217$as_echo_n "checking for sysroot... " >&6; }
17218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17219$as_echo "$SYSROOT" >&6; }
17220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17221$as_echo_n "checking for toolchain path... " >&6; }
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17223$as_echo "$TOOLCHAIN_PATH" >&6; }
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17225$as_echo_n "checking for extra path... " >&6; }
17226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17227$as_echo "$EXTRA_PATH" >&6; }
17228
17229
17230# To properly create a configuration name, we need to have the OpenJDK target
17231# and options (variants and debug level) parsed.
17232
17233
17234
17235# Check whether --with-conf-name was given.
17236if test "${with_conf_name+set}" = set; then :
17237  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17238fi
17239
17240
17241  # Test from where we are running configure, in or outside of src root.
17242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17243$as_echo_n "checking where to store configuration... " >&6; }
17244  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17245      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17246      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17247    # We are running configure from the src root.
17248    # Create a default ./build/target-variant-debuglevel output root.
17249    if test "x${CONF_NAME}" = x; then
17250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17251$as_echo "in default location" >&6; }
17252      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17253    else
17254      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17255$as_echo "in build directory with custom name" >&6; }
17256    fi
17257    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17258    $MKDIR -p "$OUTPUT_ROOT"
17259    if test ! -d "$OUTPUT_ROOT"; then
17260      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17261    fi
17262  else
17263    # We are running configure from outside of the src dir.
17264    # Then use the current directory as output dir!
17265    # If configuration is situated in normal build directory, just use the build
17266    # directory name as configuration name, otherwise use the complete path.
17267    if test "x${CONF_NAME}" = x; then
17268      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17269    fi
17270    OUTPUT_ROOT="$CURDIR"
17271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17272$as_echo "in current directory" >&6; }
17273
17274    # WARNING: This might be a bad thing to do. You need to be sure you want to
17275    # have a configuration in this directory. Do some sanity checks!
17276
17277    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17278      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17279      # other files
17280      files_present=`$LS $OUTPUT_ROOT`
17281      # Configure has already touched config.log and confdefs.h in the current dir when this check
17282      # is performed.
17283      filtered_files=`$ECHO "$files_present" \
17284          | $SED -e 's/config.log//g' \
17285              -e 's/configure.log//g' \
17286              -e 's/confdefs.h//g' \
17287              -e 's/ //g' \
17288          | $TR -d '\n'`
17289      if test "x$filtered_files" != x; then
17290        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17291$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17293$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17295$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17297$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17299$as_echo "$as_me: seriously mess up just about everything." >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17301$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17302        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17303$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17304        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17305      fi
17306    fi
17307  fi
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17309$as_echo_n "checking what configuration name to use... " >&6; }
17310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17311$as_echo "$CONF_NAME" >&6; }
17312
17313
17314  # Only process if variable expands to non-empty
17315
17316  if test "x$OUTPUT_ROOT" != x; then
17317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17318
17319  # Input might be given as Windows format, start by converting to
17320  # unix format.
17321  path="$OUTPUT_ROOT"
17322  new_path=`$CYGPATH -u "$path"`
17323
17324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17327  # "foo.exe" is OK but "foo" is an error.
17328  #
17329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17330  # It is also a way to make sure we got the proper file name for the real test later on.
17331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17332  if test "x$test_shortpath" = x; then
17333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17334$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17335    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17336  fi
17337
17338  # Call helper function which possibly converts this using DOS-style short mode.
17339  # If so, the updated path is stored in $new_path.
17340
17341  input_path="$new_path"
17342  # Check if we need to convert this using DOS-style short mode. If the path
17343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17344  # take no chances and rewrite it.
17345  # Note: m4 eats our [], so we need to use [ and ] instead.
17346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17347  if test "x$has_forbidden_chars" != x; then
17348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17352      # Going to short mode and back again did indeed matter. Since short mode is
17353      # case insensitive, let's make it lowercase to improve readability.
17354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17355      # Now convert it back to Unix-style (cygpath)
17356      input_path=`$CYGPATH -u "$shortmode_path"`
17357      new_path="$input_path"
17358    fi
17359  fi
17360
17361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17362  if test "x$test_cygdrive_prefix" = x; then
17363    # As a simple fix, exclude /usr/bin since it's not a real path.
17364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17366      # a path prefixed by /cygdrive for fixpath to work.
17367      new_path="$CYGWIN_ROOT_PATH$input_path"
17368    fi
17369  fi
17370
17371
17372  if test "x$path" != "x$new_path"; then
17373    OUTPUT_ROOT="$new_path"
17374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17375$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17376  fi
17377
17378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17379
17380  path="$OUTPUT_ROOT"
17381  has_colon=`$ECHO $path | $GREP ^.:`
17382  new_path="$path"
17383  if test "x$has_colon" = x; then
17384    # Not in mixed or Windows style, start by that.
17385    new_path=`cmd //c echo $path`
17386  fi
17387
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
17401  windows_path="$new_path"
17402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17403    unix_path=`$CYGPATH -u "$windows_path"`
17404    new_path="$unix_path"
17405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17407    new_path="$unix_path"
17408  fi
17409
17410  if test "x$path" != "x$new_path"; then
17411    OUTPUT_ROOT="$new_path"
17412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17413$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17414  fi
17415
17416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17418
17419    else
17420      # We're on a unix platform. Hooray! :)
17421      path="$OUTPUT_ROOT"
17422      has_space=`$ECHO "$path" | $GREP " "`
17423      if test "x$has_space" != x; then
17424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17425$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17426        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17427      fi
17428
17429      # Use eval to expand a potential ~
17430      eval path="$path"
17431      if test ! -f "$path" && test ! -d "$path"; then
17432        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17433      fi
17434
17435      if test -d "$path"; then
17436        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17437      else
17438        dir="`$DIRNAME "$path"`"
17439        base="`$BASENAME "$path"`"
17440        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17441      fi
17442    fi
17443  fi
17444
17445
17446  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17447  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17448
17449  SPEC=$OUTPUT_ROOT/spec.gmk
17450
17451  CONF_NAME=$CONF_NAME
17452
17453  OUTPUT_ROOT=$OUTPUT_ROOT
17454
17455
17456
17457  # The spec.gmk file contains all variables for the make system.
17458  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17459
17460  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17461  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17462
17463  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17464  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17465
17466  # The compare.sh is used to compare the build output to other builds.
17467  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17468
17469  # The generated Makefile knows where the spec.gmk is and where the source is.
17470  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17471  # which will look for generated configurations
17472  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17473
17474
17475
17476# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17477
17478  for ac_prog in apt-get yum port pkgutil pkgadd
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_prog_PKGHANDLER+:} false; then :
17485  $as_echo_n "(cached) " >&6
17486else
17487  if test -n "$PKGHANDLER"; then
17488  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17489else
17490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17491for as_dir in $PATH
17492do
17493  IFS=$as_save_IFS
17494  test -z "$as_dir" && as_dir=.
17495    for ac_exec_ext in '' $ac_executable_extensions; do
17496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17497    ac_cv_prog_PKGHANDLER="$ac_prog"
17498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17499    break 2
17500  fi
17501done
17502  done
17503IFS=$as_save_IFS
17504
17505fi
17506fi
17507PKGHANDLER=$ac_cv_prog_PKGHANDLER
17508if test -n "$PKGHANDLER"; then
17509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17510$as_echo "$PKGHANDLER" >&6; }
17511else
17512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17513$as_echo "no" >&6; }
17514fi
17515
17516
17517  test -n "$PKGHANDLER" && break
17518done
17519
17520
17521
17522# Setup tools that requires more complex handling, or that is not needed by the configure script.
17523
17524
17525
17526  # Publish this variable in the help.
17527
17528
17529  if [ -z "${MAKE+x}" ]; then
17530    # The variable is not set by user, try to locate tool using the code snippet
17531
17532    # Try our hardest to locate a correct version of GNU make
17533    for ac_prog in gmake
17534do
17535  # Extract the first word of "$ac_prog", so it can be a program name with args.
17536set dummy $ac_prog; ac_word=$2
17537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17538$as_echo_n "checking for $ac_word... " >&6; }
17539if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17540  $as_echo_n "(cached) " >&6
17541else
17542  case $CHECK_GMAKE in
17543  [\\/]* | ?:[\\/]*)
17544  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17545  ;;
17546  *)
17547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17548for as_dir in $PATH
17549do
17550  IFS=$as_save_IFS
17551  test -z "$as_dir" && as_dir=.
17552    for ac_exec_ext in '' $ac_executable_extensions; do
17553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17554    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17556    break 2
17557  fi
17558done
17559  done
17560IFS=$as_save_IFS
17561
17562  ;;
17563esac
17564fi
17565CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17566if test -n "$CHECK_GMAKE"; then
17567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17568$as_echo "$CHECK_GMAKE" >&6; }
17569else
17570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17571$as_echo "no" >&6; }
17572fi
17573
17574
17575  test -n "$CHECK_GMAKE" && break
17576done
17577
17578
17579  MAKE_CANDIDATE=""$CHECK_GMAKE""
17580  DESCRIPTION="gmake in PATH"
17581
17582  # On Cygwin, we require a newer version of make than on other platforms
17583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17584    MAKE_VERSION_EXPR="-e 4\."
17585    MAKE_REQUIRED_VERSION="4.0"
17586   else
17587    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17588    MAKE_REQUIRED_VERSION="3.81"
17589  fi
17590
17591  if test "x$MAKE_CANDIDATE" != x; then
17592    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17593$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17594    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17595    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17596    if test "x$IS_GNU_MAKE" = x; then
17597      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17598$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17599    else
17600      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17601      if test "x$IS_MODERN_MAKE" = x; then
17602        { $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
17603$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;}
17604      else
17605        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17606          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17607            MAKE_EXPECTED_ENV='cygwin'
17608          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17609            MAKE_EXPECTED_ENV='msys'
17610          else
17611            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17612          fi
17613          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17614          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17615        else
17616          # Not relevant for non-Windows
17617          IS_MAKE_CORRECT_ENV=true
17618        fi
17619        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17620          { $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
17621$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;}
17622        else
17623          FOUND_MAKE=$MAKE_CANDIDATE
17624
17625  # Only process if variable expands to non-empty
17626
17627  if test "x$FOUND_MAKE" != x; then
17628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17629
17630  # First separate the path from the arguments. This will split at the first
17631  # space.
17632  complete="$FOUND_MAKE"
17633  path="${complete%% *}"
17634  tmp="$complete EOL"
17635  arguments="${tmp#* }"
17636
17637  # Input might be given as Windows format, start by converting to
17638  # unix format.
17639  new_path=`$CYGPATH -u "$path"`
17640
17641  # Now try to locate executable using which
17642  new_path=`$WHICH "$new_path" 2> /dev/null`
17643  # bat and cmd files are not always considered executable in cygwin causing which
17644  # to not find them
17645  if test "x$new_path" = x \
17646      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17647      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17648    new_path=`$CYGPATH -u "$path"`
17649  fi
17650  if test "x$new_path" = x; then
17651    # Oops. Which didn't find the executable.
17652    # The splitting of arguments from the executable at a space might have been incorrect,
17653    # since paths with space are more likely in Windows. Give it another try with the whole
17654    # argument.
17655    path="$complete"
17656    arguments="EOL"
17657    new_path=`$CYGPATH -u "$path"`
17658    new_path=`$WHICH "$new_path" 2> /dev/null`
17659    # bat and cmd files are not always considered executable in cygwin causing which
17660    # to not find them
17661    if test "x$new_path" = x \
17662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17664      new_path=`$CYGPATH -u "$path"`
17665    fi
17666    if test "x$new_path" = x; then
17667      # It's still not found. Now this is an unrecoverable error.
17668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17669$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17670      has_space=`$ECHO "$complete" | $GREP " "`
17671      if test "x$has_space" != x; then
17672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17674      fi
17675      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17676    fi
17677  fi
17678
17679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17682  # "foo.exe" is OK but "foo" is an error.
17683  #
17684  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17685  # It is also a way to make sure we got the proper file name for the real test later on.
17686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17687  if test "x$test_shortpath" = x; then
17688    # Short path failed, file does not exist as specified.
17689    # Try adding .exe or .cmd
17690    if test -f "${new_path}.exe"; then
17691      input_to_shortpath="${new_path}.exe"
17692    elif test -f "${new_path}.cmd"; then
17693      input_to_shortpath="${new_path}.cmd"
17694    else
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17696$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17697      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17698$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17699      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17700    fi
17701  else
17702    input_to_shortpath="$new_path"
17703  fi
17704
17705  # Call helper function which possibly converts this using DOS-style short mode.
17706  # If so, the updated path is stored in $new_path.
17707  new_path="$input_to_shortpath"
17708
17709  input_path="$input_to_shortpath"
17710  # Check if we need to convert this using DOS-style short mode. If the path
17711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17712  # take no chances and rewrite it.
17713  # Note: m4 eats our [], so we need to use [ and ] instead.
17714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17715  if test "x$has_forbidden_chars" != x; then
17716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17720      # Going to short mode and back again did indeed matter. Since short mode is
17721      # case insensitive, let's make it lowercase to improve readability.
17722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17723      # Now convert it back to Unix-style (cygpath)
17724      input_path=`$CYGPATH -u "$shortmode_path"`
17725      new_path="$input_path"
17726    fi
17727  fi
17728
17729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17730  if test "x$test_cygdrive_prefix" = x; then
17731    # As a simple fix, exclude /usr/bin since it's not a real path.
17732    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17734      # a path prefixed by /cygdrive for fixpath to work.
17735      new_path="$CYGWIN_ROOT_PATH$input_path"
17736    fi
17737  fi
17738
17739  # remove trailing .exe if any
17740  new_path="${new_path/%.exe/}"
17741
17742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17743
17744  # First separate the path from the arguments. This will split at the first
17745  # space.
17746  complete="$FOUND_MAKE"
17747  path="${complete%% *}"
17748  tmp="$complete EOL"
17749  arguments="${tmp#* }"
17750
17751  # Input might be given as Windows format, start by converting to
17752  # unix format.
17753  new_path="$path"
17754
17755  windows_path="$new_path"
17756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17757    unix_path=`$CYGPATH -u "$windows_path"`
17758    new_path="$unix_path"
17759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17761    new_path="$unix_path"
17762  fi
17763
17764
17765  # Now try to locate executable using which
17766  new_path=`$WHICH "$new_path" 2> /dev/null`
17767
17768  if test "x$new_path" = x; then
17769    # Oops. Which didn't find the executable.
17770    # The splitting of arguments from the executable at a space might have been incorrect,
17771    # since paths with space are more likely in Windows. Give it another try with the whole
17772    # argument.
17773    path="$complete"
17774    arguments="EOL"
17775    new_path="$path"
17776
17777  windows_path="$new_path"
17778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17779    unix_path=`$CYGPATH -u "$windows_path"`
17780    new_path="$unix_path"
17781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17783    new_path="$unix_path"
17784  fi
17785
17786
17787    new_path=`$WHICH "$new_path" 2> /dev/null`
17788    # bat and cmd files are not always considered executable in MSYS causing which
17789    # to not find them
17790    if test "x$new_path" = x \
17791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17793      new_path="$path"
17794
17795  windows_path="$new_path"
17796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17797    unix_path=`$CYGPATH -u "$windows_path"`
17798    new_path="$unix_path"
17799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17801    new_path="$unix_path"
17802  fi
17803
17804    fi
17805
17806    if test "x$new_path" = x; then
17807      # It's still not found. Now this is an unrecoverable error.
17808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17809$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17810      has_space=`$ECHO "$complete" | $GREP " "`
17811      if test "x$has_space" != x; then
17812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17814      fi
17815      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17816    fi
17817  fi
17818
17819  # Now new_path has a complete unix path to the binary
17820  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17821    # Keep paths in /bin as-is, but remove trailing .exe if any
17822    new_path="${new_path/%.exe/}"
17823    # Do not save /bin paths to all_fixpath_prefixes!
17824  else
17825    # Not in mixed or Windows style, start by that.
17826    new_path=`cmd //c echo $new_path`
17827
17828  input_path="$new_path"
17829  # Check if we need to convert this using DOS-style short mode. If the path
17830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17831  # take no chances and rewrite it.
17832  # Note: m4 eats our [], so we need to use [ and ] instead.
17833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17834  if test "x$has_forbidden_chars" != x; then
17835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17837  fi
17838
17839    # Output is in $new_path
17840
17841  windows_path="$new_path"
17842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17843    unix_path=`$CYGPATH -u "$windows_path"`
17844    new_path="$unix_path"
17845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17847    new_path="$unix_path"
17848  fi
17849
17850    # remove trailing .exe if any
17851    new_path="${new_path/%.exe/}"
17852
17853    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17854    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17855  fi
17856
17857    else
17858      # We're on a unix platform. Hooray! :)
17859      # First separate the path from the arguments. This will split at the first
17860      # space.
17861      complete="$FOUND_MAKE"
17862      path="${complete%% *}"
17863      tmp="$complete EOL"
17864      arguments="${tmp#* }"
17865
17866      # Cannot rely on the command "which" here since it doesn't always work.
17867      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17868      if test -z "$is_absolute_path"; then
17869        # Path to executable is not absolute. Find it.
17870        IFS_save="$IFS"
17871        IFS=:
17872        for p in $PATH; do
17873          if test -f "$p/$path" && test -x "$p/$path"; then
17874            new_path="$p/$path"
17875            break
17876          fi
17877        done
17878        IFS="$IFS_save"
17879      else
17880        # This is an absolute path, we can use it without further modifications.
17881        new_path="$path"
17882      fi
17883
17884      if test "x$new_path" = x; then
17885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17886$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17887        has_space=`$ECHO "$complete" | $GREP " "`
17888        if test "x$has_space" != x; then
17889          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17890$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17891        fi
17892        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17893      fi
17894    fi
17895
17896    # Now join together the path and the arguments once again
17897    if test "x$arguments" != xEOL; then
17898      new_complete="$new_path ${arguments% *}"
17899    else
17900      new_complete="$new_path"
17901    fi
17902
17903    if test "x$complete" != "x$new_complete"; then
17904      FOUND_MAKE="$new_complete"
17905      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17906$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17907    fi
17908  fi
17909
17910        fi
17911      fi
17912    fi
17913  fi
17914
17915
17916    if test "x$FOUND_MAKE" = x; then
17917      for ac_prog in make
17918do
17919  # Extract the first word of "$ac_prog", so it can be a program name with args.
17920set dummy $ac_prog; ac_word=$2
17921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17922$as_echo_n "checking for $ac_word... " >&6; }
17923if ${ac_cv_path_CHECK_MAKE+:} false; then :
17924  $as_echo_n "(cached) " >&6
17925else
17926  case $CHECK_MAKE in
17927  [\\/]* | ?:[\\/]*)
17928  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17929  ;;
17930  *)
17931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17932for as_dir in $PATH
17933do
17934  IFS=$as_save_IFS
17935  test -z "$as_dir" && as_dir=.
17936    for ac_exec_ext in '' $ac_executable_extensions; do
17937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17938    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17940    break 2
17941  fi
17942done
17943  done
17944IFS=$as_save_IFS
17945
17946  ;;
17947esac
17948fi
17949CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17950if test -n "$CHECK_MAKE"; then
17951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17952$as_echo "$CHECK_MAKE" >&6; }
17953else
17954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17955$as_echo "no" >&6; }
17956fi
17957
17958
17959  test -n "$CHECK_MAKE" && break
17960done
17961
17962
17963  MAKE_CANDIDATE=""$CHECK_MAKE""
17964  DESCRIPTION="make in PATH"
17965
17966  # On Cygwin, we require a newer version of make than on other platforms
17967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17968    MAKE_VERSION_EXPR="-e 4\."
17969    MAKE_REQUIRED_VERSION="4.0"
17970   else
17971    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17972    MAKE_REQUIRED_VERSION="3.81"
17973  fi
17974
17975  if test "x$MAKE_CANDIDATE" != x; then
17976    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17977$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17978    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17979    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17980    if test "x$IS_GNU_MAKE" = x; then
17981      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17982$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17983    else
17984      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17985      if test "x$IS_MODERN_MAKE" = x; then
17986        { $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
17987$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;}
17988      else
17989        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17990          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17991            MAKE_EXPECTED_ENV='cygwin'
17992          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17993            MAKE_EXPECTED_ENV='msys'
17994          else
17995            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17996          fi
17997          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17998          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17999        else
18000          # Not relevant for non-Windows
18001          IS_MAKE_CORRECT_ENV=true
18002        fi
18003        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18004          { $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
18005$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;}
18006        else
18007          FOUND_MAKE=$MAKE_CANDIDATE
18008
18009  # Only process if variable expands to non-empty
18010
18011  if test "x$FOUND_MAKE" != x; then
18012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18013
18014  # First separate the path from the arguments. This will split at the first
18015  # space.
18016  complete="$FOUND_MAKE"
18017  path="${complete%% *}"
18018  tmp="$complete EOL"
18019  arguments="${tmp#* }"
18020
18021  # Input might be given as Windows format, start by converting to
18022  # unix format.
18023  new_path=`$CYGPATH -u "$path"`
18024
18025  # Now try to locate executable using which
18026  new_path=`$WHICH "$new_path" 2> /dev/null`
18027  # bat and cmd files are not always considered executable in cygwin causing which
18028  # to not find them
18029  if test "x$new_path" = x \
18030      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18031      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18032    new_path=`$CYGPATH -u "$path"`
18033  fi
18034  if test "x$new_path" = x; then
18035    # Oops. Which didn't find the executable.
18036    # The splitting of arguments from the executable at a space might have been incorrect,
18037    # since paths with space are more likely in Windows. Give it another try with the whole
18038    # argument.
18039    path="$complete"
18040    arguments="EOL"
18041    new_path=`$CYGPATH -u "$path"`
18042    new_path=`$WHICH "$new_path" 2> /dev/null`
18043    # bat and cmd files are not always considered executable in cygwin causing which
18044    # to not find them
18045    if test "x$new_path" = x \
18046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18048      new_path=`$CYGPATH -u "$path"`
18049    fi
18050    if test "x$new_path" = x; then
18051      # It's still not found. Now this is an unrecoverable error.
18052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18054      has_space=`$ECHO "$complete" | $GREP " "`
18055      if test "x$has_space" != x; then
18056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18058      fi
18059      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18060    fi
18061  fi
18062
18063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18066  # "foo.exe" is OK but "foo" is an error.
18067  #
18068  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18069  # It is also a way to make sure we got the proper file name for the real test later on.
18070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18071  if test "x$test_shortpath" = x; then
18072    # Short path failed, file does not exist as specified.
18073    # Try adding .exe or .cmd
18074    if test -f "${new_path}.exe"; then
18075      input_to_shortpath="${new_path}.exe"
18076    elif test -f "${new_path}.cmd"; then
18077      input_to_shortpath="${new_path}.cmd"
18078    else
18079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18080$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18081      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18082$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18084    fi
18085  else
18086    input_to_shortpath="$new_path"
18087  fi
18088
18089  # Call helper function which possibly converts this using DOS-style short mode.
18090  # If so, the updated path is stored in $new_path.
18091  new_path="$input_to_shortpath"
18092
18093  input_path="$input_to_shortpath"
18094  # Check if we need to convert this using DOS-style short mode. If the path
18095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18096  # take no chances and rewrite it.
18097  # Note: m4 eats our [], so we need to use [ and ] instead.
18098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18099  if test "x$has_forbidden_chars" != x; then
18100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18104      # Going to short mode and back again did indeed matter. Since short mode is
18105      # case insensitive, let's make it lowercase to improve readability.
18106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18107      # Now convert it back to Unix-style (cygpath)
18108      input_path=`$CYGPATH -u "$shortmode_path"`
18109      new_path="$input_path"
18110    fi
18111  fi
18112
18113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18114  if test "x$test_cygdrive_prefix" = x; then
18115    # As a simple fix, exclude /usr/bin since it's not a real path.
18116    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18118      # a path prefixed by /cygdrive for fixpath to work.
18119      new_path="$CYGWIN_ROOT_PATH$input_path"
18120    fi
18121  fi
18122
18123  # remove trailing .exe if any
18124  new_path="${new_path/%.exe/}"
18125
18126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18127
18128  # First separate the path from the arguments. This will split at the first
18129  # space.
18130  complete="$FOUND_MAKE"
18131  path="${complete%% *}"
18132  tmp="$complete EOL"
18133  arguments="${tmp#* }"
18134
18135  # Input might be given as Windows format, start by converting to
18136  # unix format.
18137  new_path="$path"
18138
18139  windows_path="$new_path"
18140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18141    unix_path=`$CYGPATH -u "$windows_path"`
18142    new_path="$unix_path"
18143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18145    new_path="$unix_path"
18146  fi
18147
18148
18149  # Now try to locate executable using which
18150  new_path=`$WHICH "$new_path" 2> /dev/null`
18151
18152  if test "x$new_path" = x; then
18153    # Oops. Which didn't find the executable.
18154    # The splitting of arguments from the executable at a space might have been incorrect,
18155    # since paths with space are more likely in Windows. Give it another try with the whole
18156    # argument.
18157    path="$complete"
18158    arguments="EOL"
18159    new_path="$path"
18160
18161  windows_path="$new_path"
18162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18163    unix_path=`$CYGPATH -u "$windows_path"`
18164    new_path="$unix_path"
18165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18167    new_path="$unix_path"
18168  fi
18169
18170
18171    new_path=`$WHICH "$new_path" 2> /dev/null`
18172    # bat and cmd files are not always considered executable in MSYS causing which
18173    # to not find them
18174    if test "x$new_path" = x \
18175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18177      new_path="$path"
18178
18179  windows_path="$new_path"
18180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18181    unix_path=`$CYGPATH -u "$windows_path"`
18182    new_path="$unix_path"
18183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18185    new_path="$unix_path"
18186  fi
18187
18188    fi
18189
18190    if test "x$new_path" = x; then
18191      # It's still not found. Now this is an unrecoverable error.
18192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18193$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18194      has_space=`$ECHO "$complete" | $GREP " "`
18195      if test "x$has_space" != x; then
18196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18198      fi
18199      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18200    fi
18201  fi
18202
18203  # Now new_path has a complete unix path to the binary
18204  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18205    # Keep paths in /bin as-is, but remove trailing .exe if any
18206    new_path="${new_path/%.exe/}"
18207    # Do not save /bin paths to all_fixpath_prefixes!
18208  else
18209    # Not in mixed or Windows style, start by that.
18210    new_path=`cmd //c echo $new_path`
18211
18212  input_path="$new_path"
18213  # Check if we need to convert this using DOS-style short mode. If the path
18214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18215  # take no chances and rewrite it.
18216  # Note: m4 eats our [], so we need to use [ and ] instead.
18217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18218  if test "x$has_forbidden_chars" != x; then
18219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18221  fi
18222
18223    # Output is in $new_path
18224
18225  windows_path="$new_path"
18226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18227    unix_path=`$CYGPATH -u "$windows_path"`
18228    new_path="$unix_path"
18229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18231    new_path="$unix_path"
18232  fi
18233
18234    # remove trailing .exe if any
18235    new_path="${new_path/%.exe/}"
18236
18237    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18238    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18239  fi
18240
18241    else
18242      # We're on a unix platform. Hooray! :)
18243      # First separate the path from the arguments. This will split at the first
18244      # space.
18245      complete="$FOUND_MAKE"
18246      path="${complete%% *}"
18247      tmp="$complete EOL"
18248      arguments="${tmp#* }"
18249
18250      # Cannot rely on the command "which" here since it doesn't always work.
18251      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18252      if test -z "$is_absolute_path"; then
18253        # Path to executable is not absolute. Find it.
18254        IFS_save="$IFS"
18255        IFS=:
18256        for p in $PATH; do
18257          if test -f "$p/$path" && test -x "$p/$path"; then
18258            new_path="$p/$path"
18259            break
18260          fi
18261        done
18262        IFS="$IFS_save"
18263      else
18264        # This is an absolute path, we can use it without further modifications.
18265        new_path="$path"
18266      fi
18267
18268      if test "x$new_path" = x; then
18269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18270$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18271        has_space=`$ECHO "$complete" | $GREP " "`
18272        if test "x$has_space" != x; then
18273          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18274$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18275        fi
18276        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18277      fi
18278    fi
18279
18280    # Now join together the path and the arguments once again
18281    if test "x$arguments" != xEOL; then
18282      new_complete="$new_path ${arguments% *}"
18283    else
18284      new_complete="$new_path"
18285    fi
18286
18287    if test "x$complete" != "x$new_complete"; then
18288      FOUND_MAKE="$new_complete"
18289      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18290$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18291    fi
18292  fi
18293
18294        fi
18295      fi
18296    fi
18297  fi
18298
18299    fi
18300
18301    if test "x$FOUND_MAKE" = x; then
18302      if test "x$TOOLCHAIN_PATH" != x; then
18303        # We have a toolchain path, check that as well before giving up.
18304        OLD_PATH=$PATH
18305        PATH=$TOOLCHAIN_PATH:$PATH
18306        for ac_prog in gmake
18307do
18308  # Extract the first word of "$ac_prog", so it can be a program name with args.
18309set dummy $ac_prog; ac_word=$2
18310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18311$as_echo_n "checking for $ac_word... " >&6; }
18312if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18313  $as_echo_n "(cached) " >&6
18314else
18315  case $CHECK_TOOLSDIR_GMAKE in
18316  [\\/]* | ?:[\\/]*)
18317  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18318  ;;
18319  *)
18320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18321for as_dir in $PATH
18322do
18323  IFS=$as_save_IFS
18324  test -z "$as_dir" && as_dir=.
18325    for ac_exec_ext in '' $ac_executable_extensions; do
18326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18327    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18329    break 2
18330  fi
18331done
18332  done
18333IFS=$as_save_IFS
18334
18335  ;;
18336esac
18337fi
18338CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18339if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18341$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18342else
18343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18344$as_echo "no" >&6; }
18345fi
18346
18347
18348  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18349done
18350
18351
18352  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18353  DESCRIPTION="gmake in tools-dir"
18354
18355  # On Cygwin, we require a newer version of make than on other platforms
18356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18357    MAKE_VERSION_EXPR="-e 4\."
18358    MAKE_REQUIRED_VERSION="4.0"
18359   else
18360    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18361    MAKE_REQUIRED_VERSION="3.81"
18362  fi
18363
18364  if test "x$MAKE_CANDIDATE" != x; then
18365    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18366$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18367    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18368    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18369    if test "x$IS_GNU_MAKE" = x; then
18370      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18371$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18372    else
18373      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18374      if test "x$IS_MODERN_MAKE" = x; then
18375        { $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
18376$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;}
18377      else
18378        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18379          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18380            MAKE_EXPECTED_ENV='cygwin'
18381          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18382            MAKE_EXPECTED_ENV='msys'
18383          else
18384            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18385          fi
18386          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18387          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18388        else
18389          # Not relevant for non-Windows
18390          IS_MAKE_CORRECT_ENV=true
18391        fi
18392        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18393          { $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
18394$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;}
18395        else
18396          FOUND_MAKE=$MAKE_CANDIDATE
18397
18398  # Only process if variable expands to non-empty
18399
18400  if test "x$FOUND_MAKE" != x; then
18401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18402
18403  # First separate the path from the arguments. This will split at the first
18404  # space.
18405  complete="$FOUND_MAKE"
18406  path="${complete%% *}"
18407  tmp="$complete EOL"
18408  arguments="${tmp#* }"
18409
18410  # Input might be given as Windows format, start by converting to
18411  # unix format.
18412  new_path=`$CYGPATH -u "$path"`
18413
18414  # Now try to locate executable using which
18415  new_path=`$WHICH "$new_path" 2> /dev/null`
18416  # bat and cmd files are not always considered executable in cygwin causing which
18417  # to not find them
18418  if test "x$new_path" = x \
18419      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18420      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18421    new_path=`$CYGPATH -u "$path"`
18422  fi
18423  if test "x$new_path" = x; then
18424    # Oops. Which didn't find the executable.
18425    # The splitting of arguments from the executable at a space might have been incorrect,
18426    # since paths with space are more likely in Windows. Give it another try with the whole
18427    # argument.
18428    path="$complete"
18429    arguments="EOL"
18430    new_path=`$CYGPATH -u "$path"`
18431    new_path=`$WHICH "$new_path" 2> /dev/null`
18432    # bat and cmd files are not always considered executable in cygwin causing which
18433    # to not find them
18434    if test "x$new_path" = x \
18435        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18436        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18437      new_path=`$CYGPATH -u "$path"`
18438    fi
18439    if test "x$new_path" = x; then
18440      # It's still not found. Now this is an unrecoverable error.
18441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18442$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18443      has_space=`$ECHO "$complete" | $GREP " "`
18444      if test "x$has_space" != x; then
18445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18447      fi
18448      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18449    fi
18450  fi
18451
18452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18455  # "foo.exe" is OK but "foo" is an error.
18456  #
18457  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18458  # It is also a way to make sure we got the proper file name for the real test later on.
18459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18460  if test "x$test_shortpath" = x; then
18461    # Short path failed, file does not exist as specified.
18462    # Try adding .exe or .cmd
18463    if test -f "${new_path}.exe"; then
18464      input_to_shortpath="${new_path}.exe"
18465    elif test -f "${new_path}.cmd"; then
18466      input_to_shortpath="${new_path}.cmd"
18467    else
18468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18469$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18470      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18471$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18472      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18473    fi
18474  else
18475    input_to_shortpath="$new_path"
18476  fi
18477
18478  # Call helper function which possibly converts this using DOS-style short mode.
18479  # If so, the updated path is stored in $new_path.
18480  new_path="$input_to_shortpath"
18481
18482  input_path="$input_to_shortpath"
18483  # Check if we need to convert this using DOS-style short mode. If the path
18484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18485  # take no chances and rewrite it.
18486  # Note: m4 eats our [], so we need to use [ and ] instead.
18487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18488  if test "x$has_forbidden_chars" != x; then
18489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18493      # Going to short mode and back again did indeed matter. Since short mode is
18494      # case insensitive, let's make it lowercase to improve readability.
18495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18496      # Now convert it back to Unix-style (cygpath)
18497      input_path=`$CYGPATH -u "$shortmode_path"`
18498      new_path="$input_path"
18499    fi
18500  fi
18501
18502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18503  if test "x$test_cygdrive_prefix" = x; then
18504    # As a simple fix, exclude /usr/bin since it's not a real path.
18505    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18507      # a path prefixed by /cygdrive for fixpath to work.
18508      new_path="$CYGWIN_ROOT_PATH$input_path"
18509    fi
18510  fi
18511
18512  # remove trailing .exe if any
18513  new_path="${new_path/%.exe/}"
18514
18515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18516
18517  # First separate the path from the arguments. This will split at the first
18518  # space.
18519  complete="$FOUND_MAKE"
18520  path="${complete%% *}"
18521  tmp="$complete EOL"
18522  arguments="${tmp#* }"
18523
18524  # Input might be given as Windows format, start by converting to
18525  # unix format.
18526  new_path="$path"
18527
18528  windows_path="$new_path"
18529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18530    unix_path=`$CYGPATH -u "$windows_path"`
18531    new_path="$unix_path"
18532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18534    new_path="$unix_path"
18535  fi
18536
18537
18538  # Now try to locate executable using which
18539  new_path=`$WHICH "$new_path" 2> /dev/null`
18540
18541  if test "x$new_path" = x; then
18542    # Oops. Which didn't find the executable.
18543    # The splitting of arguments from the executable at a space might have been incorrect,
18544    # since paths with space are more likely in Windows. Give it another try with the whole
18545    # argument.
18546    path="$complete"
18547    arguments="EOL"
18548    new_path="$path"
18549
18550  windows_path="$new_path"
18551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18552    unix_path=`$CYGPATH -u "$windows_path"`
18553    new_path="$unix_path"
18554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18556    new_path="$unix_path"
18557  fi
18558
18559
18560    new_path=`$WHICH "$new_path" 2> /dev/null`
18561    # bat and cmd files are not always considered executable in MSYS causing which
18562    # to not find them
18563    if test "x$new_path" = x \
18564        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18565        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18566      new_path="$path"
18567
18568  windows_path="$new_path"
18569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18570    unix_path=`$CYGPATH -u "$windows_path"`
18571    new_path="$unix_path"
18572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18574    new_path="$unix_path"
18575  fi
18576
18577    fi
18578
18579    if test "x$new_path" = x; then
18580      # It's still not found. Now this is an unrecoverable error.
18581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18582$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18583      has_space=`$ECHO "$complete" | $GREP " "`
18584      if test "x$has_space" != x; then
18585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18587      fi
18588      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18589    fi
18590  fi
18591
18592  # Now new_path has a complete unix path to the binary
18593  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18594    # Keep paths in /bin as-is, but remove trailing .exe if any
18595    new_path="${new_path/%.exe/}"
18596    # Do not save /bin paths to all_fixpath_prefixes!
18597  else
18598    # Not in mixed or Windows style, start by that.
18599    new_path=`cmd //c echo $new_path`
18600
18601  input_path="$new_path"
18602  # Check if we need to convert this using DOS-style short mode. If the path
18603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18604  # take no chances and rewrite it.
18605  # Note: m4 eats our [], so we need to use [ and ] instead.
18606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18607  if test "x$has_forbidden_chars" != x; then
18608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18610  fi
18611
18612    # Output is in $new_path
18613
18614  windows_path="$new_path"
18615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18616    unix_path=`$CYGPATH -u "$windows_path"`
18617    new_path="$unix_path"
18618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18620    new_path="$unix_path"
18621  fi
18622
18623    # remove trailing .exe if any
18624    new_path="${new_path/%.exe/}"
18625
18626    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18627    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18628  fi
18629
18630    else
18631      # We're on a unix platform. Hooray! :)
18632      # First separate the path from the arguments. This will split at the first
18633      # space.
18634      complete="$FOUND_MAKE"
18635      path="${complete%% *}"
18636      tmp="$complete EOL"
18637      arguments="${tmp#* }"
18638
18639      # Cannot rely on the command "which" here since it doesn't always work.
18640      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18641      if test -z "$is_absolute_path"; then
18642        # Path to executable is not absolute. Find it.
18643        IFS_save="$IFS"
18644        IFS=:
18645        for p in $PATH; do
18646          if test -f "$p/$path" && test -x "$p/$path"; then
18647            new_path="$p/$path"
18648            break
18649          fi
18650        done
18651        IFS="$IFS_save"
18652      else
18653        # This is an absolute path, we can use it without further modifications.
18654        new_path="$path"
18655      fi
18656
18657      if test "x$new_path" = x; then
18658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18659$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18660        has_space=`$ECHO "$complete" | $GREP " "`
18661        if test "x$has_space" != x; then
18662          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18663$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18664        fi
18665        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18666      fi
18667    fi
18668
18669    # Now join together the path and the arguments once again
18670    if test "x$arguments" != xEOL; then
18671      new_complete="$new_path ${arguments% *}"
18672    else
18673      new_complete="$new_path"
18674    fi
18675
18676    if test "x$complete" != "x$new_complete"; then
18677      FOUND_MAKE="$new_complete"
18678      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18679$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18680    fi
18681  fi
18682
18683        fi
18684      fi
18685    fi
18686  fi
18687
18688        if test "x$FOUND_MAKE" = x; then
18689          for ac_prog in make
18690do
18691  # Extract the first word of "$ac_prog", so it can be a program name with args.
18692set dummy $ac_prog; ac_word=$2
18693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18694$as_echo_n "checking for $ac_word... " >&6; }
18695if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18696  $as_echo_n "(cached) " >&6
18697else
18698  case $CHECK_TOOLSDIR_MAKE in
18699  [\\/]* | ?:[\\/]*)
18700  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18701  ;;
18702  *)
18703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18704for as_dir in $PATH
18705do
18706  IFS=$as_save_IFS
18707  test -z "$as_dir" && as_dir=.
18708    for ac_exec_ext in '' $ac_executable_extensions; do
18709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18710    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18712    break 2
18713  fi
18714done
18715  done
18716IFS=$as_save_IFS
18717
18718  ;;
18719esac
18720fi
18721CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18722if test -n "$CHECK_TOOLSDIR_MAKE"; then
18723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18724$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18725else
18726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18727$as_echo "no" >&6; }
18728fi
18729
18730
18731  test -n "$CHECK_TOOLSDIR_MAKE" && break
18732done
18733
18734
18735  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18736  DESCRIPTION="make in tools-dir"
18737
18738  # On Cygwin, we require a newer version of make than on other platforms
18739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18740    MAKE_VERSION_EXPR="-e 4\."
18741    MAKE_REQUIRED_VERSION="4.0"
18742   else
18743    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18744    MAKE_REQUIRED_VERSION="3.81"
18745  fi
18746
18747  if test "x$MAKE_CANDIDATE" != x; then
18748    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18749$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18750    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18751    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18752    if test "x$IS_GNU_MAKE" = x; then
18753      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18754$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18755    else
18756      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18757      if test "x$IS_MODERN_MAKE" = x; then
18758        { $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
18759$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;}
18760      else
18761        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18762          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18763            MAKE_EXPECTED_ENV='cygwin'
18764          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18765            MAKE_EXPECTED_ENV='msys'
18766          else
18767            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18768          fi
18769          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18770          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18771        else
18772          # Not relevant for non-Windows
18773          IS_MAKE_CORRECT_ENV=true
18774        fi
18775        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18776          { $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
18777$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;}
18778        else
18779          FOUND_MAKE=$MAKE_CANDIDATE
18780
18781  # Only process if variable expands to non-empty
18782
18783  if test "x$FOUND_MAKE" != x; then
18784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18785
18786  # First separate the path from the arguments. This will split at the first
18787  # space.
18788  complete="$FOUND_MAKE"
18789  path="${complete%% *}"
18790  tmp="$complete EOL"
18791  arguments="${tmp#* }"
18792
18793  # Input might be given as Windows format, start by converting to
18794  # unix format.
18795  new_path=`$CYGPATH -u "$path"`
18796
18797  # Now try to locate executable using which
18798  new_path=`$WHICH "$new_path" 2> /dev/null`
18799  # bat and cmd files are not always considered executable in cygwin causing which
18800  # to not find them
18801  if test "x$new_path" = x \
18802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18804    new_path=`$CYGPATH -u "$path"`
18805  fi
18806  if test "x$new_path" = x; then
18807    # Oops. Which didn't find the executable.
18808    # The splitting of arguments from the executable at a space might have been incorrect,
18809    # since paths with space are more likely in Windows. Give it another try with the whole
18810    # argument.
18811    path="$complete"
18812    arguments="EOL"
18813    new_path=`$CYGPATH -u "$path"`
18814    new_path=`$WHICH "$new_path" 2> /dev/null`
18815    # bat and cmd files are not always considered executable in cygwin causing which
18816    # to not find them
18817    if test "x$new_path" = x \
18818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18820      new_path=`$CYGPATH -u "$path"`
18821    fi
18822    if test "x$new_path" = x; then
18823      # It's still not found. Now this is an unrecoverable error.
18824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18825$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18826      has_space=`$ECHO "$complete" | $GREP " "`
18827      if test "x$has_space" != x; then
18828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18830      fi
18831      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18832    fi
18833  fi
18834
18835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18838  # "foo.exe" is OK but "foo" is an error.
18839  #
18840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18841  # It is also a way to make sure we got the proper file name for the real test later on.
18842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18843  if test "x$test_shortpath" = x; then
18844    # Short path failed, file does not exist as specified.
18845    # Try adding .exe or .cmd
18846    if test -f "${new_path}.exe"; then
18847      input_to_shortpath="${new_path}.exe"
18848    elif test -f "${new_path}.cmd"; then
18849      input_to_shortpath="${new_path}.cmd"
18850    else
18851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18852$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18855      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18856    fi
18857  else
18858    input_to_shortpath="$new_path"
18859  fi
18860
18861  # Call helper function which possibly converts this using DOS-style short mode.
18862  # If so, the updated path is stored in $new_path.
18863  new_path="$input_to_shortpath"
18864
18865  input_path="$input_to_shortpath"
18866  # Check if we need to convert this using DOS-style short mode. If the path
18867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18868  # take no chances and rewrite it.
18869  # Note: m4 eats our [], so we need to use [ and ] instead.
18870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18871  if test "x$has_forbidden_chars" != x; then
18872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18876      # Going to short mode and back again did indeed matter. Since short mode is
18877      # case insensitive, let's make it lowercase to improve readability.
18878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18879      # Now convert it back to Unix-style (cygpath)
18880      input_path=`$CYGPATH -u "$shortmode_path"`
18881      new_path="$input_path"
18882    fi
18883  fi
18884
18885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18886  if test "x$test_cygdrive_prefix" = x; then
18887    # As a simple fix, exclude /usr/bin since it's not a real path.
18888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18890      # a path prefixed by /cygdrive for fixpath to work.
18891      new_path="$CYGWIN_ROOT_PATH$input_path"
18892    fi
18893  fi
18894
18895  # remove trailing .exe if any
18896  new_path="${new_path/%.exe/}"
18897
18898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18899
18900  # First separate the path from the arguments. This will split at the first
18901  # space.
18902  complete="$FOUND_MAKE"
18903  path="${complete%% *}"
18904  tmp="$complete EOL"
18905  arguments="${tmp#* }"
18906
18907  # Input might be given as Windows format, start by converting to
18908  # unix format.
18909  new_path="$path"
18910
18911  windows_path="$new_path"
18912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18913    unix_path=`$CYGPATH -u "$windows_path"`
18914    new_path="$unix_path"
18915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18917    new_path="$unix_path"
18918  fi
18919
18920
18921  # Now try to locate executable using which
18922  new_path=`$WHICH "$new_path" 2> /dev/null`
18923
18924  if test "x$new_path" = x; then
18925    # Oops. Which didn't find the executable.
18926    # The splitting of arguments from the executable at a space might have been incorrect,
18927    # since paths with space are more likely in Windows. Give it another try with the whole
18928    # argument.
18929    path="$complete"
18930    arguments="EOL"
18931    new_path="$path"
18932
18933  windows_path="$new_path"
18934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18935    unix_path=`$CYGPATH -u "$windows_path"`
18936    new_path="$unix_path"
18937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18939    new_path="$unix_path"
18940  fi
18941
18942
18943    new_path=`$WHICH "$new_path" 2> /dev/null`
18944    # bat and cmd files are not always considered executable in MSYS causing which
18945    # to not find them
18946    if test "x$new_path" = x \
18947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18949      new_path="$path"
18950
18951  windows_path="$new_path"
18952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18953    unix_path=`$CYGPATH -u "$windows_path"`
18954    new_path="$unix_path"
18955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18957    new_path="$unix_path"
18958  fi
18959
18960    fi
18961
18962    if test "x$new_path" = x; then
18963      # It's still not found. Now this is an unrecoverable error.
18964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18965$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18966      has_space=`$ECHO "$complete" | $GREP " "`
18967      if test "x$has_space" != x; then
18968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18970      fi
18971      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18972    fi
18973  fi
18974
18975  # Now new_path has a complete unix path to the binary
18976  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18977    # Keep paths in /bin as-is, but remove trailing .exe if any
18978    new_path="${new_path/%.exe/}"
18979    # Do not save /bin paths to all_fixpath_prefixes!
18980  else
18981    # Not in mixed or Windows style, start by that.
18982    new_path=`cmd //c echo $new_path`
18983
18984  input_path="$new_path"
18985  # Check if we need to convert this using DOS-style short mode. If the path
18986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18987  # take no chances and rewrite it.
18988  # Note: m4 eats our [], so we need to use [ and ] instead.
18989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18990  if test "x$has_forbidden_chars" != x; then
18991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18993  fi
18994
18995    # Output is in $new_path
18996
18997  windows_path="$new_path"
18998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18999    unix_path=`$CYGPATH -u "$windows_path"`
19000    new_path="$unix_path"
19001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19003    new_path="$unix_path"
19004  fi
19005
19006    # remove trailing .exe if any
19007    new_path="${new_path/%.exe/}"
19008
19009    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19010    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19011  fi
19012
19013    else
19014      # We're on a unix platform. Hooray! :)
19015      # First separate the path from the arguments. This will split at the first
19016      # space.
19017      complete="$FOUND_MAKE"
19018      path="${complete%% *}"
19019      tmp="$complete EOL"
19020      arguments="${tmp#* }"
19021
19022      # Cannot rely on the command "which" here since it doesn't always work.
19023      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19024      if test -z "$is_absolute_path"; then
19025        # Path to executable is not absolute. Find it.
19026        IFS_save="$IFS"
19027        IFS=:
19028        for p in $PATH; do
19029          if test -f "$p/$path" && test -x "$p/$path"; then
19030            new_path="$p/$path"
19031            break
19032          fi
19033        done
19034        IFS="$IFS_save"
19035      else
19036        # This is an absolute path, we can use it without further modifications.
19037        new_path="$path"
19038      fi
19039
19040      if test "x$new_path" = x; then
19041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19042$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19043        has_space=`$ECHO "$complete" | $GREP " "`
19044        if test "x$has_space" != x; then
19045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19047        fi
19048        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19049      fi
19050    fi
19051
19052    # Now join together the path and the arguments once again
19053    if test "x$arguments" != xEOL; then
19054      new_complete="$new_path ${arguments% *}"
19055    else
19056      new_complete="$new_path"
19057    fi
19058
19059    if test "x$complete" != "x$new_complete"; then
19060      FOUND_MAKE="$new_complete"
19061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19062$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19063    fi
19064  fi
19065
19066        fi
19067      fi
19068    fi
19069  fi
19070
19071        fi
19072        PATH=$OLD_PATH
19073      fi
19074    fi
19075
19076    if test "x$FOUND_MAKE" = x; then
19077      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
19078    fi
19079
19080  else
19081    # The variable is set, but is it from the command line or the environment?
19082
19083    # Try to remove the string !MAKE! from our list.
19084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19086      # If it failed, the variable was not from the command line. Ignore it,
19087      # but warn the user (except for BASH, which is always set by the calling BASH).
19088      if test "xMAKE" != xBASH; then
19089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19090$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19091      fi
19092      # Try to locate tool using the code snippet
19093
19094    # Try our hardest to locate a correct version of GNU make
19095    for ac_prog in gmake
19096do
19097  # Extract the first word of "$ac_prog", so it can be a program name with args.
19098set dummy $ac_prog; ac_word=$2
19099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19100$as_echo_n "checking for $ac_word... " >&6; }
19101if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19102  $as_echo_n "(cached) " >&6
19103else
19104  case $CHECK_GMAKE in
19105  [\\/]* | ?:[\\/]*)
19106  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19107  ;;
19108  *)
19109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19110for as_dir in $PATH
19111do
19112  IFS=$as_save_IFS
19113  test -z "$as_dir" && as_dir=.
19114    for ac_exec_ext in '' $ac_executable_extensions; do
19115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19116    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19118    break 2
19119  fi
19120done
19121  done
19122IFS=$as_save_IFS
19123
19124  ;;
19125esac
19126fi
19127CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19128if test -n "$CHECK_GMAKE"; then
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19130$as_echo "$CHECK_GMAKE" >&6; }
19131else
19132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19133$as_echo "no" >&6; }
19134fi
19135
19136
19137  test -n "$CHECK_GMAKE" && break
19138done
19139
19140
19141  MAKE_CANDIDATE=""$CHECK_GMAKE""
19142  DESCRIPTION="gmake in PATH"
19143
19144  # On Cygwin, we require a newer version of make than on other platforms
19145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19146    MAKE_VERSION_EXPR="-e 4\."
19147    MAKE_REQUIRED_VERSION="4.0"
19148   else
19149    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19150    MAKE_REQUIRED_VERSION="3.81"
19151  fi
19152
19153  if test "x$MAKE_CANDIDATE" != x; then
19154    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19155$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19156    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19157    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19158    if test "x$IS_GNU_MAKE" = x; then
19159      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19160$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19161    else
19162      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19163      if test "x$IS_MODERN_MAKE" = x; then
19164        { $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
19165$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;}
19166      else
19167        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19168          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19169            MAKE_EXPECTED_ENV='cygwin'
19170          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19171            MAKE_EXPECTED_ENV='msys'
19172          else
19173            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19174          fi
19175          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19176          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19177        else
19178          # Not relevant for non-Windows
19179          IS_MAKE_CORRECT_ENV=true
19180        fi
19181        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19182          { $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
19183$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;}
19184        else
19185          FOUND_MAKE=$MAKE_CANDIDATE
19186
19187  # Only process if variable expands to non-empty
19188
19189  if test "x$FOUND_MAKE" != x; then
19190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19191
19192  # First separate the path from the arguments. This will split at the first
19193  # space.
19194  complete="$FOUND_MAKE"
19195  path="${complete%% *}"
19196  tmp="$complete EOL"
19197  arguments="${tmp#* }"
19198
19199  # Input might be given as Windows format, start by converting to
19200  # unix format.
19201  new_path=`$CYGPATH -u "$path"`
19202
19203  # Now try to locate executable using which
19204  new_path=`$WHICH "$new_path" 2> /dev/null`
19205  # bat and cmd files are not always considered executable in cygwin causing which
19206  # to not find them
19207  if test "x$new_path" = x \
19208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19210    new_path=`$CYGPATH -u "$path"`
19211  fi
19212  if test "x$new_path" = x; then
19213    # Oops. Which didn't find the executable.
19214    # The splitting of arguments from the executable at a space might have been incorrect,
19215    # since paths with space are more likely in Windows. Give it another try with the whole
19216    # argument.
19217    path="$complete"
19218    arguments="EOL"
19219    new_path=`$CYGPATH -u "$path"`
19220    new_path=`$WHICH "$new_path" 2> /dev/null`
19221    # bat and cmd files are not always considered executable in cygwin causing which
19222    # to not find them
19223    if test "x$new_path" = x \
19224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19226      new_path=`$CYGPATH -u "$path"`
19227    fi
19228    if test "x$new_path" = x; then
19229      # It's still not found. Now this is an unrecoverable error.
19230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19231$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19232      has_space=`$ECHO "$complete" | $GREP " "`
19233      if test "x$has_space" != x; then
19234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19236      fi
19237      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19238    fi
19239  fi
19240
19241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19244  # "foo.exe" is OK but "foo" is an error.
19245  #
19246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19247  # It is also a way to make sure we got the proper file name for the real test later on.
19248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19249  if test "x$test_shortpath" = x; then
19250    # Short path failed, file does not exist as specified.
19251    # Try adding .exe or .cmd
19252    if test -f "${new_path}.exe"; then
19253      input_to_shortpath="${new_path}.exe"
19254    elif test -f "${new_path}.cmd"; then
19255      input_to_shortpath="${new_path}.cmd"
19256    else
19257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19258$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19261      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19262    fi
19263  else
19264    input_to_shortpath="$new_path"
19265  fi
19266
19267  # Call helper function which possibly converts this using DOS-style short mode.
19268  # If so, the updated path is stored in $new_path.
19269  new_path="$input_to_shortpath"
19270
19271  input_path="$input_to_shortpath"
19272  # Check if we need to convert this using DOS-style short mode. If the path
19273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19274  # take no chances and rewrite it.
19275  # Note: m4 eats our [], so we need to use [ and ] instead.
19276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19277  if test "x$has_forbidden_chars" != x; then
19278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19282      # Going to short mode and back again did indeed matter. Since short mode is
19283      # case insensitive, let's make it lowercase to improve readability.
19284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19285      # Now convert it back to Unix-style (cygpath)
19286      input_path=`$CYGPATH -u "$shortmode_path"`
19287      new_path="$input_path"
19288    fi
19289  fi
19290
19291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19292  if test "x$test_cygdrive_prefix" = x; then
19293    # As a simple fix, exclude /usr/bin since it's not a real path.
19294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19296      # a path prefixed by /cygdrive for fixpath to work.
19297      new_path="$CYGWIN_ROOT_PATH$input_path"
19298    fi
19299  fi
19300
19301  # remove trailing .exe if any
19302  new_path="${new_path/%.exe/}"
19303
19304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19305
19306  # First separate the path from the arguments. This will split at the first
19307  # space.
19308  complete="$FOUND_MAKE"
19309  path="${complete%% *}"
19310  tmp="$complete EOL"
19311  arguments="${tmp#* }"
19312
19313  # Input might be given as Windows format, start by converting to
19314  # unix format.
19315  new_path="$path"
19316
19317  windows_path="$new_path"
19318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19319    unix_path=`$CYGPATH -u "$windows_path"`
19320    new_path="$unix_path"
19321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19323    new_path="$unix_path"
19324  fi
19325
19326
19327  # Now try to locate executable using which
19328  new_path=`$WHICH "$new_path" 2> /dev/null`
19329
19330  if test "x$new_path" = x; then
19331    # Oops. Which didn't find the executable.
19332    # The splitting of arguments from the executable at a space might have been incorrect,
19333    # since paths with space are more likely in Windows. Give it another try with the whole
19334    # argument.
19335    path="$complete"
19336    arguments="EOL"
19337    new_path="$path"
19338
19339  windows_path="$new_path"
19340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19341    unix_path=`$CYGPATH -u "$windows_path"`
19342    new_path="$unix_path"
19343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19345    new_path="$unix_path"
19346  fi
19347
19348
19349    new_path=`$WHICH "$new_path" 2> /dev/null`
19350    # bat and cmd files are not always considered executable in MSYS causing which
19351    # to not find them
19352    if test "x$new_path" = x \
19353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19355      new_path="$path"
19356
19357  windows_path="$new_path"
19358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19359    unix_path=`$CYGPATH -u "$windows_path"`
19360    new_path="$unix_path"
19361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19363    new_path="$unix_path"
19364  fi
19365
19366    fi
19367
19368    if test "x$new_path" = x; then
19369      # It's still not found. Now this is an unrecoverable error.
19370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19371$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19372      has_space=`$ECHO "$complete" | $GREP " "`
19373      if test "x$has_space" != x; then
19374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19376      fi
19377      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19378    fi
19379  fi
19380
19381  # Now new_path has a complete unix path to the binary
19382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19383    # Keep paths in /bin as-is, but remove trailing .exe if any
19384    new_path="${new_path/%.exe/}"
19385    # Do not save /bin paths to all_fixpath_prefixes!
19386  else
19387    # Not in mixed or Windows style, start by that.
19388    new_path=`cmd //c echo $new_path`
19389
19390  input_path="$new_path"
19391  # Check if we need to convert this using DOS-style short mode. If the path
19392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19393  # take no chances and rewrite it.
19394  # Note: m4 eats our [], so we need to use [ and ] instead.
19395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19396  if test "x$has_forbidden_chars" != x; then
19397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19399  fi
19400
19401    # Output is in $new_path
19402
19403  windows_path="$new_path"
19404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19405    unix_path=`$CYGPATH -u "$windows_path"`
19406    new_path="$unix_path"
19407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19409    new_path="$unix_path"
19410  fi
19411
19412    # remove trailing .exe if any
19413    new_path="${new_path/%.exe/}"
19414
19415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19417  fi
19418
19419    else
19420      # We're on a unix platform. Hooray! :)
19421      # First separate the path from the arguments. This will split at the first
19422      # space.
19423      complete="$FOUND_MAKE"
19424      path="${complete%% *}"
19425      tmp="$complete EOL"
19426      arguments="${tmp#* }"
19427
19428      # Cannot rely on the command "which" here since it doesn't always work.
19429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19430      if test -z "$is_absolute_path"; then
19431        # Path to executable is not absolute. Find it.
19432        IFS_save="$IFS"
19433        IFS=:
19434        for p in $PATH; do
19435          if test -f "$p/$path" && test -x "$p/$path"; then
19436            new_path="$p/$path"
19437            break
19438          fi
19439        done
19440        IFS="$IFS_save"
19441      else
19442        # This is an absolute path, we can use it without further modifications.
19443        new_path="$path"
19444      fi
19445
19446      if test "x$new_path" = x; then
19447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19448$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19449        has_space=`$ECHO "$complete" | $GREP " "`
19450        if test "x$has_space" != x; then
19451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19453        fi
19454        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19455      fi
19456    fi
19457
19458    # Now join together the path and the arguments once again
19459    if test "x$arguments" != xEOL; then
19460      new_complete="$new_path ${arguments% *}"
19461    else
19462      new_complete="$new_path"
19463    fi
19464
19465    if test "x$complete" != "x$new_complete"; then
19466      FOUND_MAKE="$new_complete"
19467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19468$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19469    fi
19470  fi
19471
19472        fi
19473      fi
19474    fi
19475  fi
19476
19477
19478    if test "x$FOUND_MAKE" = x; then
19479      for ac_prog in make
19480do
19481  # Extract the first word of "$ac_prog", so it can be a program name with args.
19482set dummy $ac_prog; ac_word=$2
19483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19484$as_echo_n "checking for $ac_word... " >&6; }
19485if ${ac_cv_path_CHECK_MAKE+:} false; then :
19486  $as_echo_n "(cached) " >&6
19487else
19488  case $CHECK_MAKE in
19489  [\\/]* | ?:[\\/]*)
19490  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19491  ;;
19492  *)
19493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19494for as_dir in $PATH
19495do
19496  IFS=$as_save_IFS
19497  test -z "$as_dir" && as_dir=.
19498    for ac_exec_ext in '' $ac_executable_extensions; do
19499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19500    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19502    break 2
19503  fi
19504done
19505  done
19506IFS=$as_save_IFS
19507
19508  ;;
19509esac
19510fi
19511CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19512if test -n "$CHECK_MAKE"; then
19513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19514$as_echo "$CHECK_MAKE" >&6; }
19515else
19516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19517$as_echo "no" >&6; }
19518fi
19519
19520
19521  test -n "$CHECK_MAKE" && break
19522done
19523
19524
19525  MAKE_CANDIDATE=""$CHECK_MAKE""
19526  DESCRIPTION="make in PATH"
19527
19528  # On Cygwin, we require a newer version of make than on other platforms
19529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19530    MAKE_VERSION_EXPR="-e 4\."
19531    MAKE_REQUIRED_VERSION="4.0"
19532   else
19533    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19534    MAKE_REQUIRED_VERSION="3.81"
19535  fi
19536
19537  if test "x$MAKE_CANDIDATE" != x; then
19538    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19539$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19540    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19541    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19542    if test "x$IS_GNU_MAKE" = x; then
19543      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19544$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19545    else
19546      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19547      if test "x$IS_MODERN_MAKE" = x; then
19548        { $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
19549$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;}
19550      else
19551        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19552          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19553            MAKE_EXPECTED_ENV='cygwin'
19554          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19555            MAKE_EXPECTED_ENV='msys'
19556          else
19557            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19558          fi
19559          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19560          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19561        else
19562          # Not relevant for non-Windows
19563          IS_MAKE_CORRECT_ENV=true
19564        fi
19565        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19566          { $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
19567$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;}
19568        else
19569          FOUND_MAKE=$MAKE_CANDIDATE
19570
19571  # Only process if variable expands to non-empty
19572
19573  if test "x$FOUND_MAKE" != x; then
19574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19575
19576  # First separate the path from the arguments. This will split at the first
19577  # space.
19578  complete="$FOUND_MAKE"
19579  path="${complete%% *}"
19580  tmp="$complete EOL"
19581  arguments="${tmp#* }"
19582
19583  # Input might be given as Windows format, start by converting to
19584  # unix format.
19585  new_path=`$CYGPATH -u "$path"`
19586
19587  # Now try to locate executable using which
19588  new_path=`$WHICH "$new_path" 2> /dev/null`
19589  # bat and cmd files are not always considered executable in cygwin causing which
19590  # to not find them
19591  if test "x$new_path" = x \
19592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19594    new_path=`$CYGPATH -u "$path"`
19595  fi
19596  if test "x$new_path" = x; then
19597    # Oops. Which didn't find the executable.
19598    # The splitting of arguments from the executable at a space might have been incorrect,
19599    # since paths with space are more likely in Windows. Give it another try with the whole
19600    # argument.
19601    path="$complete"
19602    arguments="EOL"
19603    new_path=`$CYGPATH -u "$path"`
19604    new_path=`$WHICH "$new_path" 2> /dev/null`
19605    # bat and cmd files are not always considered executable in cygwin causing which
19606    # to not find them
19607    if test "x$new_path" = x \
19608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19610      new_path=`$CYGPATH -u "$path"`
19611    fi
19612    if test "x$new_path" = x; then
19613      # It's still not found. Now this is an unrecoverable error.
19614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19615$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19616      has_space=`$ECHO "$complete" | $GREP " "`
19617      if test "x$has_space" != x; then
19618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19620      fi
19621      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19622    fi
19623  fi
19624
19625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19628  # "foo.exe" is OK but "foo" is an error.
19629  #
19630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19631  # It is also a way to make sure we got the proper file name for the real test later on.
19632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19633  if test "x$test_shortpath" = x; then
19634    # Short path failed, file does not exist as specified.
19635    # Try adding .exe or .cmd
19636    if test -f "${new_path}.exe"; then
19637      input_to_shortpath="${new_path}.exe"
19638    elif test -f "${new_path}.cmd"; then
19639      input_to_shortpath="${new_path}.cmd"
19640    else
19641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19642$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19645      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19646    fi
19647  else
19648    input_to_shortpath="$new_path"
19649  fi
19650
19651  # Call helper function which possibly converts this using DOS-style short mode.
19652  # If so, the updated path is stored in $new_path.
19653  new_path="$input_to_shortpath"
19654
19655  input_path="$input_to_shortpath"
19656  # Check if we need to convert this using DOS-style short mode. If the path
19657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19658  # take no chances and rewrite it.
19659  # Note: m4 eats our [], so we need to use [ and ] instead.
19660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19661  if test "x$has_forbidden_chars" != x; then
19662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19666      # Going to short mode and back again did indeed matter. Since short mode is
19667      # case insensitive, let's make it lowercase to improve readability.
19668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19669      # Now convert it back to Unix-style (cygpath)
19670      input_path=`$CYGPATH -u "$shortmode_path"`
19671      new_path="$input_path"
19672    fi
19673  fi
19674
19675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19676  if test "x$test_cygdrive_prefix" = x; then
19677    # As a simple fix, exclude /usr/bin since it's not a real path.
19678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19680      # a path prefixed by /cygdrive for fixpath to work.
19681      new_path="$CYGWIN_ROOT_PATH$input_path"
19682    fi
19683  fi
19684
19685  # remove trailing .exe if any
19686  new_path="${new_path/%.exe/}"
19687
19688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19689
19690  # First separate the path from the arguments. This will split at the first
19691  # space.
19692  complete="$FOUND_MAKE"
19693  path="${complete%% *}"
19694  tmp="$complete EOL"
19695  arguments="${tmp#* }"
19696
19697  # Input might be given as Windows format, start by converting to
19698  # unix format.
19699  new_path="$path"
19700
19701  windows_path="$new_path"
19702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19703    unix_path=`$CYGPATH -u "$windows_path"`
19704    new_path="$unix_path"
19705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19707    new_path="$unix_path"
19708  fi
19709
19710
19711  # Now try to locate executable using which
19712  new_path=`$WHICH "$new_path" 2> /dev/null`
19713
19714  if test "x$new_path" = x; then
19715    # Oops. Which didn't find the executable.
19716    # The splitting of arguments from the executable at a space might have been incorrect,
19717    # since paths with space are more likely in Windows. Give it another try with the whole
19718    # argument.
19719    path="$complete"
19720    arguments="EOL"
19721    new_path="$path"
19722
19723  windows_path="$new_path"
19724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19725    unix_path=`$CYGPATH -u "$windows_path"`
19726    new_path="$unix_path"
19727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19729    new_path="$unix_path"
19730  fi
19731
19732
19733    new_path=`$WHICH "$new_path" 2> /dev/null`
19734    # bat and cmd files are not always considered executable in MSYS causing which
19735    # to not find them
19736    if test "x$new_path" = x \
19737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19739      new_path="$path"
19740
19741  windows_path="$new_path"
19742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19743    unix_path=`$CYGPATH -u "$windows_path"`
19744    new_path="$unix_path"
19745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19747    new_path="$unix_path"
19748  fi
19749
19750    fi
19751
19752    if test "x$new_path" = x; then
19753      # It's still not found. Now this is an unrecoverable error.
19754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19755$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19756      has_space=`$ECHO "$complete" | $GREP " "`
19757      if test "x$has_space" != x; then
19758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19760      fi
19761      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19762    fi
19763  fi
19764
19765  # Now new_path has a complete unix path to the binary
19766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19767    # Keep paths in /bin as-is, but remove trailing .exe if any
19768    new_path="${new_path/%.exe/}"
19769    # Do not save /bin paths to all_fixpath_prefixes!
19770  else
19771    # Not in mixed or Windows style, start by that.
19772    new_path=`cmd //c echo $new_path`
19773
19774  input_path="$new_path"
19775  # Check if we need to convert this using DOS-style short mode. If the path
19776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19777  # take no chances and rewrite it.
19778  # Note: m4 eats our [], so we need to use [ and ] instead.
19779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19780  if test "x$has_forbidden_chars" != x; then
19781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19783  fi
19784
19785    # Output is in $new_path
19786
19787  windows_path="$new_path"
19788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19789    unix_path=`$CYGPATH -u "$windows_path"`
19790    new_path="$unix_path"
19791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19793    new_path="$unix_path"
19794  fi
19795
19796    # remove trailing .exe if any
19797    new_path="${new_path/%.exe/}"
19798
19799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19801  fi
19802
19803    else
19804      # We're on a unix platform. Hooray! :)
19805      # First separate the path from the arguments. This will split at the first
19806      # space.
19807      complete="$FOUND_MAKE"
19808      path="${complete%% *}"
19809      tmp="$complete EOL"
19810      arguments="${tmp#* }"
19811
19812      # Cannot rely on the command "which" here since it doesn't always work.
19813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19814      if test -z "$is_absolute_path"; then
19815        # Path to executable is not absolute. Find it.
19816        IFS_save="$IFS"
19817        IFS=:
19818        for p in $PATH; do
19819          if test -f "$p/$path" && test -x "$p/$path"; then
19820            new_path="$p/$path"
19821            break
19822          fi
19823        done
19824        IFS="$IFS_save"
19825      else
19826        # This is an absolute path, we can use it without further modifications.
19827        new_path="$path"
19828      fi
19829
19830      if test "x$new_path" = x; then
19831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19832$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19833        has_space=`$ECHO "$complete" | $GREP " "`
19834        if test "x$has_space" != x; then
19835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19837        fi
19838        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19839      fi
19840    fi
19841
19842    # Now join together the path and the arguments once again
19843    if test "x$arguments" != xEOL; then
19844      new_complete="$new_path ${arguments% *}"
19845    else
19846      new_complete="$new_path"
19847    fi
19848
19849    if test "x$complete" != "x$new_complete"; then
19850      FOUND_MAKE="$new_complete"
19851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19852$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19853    fi
19854  fi
19855
19856        fi
19857      fi
19858    fi
19859  fi
19860
19861    fi
19862
19863    if test "x$FOUND_MAKE" = x; then
19864      if test "x$TOOLCHAIN_PATH" != x; then
19865        # We have a toolchain path, check that as well before giving up.
19866        OLD_PATH=$PATH
19867        PATH=$TOOLCHAIN_PATH:$PATH
19868        for ac_prog in gmake
19869do
19870  # Extract the first word of "$ac_prog", so it can be a program name with args.
19871set dummy $ac_prog; ac_word=$2
19872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19873$as_echo_n "checking for $ac_word... " >&6; }
19874if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19875  $as_echo_n "(cached) " >&6
19876else
19877  case $CHECK_TOOLSDIR_GMAKE in
19878  [\\/]* | ?:[\\/]*)
19879  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19880  ;;
19881  *)
19882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19883for as_dir in $PATH
19884do
19885  IFS=$as_save_IFS
19886  test -z "$as_dir" && as_dir=.
19887    for ac_exec_ext in '' $ac_executable_extensions; do
19888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19889    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19891    break 2
19892  fi
19893done
19894  done
19895IFS=$as_save_IFS
19896
19897  ;;
19898esac
19899fi
19900CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19901if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19903$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19904else
19905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19906$as_echo "no" >&6; }
19907fi
19908
19909
19910  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19911done
19912
19913
19914  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19915  DESCRIPTION="gmake in tools-dir"
19916
19917  # On Cygwin, we require a newer version of make than on other platforms
19918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19919    MAKE_VERSION_EXPR="-e 4\."
19920    MAKE_REQUIRED_VERSION="4.0"
19921   else
19922    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19923    MAKE_REQUIRED_VERSION="3.81"
19924  fi
19925
19926  if test "x$MAKE_CANDIDATE" != x; then
19927    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19928$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19929    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19930    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19931    if test "x$IS_GNU_MAKE" = x; then
19932      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19933$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19934    else
19935      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19936      if test "x$IS_MODERN_MAKE" = x; then
19937        { $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
19938$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;}
19939      else
19940        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19941          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19942            MAKE_EXPECTED_ENV='cygwin'
19943          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19944            MAKE_EXPECTED_ENV='msys'
19945          else
19946            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19947          fi
19948          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19949          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19950        else
19951          # Not relevant for non-Windows
19952          IS_MAKE_CORRECT_ENV=true
19953        fi
19954        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19955          { $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
19956$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;}
19957        else
19958          FOUND_MAKE=$MAKE_CANDIDATE
19959
19960  # Only process if variable expands to non-empty
19961
19962  if test "x$FOUND_MAKE" != x; then
19963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19964
19965  # First separate the path from the arguments. This will split at the first
19966  # space.
19967  complete="$FOUND_MAKE"
19968  path="${complete%% *}"
19969  tmp="$complete EOL"
19970  arguments="${tmp#* }"
19971
19972  # Input might be given as Windows format, start by converting to
19973  # unix format.
19974  new_path=`$CYGPATH -u "$path"`
19975
19976  # Now try to locate executable using which
19977  new_path=`$WHICH "$new_path" 2> /dev/null`
19978  # bat and cmd files are not always considered executable in cygwin causing which
19979  # to not find them
19980  if test "x$new_path" = x \
19981      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19982      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19983    new_path=`$CYGPATH -u "$path"`
19984  fi
19985  if test "x$new_path" = x; then
19986    # Oops. Which didn't find the executable.
19987    # The splitting of arguments from the executable at a space might have been incorrect,
19988    # since paths with space are more likely in Windows. Give it another try with the whole
19989    # argument.
19990    path="$complete"
19991    arguments="EOL"
19992    new_path=`$CYGPATH -u "$path"`
19993    new_path=`$WHICH "$new_path" 2> /dev/null`
19994    # bat and cmd files are not always considered executable in cygwin causing which
19995    # to not find them
19996    if test "x$new_path" = x \
19997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19999      new_path=`$CYGPATH -u "$path"`
20000    fi
20001    if test "x$new_path" = x; then
20002      # It's still not found. Now this is an unrecoverable error.
20003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20005      has_space=`$ECHO "$complete" | $GREP " "`
20006      if test "x$has_space" != x; then
20007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20009      fi
20010      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20011    fi
20012  fi
20013
20014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20017  # "foo.exe" is OK but "foo" is an error.
20018  #
20019  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20020  # It is also a way to make sure we got the proper file name for the real test later on.
20021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20022  if test "x$test_shortpath" = x; then
20023    # Short path failed, file does not exist as specified.
20024    # Try adding .exe or .cmd
20025    if test -f "${new_path}.exe"; then
20026      input_to_shortpath="${new_path}.exe"
20027    elif test -f "${new_path}.cmd"; then
20028      input_to_shortpath="${new_path}.cmd"
20029    else
20030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20031$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20032      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20033$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20034      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20035    fi
20036  else
20037    input_to_shortpath="$new_path"
20038  fi
20039
20040  # Call helper function which possibly converts this using DOS-style short mode.
20041  # If so, the updated path is stored in $new_path.
20042  new_path="$input_to_shortpath"
20043
20044  input_path="$input_to_shortpath"
20045  # Check if we need to convert this using DOS-style short mode. If the path
20046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20047  # take no chances and rewrite it.
20048  # Note: m4 eats our [], so we need to use [ and ] instead.
20049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20050  if test "x$has_forbidden_chars" != x; then
20051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20055      # Going to short mode and back again did indeed matter. Since short mode is
20056      # case insensitive, let's make it lowercase to improve readability.
20057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20058      # Now convert it back to Unix-style (cygpath)
20059      input_path=`$CYGPATH -u "$shortmode_path"`
20060      new_path="$input_path"
20061    fi
20062  fi
20063
20064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20065  if test "x$test_cygdrive_prefix" = x; then
20066    # As a simple fix, exclude /usr/bin since it's not a real path.
20067    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20069      # a path prefixed by /cygdrive for fixpath to work.
20070      new_path="$CYGWIN_ROOT_PATH$input_path"
20071    fi
20072  fi
20073
20074  # remove trailing .exe if any
20075  new_path="${new_path/%.exe/}"
20076
20077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20078
20079  # First separate the path from the arguments. This will split at the first
20080  # space.
20081  complete="$FOUND_MAKE"
20082  path="${complete%% *}"
20083  tmp="$complete EOL"
20084  arguments="${tmp#* }"
20085
20086  # Input might be given as Windows format, start by converting to
20087  # unix format.
20088  new_path="$path"
20089
20090  windows_path="$new_path"
20091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20092    unix_path=`$CYGPATH -u "$windows_path"`
20093    new_path="$unix_path"
20094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20096    new_path="$unix_path"
20097  fi
20098
20099
20100  # Now try to locate executable using which
20101  new_path=`$WHICH "$new_path" 2> /dev/null`
20102
20103  if test "x$new_path" = x; then
20104    # Oops. Which didn't find the executable.
20105    # The splitting of arguments from the executable at a space might have been incorrect,
20106    # since paths with space are more likely in Windows. Give it another try with the whole
20107    # argument.
20108    path="$complete"
20109    arguments="EOL"
20110    new_path="$path"
20111
20112  windows_path="$new_path"
20113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20114    unix_path=`$CYGPATH -u "$windows_path"`
20115    new_path="$unix_path"
20116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20118    new_path="$unix_path"
20119  fi
20120
20121
20122    new_path=`$WHICH "$new_path" 2> /dev/null`
20123    # bat and cmd files are not always considered executable in MSYS causing which
20124    # to not find them
20125    if test "x$new_path" = x \
20126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20128      new_path="$path"
20129
20130  windows_path="$new_path"
20131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20132    unix_path=`$CYGPATH -u "$windows_path"`
20133    new_path="$unix_path"
20134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20136    new_path="$unix_path"
20137  fi
20138
20139    fi
20140
20141    if test "x$new_path" = x; then
20142      # It's still not found. Now this is an unrecoverable error.
20143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20144$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20145      has_space=`$ECHO "$complete" | $GREP " "`
20146      if test "x$has_space" != x; then
20147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20149      fi
20150      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20151    fi
20152  fi
20153
20154  # Now new_path has a complete unix path to the binary
20155  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20156    # Keep paths in /bin as-is, but remove trailing .exe if any
20157    new_path="${new_path/%.exe/}"
20158    # Do not save /bin paths to all_fixpath_prefixes!
20159  else
20160    # Not in mixed or Windows style, start by that.
20161    new_path=`cmd //c echo $new_path`
20162
20163  input_path="$new_path"
20164  # Check if we need to convert this using DOS-style short mode. If the path
20165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20166  # take no chances and rewrite it.
20167  # Note: m4 eats our [], so we need to use [ and ] instead.
20168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20169  if test "x$has_forbidden_chars" != x; then
20170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20172  fi
20173
20174    # Output is in $new_path
20175
20176  windows_path="$new_path"
20177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20178    unix_path=`$CYGPATH -u "$windows_path"`
20179    new_path="$unix_path"
20180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20182    new_path="$unix_path"
20183  fi
20184
20185    # remove trailing .exe if any
20186    new_path="${new_path/%.exe/}"
20187
20188    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20189    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20190  fi
20191
20192    else
20193      # We're on a unix platform. Hooray! :)
20194      # First separate the path from the arguments. This will split at the first
20195      # space.
20196      complete="$FOUND_MAKE"
20197      path="${complete%% *}"
20198      tmp="$complete EOL"
20199      arguments="${tmp#* }"
20200
20201      # Cannot rely on the command "which" here since it doesn't always work.
20202      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20203      if test -z "$is_absolute_path"; then
20204        # Path to executable is not absolute. Find it.
20205        IFS_save="$IFS"
20206        IFS=:
20207        for p in $PATH; do
20208          if test -f "$p/$path" && test -x "$p/$path"; then
20209            new_path="$p/$path"
20210            break
20211          fi
20212        done
20213        IFS="$IFS_save"
20214      else
20215        # This is an absolute path, we can use it without further modifications.
20216        new_path="$path"
20217      fi
20218
20219      if test "x$new_path" = x; then
20220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20221$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20222        has_space=`$ECHO "$complete" | $GREP " "`
20223        if test "x$has_space" != x; then
20224          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20225$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20226        fi
20227        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20228      fi
20229    fi
20230
20231    # Now join together the path and the arguments once again
20232    if test "x$arguments" != xEOL; then
20233      new_complete="$new_path ${arguments% *}"
20234    else
20235      new_complete="$new_path"
20236    fi
20237
20238    if test "x$complete" != "x$new_complete"; then
20239      FOUND_MAKE="$new_complete"
20240      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20241$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20242    fi
20243  fi
20244
20245        fi
20246      fi
20247    fi
20248  fi
20249
20250        if test "x$FOUND_MAKE" = x; then
20251          for ac_prog in make
20252do
20253  # Extract the first word of "$ac_prog", so it can be a program name with args.
20254set dummy $ac_prog; ac_word=$2
20255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20256$as_echo_n "checking for $ac_word... " >&6; }
20257if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20258  $as_echo_n "(cached) " >&6
20259else
20260  case $CHECK_TOOLSDIR_MAKE in
20261  [\\/]* | ?:[\\/]*)
20262  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20263  ;;
20264  *)
20265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20266for as_dir in $PATH
20267do
20268  IFS=$as_save_IFS
20269  test -z "$as_dir" && as_dir=.
20270    for ac_exec_ext in '' $ac_executable_extensions; do
20271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20272    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20274    break 2
20275  fi
20276done
20277  done
20278IFS=$as_save_IFS
20279
20280  ;;
20281esac
20282fi
20283CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20284if test -n "$CHECK_TOOLSDIR_MAKE"; then
20285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20286$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20287else
20288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20289$as_echo "no" >&6; }
20290fi
20291
20292
20293  test -n "$CHECK_TOOLSDIR_MAKE" && break
20294done
20295
20296
20297  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20298  DESCRIPTION="make in tools-dir"
20299
20300  # On Cygwin, we require a newer version of make than on other platforms
20301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20302    MAKE_VERSION_EXPR="-e 4\."
20303    MAKE_REQUIRED_VERSION="4.0"
20304   else
20305    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20306    MAKE_REQUIRED_VERSION="3.81"
20307  fi
20308
20309  if test "x$MAKE_CANDIDATE" != x; then
20310    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20311$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20312    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20313    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20314    if test "x$IS_GNU_MAKE" = x; then
20315      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20316$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20317    else
20318      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20319      if test "x$IS_MODERN_MAKE" = x; then
20320        { $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
20321$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;}
20322      else
20323        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20324          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20325            MAKE_EXPECTED_ENV='cygwin'
20326          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20327            MAKE_EXPECTED_ENV='msys'
20328          else
20329            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20330          fi
20331          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20332          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20333        else
20334          # Not relevant for non-Windows
20335          IS_MAKE_CORRECT_ENV=true
20336        fi
20337        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20338          { $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
20339$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;}
20340        else
20341          FOUND_MAKE=$MAKE_CANDIDATE
20342
20343  # Only process if variable expands to non-empty
20344
20345  if test "x$FOUND_MAKE" != x; then
20346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20347
20348  # First separate the path from the arguments. This will split at the first
20349  # space.
20350  complete="$FOUND_MAKE"
20351  path="${complete%% *}"
20352  tmp="$complete EOL"
20353  arguments="${tmp#* }"
20354
20355  # Input might be given as Windows format, start by converting to
20356  # unix format.
20357  new_path=`$CYGPATH -u "$path"`
20358
20359  # Now try to locate executable using which
20360  new_path=`$WHICH "$new_path" 2> /dev/null`
20361  # bat and cmd files are not always considered executable in cygwin causing which
20362  # to not find them
20363  if test "x$new_path" = x \
20364      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20365      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20366    new_path=`$CYGPATH -u "$path"`
20367  fi
20368  if test "x$new_path" = x; then
20369    # Oops. Which didn't find the executable.
20370    # The splitting of arguments from the executable at a space might have been incorrect,
20371    # since paths with space are more likely in Windows. Give it another try with the whole
20372    # argument.
20373    path="$complete"
20374    arguments="EOL"
20375    new_path=`$CYGPATH -u "$path"`
20376    new_path=`$WHICH "$new_path" 2> /dev/null`
20377    # bat and cmd files are not always considered executable in cygwin causing which
20378    # to not find them
20379    if test "x$new_path" = x \
20380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20382      new_path=`$CYGPATH -u "$path"`
20383    fi
20384    if test "x$new_path" = x; then
20385      # It's still not found. Now this is an unrecoverable error.
20386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20387$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20388      has_space=`$ECHO "$complete" | $GREP " "`
20389      if test "x$has_space" != x; then
20390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20392      fi
20393      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20394    fi
20395  fi
20396
20397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20400  # "foo.exe" is OK but "foo" is an error.
20401  #
20402  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20403  # It is also a way to make sure we got the proper file name for the real test later on.
20404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20405  if test "x$test_shortpath" = x; then
20406    # Short path failed, file does not exist as specified.
20407    # Try adding .exe or .cmd
20408    if test -f "${new_path}.exe"; then
20409      input_to_shortpath="${new_path}.exe"
20410    elif test -f "${new_path}.cmd"; then
20411      input_to_shortpath="${new_path}.cmd"
20412    else
20413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20414$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20415      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20416$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20418    fi
20419  else
20420    input_to_shortpath="$new_path"
20421  fi
20422
20423  # Call helper function which possibly converts this using DOS-style short mode.
20424  # If so, the updated path is stored in $new_path.
20425  new_path="$input_to_shortpath"
20426
20427  input_path="$input_to_shortpath"
20428  # Check if we need to convert this using DOS-style short mode. If the path
20429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20430  # take no chances and rewrite it.
20431  # Note: m4 eats our [], so we need to use [ and ] instead.
20432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20433  if test "x$has_forbidden_chars" != x; then
20434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20438      # Going to short mode and back again did indeed matter. Since short mode is
20439      # case insensitive, let's make it lowercase to improve readability.
20440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20441      # Now convert it back to Unix-style (cygpath)
20442      input_path=`$CYGPATH -u "$shortmode_path"`
20443      new_path="$input_path"
20444    fi
20445  fi
20446
20447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20448  if test "x$test_cygdrive_prefix" = x; then
20449    # As a simple fix, exclude /usr/bin since it's not a real path.
20450    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20452      # a path prefixed by /cygdrive for fixpath to work.
20453      new_path="$CYGWIN_ROOT_PATH$input_path"
20454    fi
20455  fi
20456
20457  # remove trailing .exe if any
20458  new_path="${new_path/%.exe/}"
20459
20460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20461
20462  # First separate the path from the arguments. This will split at the first
20463  # space.
20464  complete="$FOUND_MAKE"
20465  path="${complete%% *}"
20466  tmp="$complete EOL"
20467  arguments="${tmp#* }"
20468
20469  # Input might be given as Windows format, start by converting to
20470  # unix format.
20471  new_path="$path"
20472
20473  windows_path="$new_path"
20474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20475    unix_path=`$CYGPATH -u "$windows_path"`
20476    new_path="$unix_path"
20477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20479    new_path="$unix_path"
20480  fi
20481
20482
20483  # Now try to locate executable using which
20484  new_path=`$WHICH "$new_path" 2> /dev/null`
20485
20486  if test "x$new_path" = x; then
20487    # Oops. Which didn't find the executable.
20488    # The splitting of arguments from the executable at a space might have been incorrect,
20489    # since paths with space are more likely in Windows. Give it another try with the whole
20490    # argument.
20491    path="$complete"
20492    arguments="EOL"
20493    new_path="$path"
20494
20495  windows_path="$new_path"
20496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20497    unix_path=`$CYGPATH -u "$windows_path"`
20498    new_path="$unix_path"
20499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20501    new_path="$unix_path"
20502  fi
20503
20504
20505    new_path=`$WHICH "$new_path" 2> /dev/null`
20506    # bat and cmd files are not always considered executable in MSYS causing which
20507    # to not find them
20508    if test "x$new_path" = x \
20509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20511      new_path="$path"
20512
20513  windows_path="$new_path"
20514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20515    unix_path=`$CYGPATH -u "$windows_path"`
20516    new_path="$unix_path"
20517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20519    new_path="$unix_path"
20520  fi
20521
20522    fi
20523
20524    if test "x$new_path" = x; then
20525      # It's still not found. Now this is an unrecoverable error.
20526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20527$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20528      has_space=`$ECHO "$complete" | $GREP " "`
20529      if test "x$has_space" != x; then
20530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20532      fi
20533      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20534    fi
20535  fi
20536
20537  # Now new_path has a complete unix path to the binary
20538  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20539    # Keep paths in /bin as-is, but remove trailing .exe if any
20540    new_path="${new_path/%.exe/}"
20541    # Do not save /bin paths to all_fixpath_prefixes!
20542  else
20543    # Not in mixed or Windows style, start by that.
20544    new_path=`cmd //c echo $new_path`
20545
20546  input_path="$new_path"
20547  # Check if we need to convert this using DOS-style short mode. If the path
20548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20549  # take no chances and rewrite it.
20550  # Note: m4 eats our [], so we need to use [ and ] instead.
20551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20552  if test "x$has_forbidden_chars" != x; then
20553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20555  fi
20556
20557    # Output is in $new_path
20558
20559  windows_path="$new_path"
20560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20561    unix_path=`$CYGPATH -u "$windows_path"`
20562    new_path="$unix_path"
20563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20565    new_path="$unix_path"
20566  fi
20567
20568    # remove trailing .exe if any
20569    new_path="${new_path/%.exe/}"
20570
20571    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20572    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20573  fi
20574
20575    else
20576      # We're on a unix platform. Hooray! :)
20577      # First separate the path from the arguments. This will split at the first
20578      # space.
20579      complete="$FOUND_MAKE"
20580      path="${complete%% *}"
20581      tmp="$complete EOL"
20582      arguments="${tmp#* }"
20583
20584      # Cannot rely on the command "which" here since it doesn't always work.
20585      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20586      if test -z "$is_absolute_path"; then
20587        # Path to executable is not absolute. Find it.
20588        IFS_save="$IFS"
20589        IFS=:
20590        for p in $PATH; do
20591          if test -f "$p/$path" && test -x "$p/$path"; then
20592            new_path="$p/$path"
20593            break
20594          fi
20595        done
20596        IFS="$IFS_save"
20597      else
20598        # This is an absolute path, we can use it without further modifications.
20599        new_path="$path"
20600      fi
20601
20602      if test "x$new_path" = x; then
20603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20604$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20605        has_space=`$ECHO "$complete" | $GREP " "`
20606        if test "x$has_space" != x; then
20607          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20608$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20609        fi
20610        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20611      fi
20612    fi
20613
20614    # Now join together the path and the arguments once again
20615    if test "x$arguments" != xEOL; then
20616      new_complete="$new_path ${arguments% *}"
20617    else
20618      new_complete="$new_path"
20619    fi
20620
20621    if test "x$complete" != "x$new_complete"; then
20622      FOUND_MAKE="$new_complete"
20623      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20624$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20625    fi
20626  fi
20627
20628        fi
20629      fi
20630    fi
20631  fi
20632
20633        fi
20634        PATH=$OLD_PATH
20635      fi
20636    fi
20637
20638    if test "x$FOUND_MAKE" = x; then
20639      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
20640    fi
20641
20642    else
20643      # If it succeeded, then it was overridden by the user. We will use it
20644      # for the tool.
20645
20646      # First remove it from the list of overridden variables, so we can test
20647      # for unknown variables in the end.
20648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20649
20650      # Check if we try to supply an empty value
20651      if test "x$MAKE" = x; then
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20653$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20655$as_echo_n "checking for MAKE... " >&6; }
20656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20657$as_echo "disabled" >&6; }
20658      else
20659        # Check if the provided tool contains a complete path.
20660        tool_specified="$MAKE"
20661        tool_basename="${tool_specified##*/}"
20662        if test "x$tool_basename" = "x$tool_specified"; then
20663          # A command without a complete path is provided, search $PATH.
20664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20665$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20666          # Extract the first word of "$tool_basename", so it can be a program name with args.
20667set dummy $tool_basename; ac_word=$2
20668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20669$as_echo_n "checking for $ac_word... " >&6; }
20670if ${ac_cv_path_MAKE+:} false; then :
20671  $as_echo_n "(cached) " >&6
20672else
20673  case $MAKE in
20674  [\\/]* | ?:[\\/]*)
20675  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20676  ;;
20677  *)
20678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20679for as_dir in $PATH
20680do
20681  IFS=$as_save_IFS
20682  test -z "$as_dir" && as_dir=.
20683    for ac_exec_ext in '' $ac_executable_extensions; do
20684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20685    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20687    break 2
20688  fi
20689done
20690  done
20691IFS=$as_save_IFS
20692
20693  ;;
20694esac
20695fi
20696MAKE=$ac_cv_path_MAKE
20697if test -n "$MAKE"; then
20698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20699$as_echo "$MAKE" >&6; }
20700else
20701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20702$as_echo "no" >&6; }
20703fi
20704
20705
20706          if test "x$MAKE" = x; then
20707            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20708          fi
20709        else
20710          # Otherwise we believe it is a complete path. Use it as it is.
20711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20712$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20713          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20714$as_echo_n "checking for MAKE... " >&6; }
20715          if test ! -x "$tool_specified"; then
20716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20717$as_echo "not found" >&6; }
20718            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20719          fi
20720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20721$as_echo "$tool_specified" >&6; }
20722        fi
20723      fi
20724    fi
20725
20726    # If MAKE was set by user, verify the version
20727
20728  MAKE_CANDIDATE=""$MAKE""
20729  DESCRIPTION="user supplied MAKE=$MAKE"
20730
20731  # On Cygwin, we require a newer version of make than on other platforms
20732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20733    MAKE_VERSION_EXPR="-e 4\."
20734    MAKE_REQUIRED_VERSION="4.0"
20735   else
20736    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20737    MAKE_REQUIRED_VERSION="3.81"
20738  fi
20739
20740  if test "x$MAKE_CANDIDATE" != x; then
20741    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20742$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20743    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20744    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20745    if test "x$IS_GNU_MAKE" = x; then
20746      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20747$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20748    else
20749      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20750      if test "x$IS_MODERN_MAKE" = x; then
20751        { $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
20752$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;}
20753      else
20754        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20755          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20756            MAKE_EXPECTED_ENV='cygwin'
20757          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20758            MAKE_EXPECTED_ENV='msys'
20759          else
20760            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20761          fi
20762          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20763          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20764        else
20765          # Not relevant for non-Windows
20766          IS_MAKE_CORRECT_ENV=true
20767        fi
20768        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20769          { $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
20770$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;}
20771        else
20772          FOUND_MAKE=$MAKE_CANDIDATE
20773
20774  # Only process if variable expands to non-empty
20775
20776  if test "x$FOUND_MAKE" != x; then
20777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20778
20779  # First separate the path from the arguments. This will split at the first
20780  # space.
20781  complete="$FOUND_MAKE"
20782  path="${complete%% *}"
20783  tmp="$complete EOL"
20784  arguments="${tmp#* }"
20785
20786  # Input might be given as Windows format, start by converting to
20787  # unix format.
20788  new_path=`$CYGPATH -u "$path"`
20789
20790  # Now try to locate executable using which
20791  new_path=`$WHICH "$new_path" 2> /dev/null`
20792  # bat and cmd files are not always considered executable in cygwin causing which
20793  # to not find them
20794  if test "x$new_path" = x \
20795      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20796      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20797    new_path=`$CYGPATH -u "$path"`
20798  fi
20799  if test "x$new_path" = x; then
20800    # Oops. Which didn't find the executable.
20801    # The splitting of arguments from the executable at a space might have been incorrect,
20802    # since paths with space are more likely in Windows. Give it another try with the whole
20803    # argument.
20804    path="$complete"
20805    arguments="EOL"
20806    new_path=`$CYGPATH -u "$path"`
20807    new_path=`$WHICH "$new_path" 2> /dev/null`
20808    # bat and cmd files are not always considered executable in cygwin causing which
20809    # to not find them
20810    if test "x$new_path" = x \
20811        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20812        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20813      new_path=`$CYGPATH -u "$path"`
20814    fi
20815    if test "x$new_path" = x; then
20816      # It's still not found. Now this is an unrecoverable error.
20817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20818$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20819      has_space=`$ECHO "$complete" | $GREP " "`
20820      if test "x$has_space" != x; then
20821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20823      fi
20824      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20825    fi
20826  fi
20827
20828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20831  # "foo.exe" is OK but "foo" is an error.
20832  #
20833  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20834  # It is also a way to make sure we got the proper file name for the real test later on.
20835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20836  if test "x$test_shortpath" = x; then
20837    # Short path failed, file does not exist as specified.
20838    # Try adding .exe or .cmd
20839    if test -f "${new_path}.exe"; then
20840      input_to_shortpath="${new_path}.exe"
20841    elif test -f "${new_path}.cmd"; then
20842      input_to_shortpath="${new_path}.cmd"
20843    else
20844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20845$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20846      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20847$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20848      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20849    fi
20850  else
20851    input_to_shortpath="$new_path"
20852  fi
20853
20854  # Call helper function which possibly converts this using DOS-style short mode.
20855  # If so, the updated path is stored in $new_path.
20856  new_path="$input_to_shortpath"
20857
20858  input_path="$input_to_shortpath"
20859  # Check if we need to convert this using DOS-style short mode. If the path
20860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20861  # take no chances and rewrite it.
20862  # Note: m4 eats our [], so we need to use [ and ] instead.
20863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20864  if test "x$has_forbidden_chars" != x; then
20865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20869      # Going to short mode and back again did indeed matter. Since short mode is
20870      # case insensitive, let's make it lowercase to improve readability.
20871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20872      # Now convert it back to Unix-style (cygpath)
20873      input_path=`$CYGPATH -u "$shortmode_path"`
20874      new_path="$input_path"
20875    fi
20876  fi
20877
20878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20879  if test "x$test_cygdrive_prefix" = x; then
20880    # As a simple fix, exclude /usr/bin since it's not a real path.
20881    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20883      # a path prefixed by /cygdrive for fixpath to work.
20884      new_path="$CYGWIN_ROOT_PATH$input_path"
20885    fi
20886  fi
20887
20888  # remove trailing .exe if any
20889  new_path="${new_path/%.exe/}"
20890
20891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20892
20893  # First separate the path from the arguments. This will split at the first
20894  # space.
20895  complete="$FOUND_MAKE"
20896  path="${complete%% *}"
20897  tmp="$complete EOL"
20898  arguments="${tmp#* }"
20899
20900  # Input might be given as Windows format, start by converting to
20901  # unix format.
20902  new_path="$path"
20903
20904  windows_path="$new_path"
20905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20906    unix_path=`$CYGPATH -u "$windows_path"`
20907    new_path="$unix_path"
20908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20910    new_path="$unix_path"
20911  fi
20912
20913
20914  # Now try to locate executable using which
20915  new_path=`$WHICH "$new_path" 2> /dev/null`
20916
20917  if test "x$new_path" = x; then
20918    # Oops. Which didn't find the executable.
20919    # The splitting of arguments from the executable at a space might have been incorrect,
20920    # since paths with space are more likely in Windows. Give it another try with the whole
20921    # argument.
20922    path="$complete"
20923    arguments="EOL"
20924    new_path="$path"
20925
20926  windows_path="$new_path"
20927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20928    unix_path=`$CYGPATH -u "$windows_path"`
20929    new_path="$unix_path"
20930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20932    new_path="$unix_path"
20933  fi
20934
20935
20936    new_path=`$WHICH "$new_path" 2> /dev/null`
20937    # bat and cmd files are not always considered executable in MSYS causing which
20938    # to not find them
20939    if test "x$new_path" = x \
20940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20942      new_path="$path"
20943
20944  windows_path="$new_path"
20945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20946    unix_path=`$CYGPATH -u "$windows_path"`
20947    new_path="$unix_path"
20948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20950    new_path="$unix_path"
20951  fi
20952
20953    fi
20954
20955    if test "x$new_path" = x; then
20956      # It's still not found. Now this is an unrecoverable error.
20957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20958$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20959      has_space=`$ECHO "$complete" | $GREP " "`
20960      if test "x$has_space" != x; then
20961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20963      fi
20964      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20965    fi
20966  fi
20967
20968  # Now new_path has a complete unix path to the binary
20969  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20970    # Keep paths in /bin as-is, but remove trailing .exe if any
20971    new_path="${new_path/%.exe/}"
20972    # Do not save /bin paths to all_fixpath_prefixes!
20973  else
20974    # Not in mixed or Windows style, start by that.
20975    new_path=`cmd //c echo $new_path`
20976
20977  input_path="$new_path"
20978  # Check if we need to convert this using DOS-style short mode. If the path
20979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20980  # take no chances and rewrite it.
20981  # Note: m4 eats our [], so we need to use [ and ] instead.
20982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20983  if test "x$has_forbidden_chars" != x; then
20984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20986  fi
20987
20988    # Output is in $new_path
20989
20990  windows_path="$new_path"
20991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20992    unix_path=`$CYGPATH -u "$windows_path"`
20993    new_path="$unix_path"
20994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20996    new_path="$unix_path"
20997  fi
20998
20999    # remove trailing .exe if any
21000    new_path="${new_path/%.exe/}"
21001
21002    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21003    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21004  fi
21005
21006    else
21007      # We're on a unix platform. Hooray! :)
21008      # First separate the path from the arguments. This will split at the first
21009      # space.
21010      complete="$FOUND_MAKE"
21011      path="${complete%% *}"
21012      tmp="$complete EOL"
21013      arguments="${tmp#* }"
21014
21015      # Cannot rely on the command "which" here since it doesn't always work.
21016      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21017      if test -z "$is_absolute_path"; then
21018        # Path to executable is not absolute. Find it.
21019        IFS_save="$IFS"
21020        IFS=:
21021        for p in $PATH; do
21022          if test -f "$p/$path" && test -x "$p/$path"; then
21023            new_path="$p/$path"
21024            break
21025          fi
21026        done
21027        IFS="$IFS_save"
21028      else
21029        # This is an absolute path, we can use it without further modifications.
21030        new_path="$path"
21031      fi
21032
21033      if test "x$new_path" = x; then
21034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21035$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21036        has_space=`$ECHO "$complete" | $GREP " "`
21037        if test "x$has_space" != x; then
21038          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21039$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21040        fi
21041        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21042      fi
21043    fi
21044
21045    # Now join together the path and the arguments once again
21046    if test "x$arguments" != xEOL; then
21047      new_complete="$new_path ${arguments% *}"
21048    else
21049      new_complete="$new_path"
21050    fi
21051
21052    if test "x$complete" != "x$new_complete"; then
21053      FOUND_MAKE="$new_complete"
21054      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21055$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21056    fi
21057  fi
21058
21059        fi
21060      fi
21061    fi
21062  fi
21063
21064    if test "x$FOUND_MAKE" = x; then
21065      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21066    fi
21067
21068  fi
21069
21070
21071  MAKE=$FOUND_MAKE
21072
21073  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21074$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21075
21076
21077  # Check if make supports the output sync option and if so, setup using it.
21078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21079$as_echo_n "checking if make --output-sync is supported... " >&6; }
21080  if $MAKE --version -O > /dev/null 2>&1; then
21081    OUTPUT_SYNC_SUPPORTED=true
21082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21083$as_echo "yes" >&6; }
21084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21085$as_echo_n "checking for output-sync value... " >&6; }
21086
21087# Check whether --with-output-sync was given.
21088if test "${with_output_sync+set}" = set; then :
21089  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21090fi
21091
21092    if test "x$OUTPUT_SYNC" = "x"; then
21093      OUTPUT_SYNC=none
21094    fi
21095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21096$as_echo "$OUTPUT_SYNC" >&6; }
21097    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21098      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21099    fi
21100  else
21101    OUTPUT_SYNC_SUPPORTED=false
21102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21103$as_echo "no" >&6; }
21104  fi
21105
21106
21107
21108
21109
21110
21111  # Test if find supports -delete
21112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21113$as_echo_n "checking if find supports -delete... " >&6; }
21114  FIND_DELETE="-delete"
21115
21116  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21117
21118  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21119
21120  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21121  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21122    # No, it does not.
21123    $RM $DELETEDIR/TestIfFindSupportsDelete
21124    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21125      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21126      FIND_DELETE="-print | $XARGS $RM"
21127    else
21128      FIND_DELETE="-exec $RM \{\} \+"
21129    fi
21130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21131$as_echo "no" >&6; }
21132  else
21133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21134$as_echo "yes" >&6; }
21135  fi
21136  $RMDIR $DELETEDIR
21137
21138
21139
21140  # Test which kind of tar was found
21141  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21142    TAR_TYPE="gnu"
21143  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21144    TAR_TYPE="bsd"
21145  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21146    TAR_TYPE="solaris"
21147  fi
21148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21149$as_echo_n "checking what type of tar was found... " >&6; }
21150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21151$as_echo "$TAR_TYPE" >&6; }
21152
21153  TAR_CREATE_FILE_PARAM=""
21154
21155  if test "x$TAR_TYPE" = "xgnu"; then
21156    TAR_INCLUDE_PARAM="T"
21157    TAR_SUPPORTS_TRANSFORM="true"
21158    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21159      # When using gnu tar for Solaris targets, need to use compatibility mode
21160      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21161    fi
21162  else
21163    TAR_INCLUDE_PARAM="I"
21164    TAR_SUPPORTS_TRANSFORM="false"
21165  fi
21166
21167
21168
21169
21170
21171
21172  # These tools might not be installed by default,
21173  # need hint on how to install them.
21174
21175
21176
21177  # Publish this variable in the help.
21178
21179
21180  if [ -z "${UNZIP+x}" ]; then
21181    # The variable is not set by user, try to locate tool using the code snippet
21182    for ac_prog in unzip
21183do
21184  # Extract the first word of "$ac_prog", so it can be a program name with args.
21185set dummy $ac_prog; ac_word=$2
21186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21187$as_echo_n "checking for $ac_word... " >&6; }
21188if ${ac_cv_path_UNZIP+:} false; then :
21189  $as_echo_n "(cached) " >&6
21190else
21191  case $UNZIP in
21192  [\\/]* | ?:[\\/]*)
21193  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21194  ;;
21195  *)
21196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21197for as_dir in $PATH
21198do
21199  IFS=$as_save_IFS
21200  test -z "$as_dir" && as_dir=.
21201    for ac_exec_ext in '' $ac_executable_extensions; do
21202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21203    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21205    break 2
21206  fi
21207done
21208  done
21209IFS=$as_save_IFS
21210
21211  ;;
21212esac
21213fi
21214UNZIP=$ac_cv_path_UNZIP
21215if test -n "$UNZIP"; then
21216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21217$as_echo "$UNZIP" >&6; }
21218else
21219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21220$as_echo "no" >&6; }
21221fi
21222
21223
21224  test -n "$UNZIP" && break
21225done
21226
21227  else
21228    # The variable is set, but is it from the command line or the environment?
21229
21230    # Try to remove the string !UNZIP! from our list.
21231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21233      # If it failed, the variable was not from the command line. Ignore it,
21234      # but warn the user (except for BASH, which is always set by the calling BASH).
21235      if test "xUNZIP" != xBASH; then
21236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21237$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21238      fi
21239      # Try to locate tool using the code snippet
21240      for ac_prog in unzip
21241do
21242  # Extract the first word of "$ac_prog", so it can be a program name with args.
21243set dummy $ac_prog; ac_word=$2
21244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21245$as_echo_n "checking for $ac_word... " >&6; }
21246if ${ac_cv_path_UNZIP+:} false; then :
21247  $as_echo_n "(cached) " >&6
21248else
21249  case $UNZIP in
21250  [\\/]* | ?:[\\/]*)
21251  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21252  ;;
21253  *)
21254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21255for as_dir in $PATH
21256do
21257  IFS=$as_save_IFS
21258  test -z "$as_dir" && as_dir=.
21259    for ac_exec_ext in '' $ac_executable_extensions; do
21260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21261    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21263    break 2
21264  fi
21265done
21266  done
21267IFS=$as_save_IFS
21268
21269  ;;
21270esac
21271fi
21272UNZIP=$ac_cv_path_UNZIP
21273if test -n "$UNZIP"; then
21274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21275$as_echo "$UNZIP" >&6; }
21276else
21277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21278$as_echo "no" >&6; }
21279fi
21280
21281
21282  test -n "$UNZIP" && break
21283done
21284
21285    else
21286      # If it succeeded, then it was overridden by the user. We will use it
21287      # for the tool.
21288
21289      # First remove it from the list of overridden variables, so we can test
21290      # for unknown variables in the end.
21291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21292
21293      # Check if we try to supply an empty value
21294      if test "x$UNZIP" = x; then
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21296$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21298$as_echo_n "checking for UNZIP... " >&6; }
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21300$as_echo "disabled" >&6; }
21301      else
21302        # Check if the provided tool contains a complete path.
21303        tool_specified="$UNZIP"
21304        tool_basename="${tool_specified##*/}"
21305        if test "x$tool_basename" = "x$tool_specified"; then
21306          # A command without a complete path is provided, search $PATH.
21307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21308$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21309          # Extract the first word of "$tool_basename", so it can be a program name with args.
21310set dummy $tool_basename; ac_word=$2
21311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21312$as_echo_n "checking for $ac_word... " >&6; }
21313if ${ac_cv_path_UNZIP+:} false; then :
21314  $as_echo_n "(cached) " >&6
21315else
21316  case $UNZIP in
21317  [\\/]* | ?:[\\/]*)
21318  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21319  ;;
21320  *)
21321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21322for as_dir in $PATH
21323do
21324  IFS=$as_save_IFS
21325  test -z "$as_dir" && as_dir=.
21326    for ac_exec_ext in '' $ac_executable_extensions; do
21327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21328    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21330    break 2
21331  fi
21332done
21333  done
21334IFS=$as_save_IFS
21335
21336  ;;
21337esac
21338fi
21339UNZIP=$ac_cv_path_UNZIP
21340if test -n "$UNZIP"; then
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21342$as_echo "$UNZIP" >&6; }
21343else
21344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21345$as_echo "no" >&6; }
21346fi
21347
21348
21349          if test "x$UNZIP" = x; then
21350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21351          fi
21352        else
21353          # Otherwise we believe it is a complete path. Use it as it is.
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21355$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21357$as_echo_n "checking for UNZIP... " >&6; }
21358          if test ! -x "$tool_specified"; then
21359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21360$as_echo "not found" >&6; }
21361            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21362          fi
21363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21364$as_echo "$tool_specified" >&6; }
21365        fi
21366      fi
21367    fi
21368
21369  fi
21370
21371
21372
21373  if test "x$UNZIP" = x; then
21374    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21375  fi
21376
21377
21378
21379
21380
21381  # Publish this variable in the help.
21382
21383
21384  if [ -z "${ZIP+x}" ]; then
21385    # The variable is not set by user, try to locate tool using the code snippet
21386    for ac_prog in zip
21387do
21388  # Extract the first word of "$ac_prog", so it can be a program name with args.
21389set dummy $ac_prog; ac_word=$2
21390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21391$as_echo_n "checking for $ac_word... " >&6; }
21392if ${ac_cv_path_ZIP+:} false; then :
21393  $as_echo_n "(cached) " >&6
21394else
21395  case $ZIP in
21396  [\\/]* | ?:[\\/]*)
21397  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21398  ;;
21399  *)
21400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21401for as_dir in $PATH
21402do
21403  IFS=$as_save_IFS
21404  test -z "$as_dir" && as_dir=.
21405    for ac_exec_ext in '' $ac_executable_extensions; do
21406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21407    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21409    break 2
21410  fi
21411done
21412  done
21413IFS=$as_save_IFS
21414
21415  ;;
21416esac
21417fi
21418ZIP=$ac_cv_path_ZIP
21419if test -n "$ZIP"; then
21420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21421$as_echo "$ZIP" >&6; }
21422else
21423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21424$as_echo "no" >&6; }
21425fi
21426
21427
21428  test -n "$ZIP" && break
21429done
21430
21431  else
21432    # The variable is set, but is it from the command line or the environment?
21433
21434    # Try to remove the string !ZIP! from our list.
21435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21437      # If it failed, the variable was not from the command line. Ignore it,
21438      # but warn the user (except for BASH, which is always set by the calling BASH).
21439      if test "xZIP" != xBASH; then
21440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21441$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21442      fi
21443      # Try to locate tool using the code snippet
21444      for ac_prog in zip
21445do
21446  # Extract the first word of "$ac_prog", so it can be a program name with args.
21447set dummy $ac_prog; ac_word=$2
21448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21449$as_echo_n "checking for $ac_word... " >&6; }
21450if ${ac_cv_path_ZIP+:} false; then :
21451  $as_echo_n "(cached) " >&6
21452else
21453  case $ZIP in
21454  [\\/]* | ?:[\\/]*)
21455  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21456  ;;
21457  *)
21458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21459for as_dir in $PATH
21460do
21461  IFS=$as_save_IFS
21462  test -z "$as_dir" && as_dir=.
21463    for ac_exec_ext in '' $ac_executable_extensions; do
21464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21465    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21467    break 2
21468  fi
21469done
21470  done
21471IFS=$as_save_IFS
21472
21473  ;;
21474esac
21475fi
21476ZIP=$ac_cv_path_ZIP
21477if test -n "$ZIP"; then
21478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21479$as_echo "$ZIP" >&6; }
21480else
21481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21482$as_echo "no" >&6; }
21483fi
21484
21485
21486  test -n "$ZIP" && break
21487done
21488
21489    else
21490      # If it succeeded, then it was overridden by the user. We will use it
21491      # for the tool.
21492
21493      # First remove it from the list of overridden variables, so we can test
21494      # for unknown variables in the end.
21495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21496
21497      # Check if we try to supply an empty value
21498      if test "x$ZIP" = x; then
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21500$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21502$as_echo_n "checking for ZIP... " >&6; }
21503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21504$as_echo "disabled" >&6; }
21505      else
21506        # Check if the provided tool contains a complete path.
21507        tool_specified="$ZIP"
21508        tool_basename="${tool_specified##*/}"
21509        if test "x$tool_basename" = "x$tool_specified"; then
21510          # A command without a complete path is provided, search $PATH.
21511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21512$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21513          # Extract the first word of "$tool_basename", so it can be a program name with args.
21514set dummy $tool_basename; ac_word=$2
21515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21516$as_echo_n "checking for $ac_word... " >&6; }
21517if ${ac_cv_path_ZIP+:} false; then :
21518  $as_echo_n "(cached) " >&6
21519else
21520  case $ZIP in
21521  [\\/]* | ?:[\\/]*)
21522  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21523  ;;
21524  *)
21525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21526for as_dir in $PATH
21527do
21528  IFS=$as_save_IFS
21529  test -z "$as_dir" && as_dir=.
21530    for ac_exec_ext in '' $ac_executable_extensions; do
21531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21532    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21534    break 2
21535  fi
21536done
21537  done
21538IFS=$as_save_IFS
21539
21540  ;;
21541esac
21542fi
21543ZIP=$ac_cv_path_ZIP
21544if test -n "$ZIP"; then
21545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21546$as_echo "$ZIP" >&6; }
21547else
21548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21549$as_echo "no" >&6; }
21550fi
21551
21552
21553          if test "x$ZIP" = x; then
21554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21555          fi
21556        else
21557          # Otherwise we believe it is a complete path. Use it as it is.
21558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21559$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21561$as_echo_n "checking for ZIP... " >&6; }
21562          if test ! -x "$tool_specified"; then
21563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21564$as_echo "not found" >&6; }
21565            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21566          fi
21567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21568$as_echo "$tool_specified" >&6; }
21569        fi
21570      fi
21571    fi
21572
21573  fi
21574
21575
21576
21577  if test "x$ZIP" = x; then
21578    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21579  fi
21580
21581
21582
21583  # Non-required basic tools
21584
21585
21586
21587  # Publish this variable in the help.
21588
21589
21590  if [ -z "${LDD+x}" ]; then
21591    # The variable is not set by user, try to locate tool using the code snippet
21592    for ac_prog in ldd
21593do
21594  # Extract the first word of "$ac_prog", so it can be a program name with args.
21595set dummy $ac_prog; ac_word=$2
21596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21597$as_echo_n "checking for $ac_word... " >&6; }
21598if ${ac_cv_path_LDD+:} false; then :
21599  $as_echo_n "(cached) " >&6
21600else
21601  case $LDD in
21602  [\\/]* | ?:[\\/]*)
21603  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21604  ;;
21605  *)
21606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21607for as_dir in $PATH
21608do
21609  IFS=$as_save_IFS
21610  test -z "$as_dir" && as_dir=.
21611    for ac_exec_ext in '' $ac_executable_extensions; do
21612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21613    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21615    break 2
21616  fi
21617done
21618  done
21619IFS=$as_save_IFS
21620
21621  ;;
21622esac
21623fi
21624LDD=$ac_cv_path_LDD
21625if test -n "$LDD"; then
21626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21627$as_echo "$LDD" >&6; }
21628else
21629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21630$as_echo "no" >&6; }
21631fi
21632
21633
21634  test -n "$LDD" && break
21635done
21636
21637  else
21638    # The variable is set, but is it from the command line or the environment?
21639
21640    # Try to remove the string !LDD! from our list.
21641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21643      # If it failed, the variable was not from the command line. Ignore it,
21644      # but warn the user (except for BASH, which is always set by the calling BASH).
21645      if test "xLDD" != xBASH; then
21646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21647$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21648      fi
21649      # Try to locate tool using the code snippet
21650      for ac_prog in ldd
21651do
21652  # Extract the first word of "$ac_prog", so it can be a program name with args.
21653set dummy $ac_prog; ac_word=$2
21654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21655$as_echo_n "checking for $ac_word... " >&6; }
21656if ${ac_cv_path_LDD+:} false; then :
21657  $as_echo_n "(cached) " >&6
21658else
21659  case $LDD in
21660  [\\/]* | ?:[\\/]*)
21661  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21662  ;;
21663  *)
21664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21665for as_dir in $PATH
21666do
21667  IFS=$as_save_IFS
21668  test -z "$as_dir" && as_dir=.
21669    for ac_exec_ext in '' $ac_executable_extensions; do
21670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21671    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21673    break 2
21674  fi
21675done
21676  done
21677IFS=$as_save_IFS
21678
21679  ;;
21680esac
21681fi
21682LDD=$ac_cv_path_LDD
21683if test -n "$LDD"; then
21684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21685$as_echo "$LDD" >&6; }
21686else
21687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21688$as_echo "no" >&6; }
21689fi
21690
21691
21692  test -n "$LDD" && break
21693done
21694
21695    else
21696      # If it succeeded, then it was overridden by the user. We will use it
21697      # for the tool.
21698
21699      # First remove it from the list of overridden variables, so we can test
21700      # for unknown variables in the end.
21701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21702
21703      # Check if we try to supply an empty value
21704      if test "x$LDD" = x; then
21705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21706$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21708$as_echo_n "checking for LDD... " >&6; }
21709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21710$as_echo "disabled" >&6; }
21711      else
21712        # Check if the provided tool contains a complete path.
21713        tool_specified="$LDD"
21714        tool_basename="${tool_specified##*/}"
21715        if test "x$tool_basename" = "x$tool_specified"; then
21716          # A command without a complete path is provided, search $PATH.
21717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21718$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21719          # Extract the first word of "$tool_basename", so it can be a program name with args.
21720set dummy $tool_basename; ac_word=$2
21721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21722$as_echo_n "checking for $ac_word... " >&6; }
21723if ${ac_cv_path_LDD+:} false; then :
21724  $as_echo_n "(cached) " >&6
21725else
21726  case $LDD in
21727  [\\/]* | ?:[\\/]*)
21728  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21729  ;;
21730  *)
21731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21732for as_dir in $PATH
21733do
21734  IFS=$as_save_IFS
21735  test -z "$as_dir" && as_dir=.
21736    for ac_exec_ext in '' $ac_executable_extensions; do
21737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21738    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21740    break 2
21741  fi
21742done
21743  done
21744IFS=$as_save_IFS
21745
21746  ;;
21747esac
21748fi
21749LDD=$ac_cv_path_LDD
21750if test -n "$LDD"; then
21751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21752$as_echo "$LDD" >&6; }
21753else
21754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21755$as_echo "no" >&6; }
21756fi
21757
21758
21759          if test "x$LDD" = x; then
21760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21761          fi
21762        else
21763          # Otherwise we believe it is a complete path. Use it as it is.
21764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21765$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21767$as_echo_n "checking for LDD... " >&6; }
21768          if test ! -x "$tool_specified"; then
21769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21770$as_echo "not found" >&6; }
21771            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21772          fi
21773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21774$as_echo "$tool_specified" >&6; }
21775        fi
21776      fi
21777    fi
21778
21779  fi
21780
21781
21782  if test "x$LDD" = "x"; then
21783    # List shared lib dependencies is used for
21784    # debug output and checking for forbidden dependencies.
21785    # We can build without it.
21786    LDD="true"
21787  fi
21788
21789
21790  # Publish this variable in the help.
21791
21792
21793  if [ -z "${OTOOL+x}" ]; then
21794    # The variable is not set by user, try to locate tool using the code snippet
21795    for ac_prog in otool
21796do
21797  # Extract the first word of "$ac_prog", so it can be a program name with args.
21798set dummy $ac_prog; ac_word=$2
21799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21800$as_echo_n "checking for $ac_word... " >&6; }
21801if ${ac_cv_path_OTOOL+:} false; then :
21802  $as_echo_n "(cached) " >&6
21803else
21804  case $OTOOL in
21805  [\\/]* | ?:[\\/]*)
21806  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21807  ;;
21808  *)
21809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21810for as_dir in $PATH
21811do
21812  IFS=$as_save_IFS
21813  test -z "$as_dir" && as_dir=.
21814    for ac_exec_ext in '' $ac_executable_extensions; do
21815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21816    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21818    break 2
21819  fi
21820done
21821  done
21822IFS=$as_save_IFS
21823
21824  ;;
21825esac
21826fi
21827OTOOL=$ac_cv_path_OTOOL
21828if test -n "$OTOOL"; then
21829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21830$as_echo "$OTOOL" >&6; }
21831else
21832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21833$as_echo "no" >&6; }
21834fi
21835
21836
21837  test -n "$OTOOL" && break
21838done
21839
21840  else
21841    # The variable is set, but is it from the command line or the environment?
21842
21843    # Try to remove the string !OTOOL! from our list.
21844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21846      # If it failed, the variable was not from the command line. Ignore it,
21847      # but warn the user (except for BASH, which is always set by the calling BASH).
21848      if test "xOTOOL" != xBASH; then
21849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21850$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21851      fi
21852      # Try to locate tool using the code snippet
21853      for ac_prog in otool
21854do
21855  # Extract the first word of "$ac_prog", so it can be a program name with args.
21856set dummy $ac_prog; ac_word=$2
21857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21858$as_echo_n "checking for $ac_word... " >&6; }
21859if ${ac_cv_path_OTOOL+:} false; then :
21860  $as_echo_n "(cached) " >&6
21861else
21862  case $OTOOL in
21863  [\\/]* | ?:[\\/]*)
21864  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21865  ;;
21866  *)
21867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21868for as_dir in $PATH
21869do
21870  IFS=$as_save_IFS
21871  test -z "$as_dir" && as_dir=.
21872    for ac_exec_ext in '' $ac_executable_extensions; do
21873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21874    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21876    break 2
21877  fi
21878done
21879  done
21880IFS=$as_save_IFS
21881
21882  ;;
21883esac
21884fi
21885OTOOL=$ac_cv_path_OTOOL
21886if test -n "$OTOOL"; then
21887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21888$as_echo "$OTOOL" >&6; }
21889else
21890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21891$as_echo "no" >&6; }
21892fi
21893
21894
21895  test -n "$OTOOL" && break
21896done
21897
21898    else
21899      # If it succeeded, then it was overridden by the user. We will use it
21900      # for the tool.
21901
21902      # First remove it from the list of overridden variables, so we can test
21903      # for unknown variables in the end.
21904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21905
21906      # Check if we try to supply an empty value
21907      if test "x$OTOOL" = x; then
21908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21909$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21911$as_echo_n "checking for OTOOL... " >&6; }
21912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21913$as_echo "disabled" >&6; }
21914      else
21915        # Check if the provided tool contains a complete path.
21916        tool_specified="$OTOOL"
21917        tool_basename="${tool_specified##*/}"
21918        if test "x$tool_basename" = "x$tool_specified"; then
21919          # A command without a complete path is provided, search $PATH.
21920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21921$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21922          # Extract the first word of "$tool_basename", so it can be a program name with args.
21923set dummy $tool_basename; ac_word=$2
21924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21925$as_echo_n "checking for $ac_word... " >&6; }
21926if ${ac_cv_path_OTOOL+:} false; then :
21927  $as_echo_n "(cached) " >&6
21928else
21929  case $OTOOL in
21930  [\\/]* | ?:[\\/]*)
21931  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21932  ;;
21933  *)
21934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21935for as_dir in $PATH
21936do
21937  IFS=$as_save_IFS
21938  test -z "$as_dir" && as_dir=.
21939    for ac_exec_ext in '' $ac_executable_extensions; do
21940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21941    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21943    break 2
21944  fi
21945done
21946  done
21947IFS=$as_save_IFS
21948
21949  ;;
21950esac
21951fi
21952OTOOL=$ac_cv_path_OTOOL
21953if test -n "$OTOOL"; then
21954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21955$as_echo "$OTOOL" >&6; }
21956else
21957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21958$as_echo "no" >&6; }
21959fi
21960
21961
21962          if test "x$OTOOL" = x; then
21963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21964          fi
21965        else
21966          # Otherwise we believe it is a complete path. Use it as it is.
21967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21968$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21970$as_echo_n "checking for OTOOL... " >&6; }
21971          if test ! -x "$tool_specified"; then
21972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21973$as_echo "not found" >&6; }
21974            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21975          fi
21976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21977$as_echo "$tool_specified" >&6; }
21978        fi
21979      fi
21980    fi
21981
21982  fi
21983
21984
21985  if test "x$OTOOL" = "x"; then
21986    OTOOL="true"
21987  fi
21988
21989
21990  # Publish this variable in the help.
21991
21992
21993  if [ -z "${READELF+x}" ]; then
21994    # The variable is not set by user, try to locate tool using the code snippet
21995    for ac_prog in greadelf readelf
21996do
21997  # Extract the first word of "$ac_prog", so it can be a program name with args.
21998set dummy $ac_prog; ac_word=$2
21999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22000$as_echo_n "checking for $ac_word... " >&6; }
22001if ${ac_cv_path_READELF+:} false; then :
22002  $as_echo_n "(cached) " >&6
22003else
22004  case $READELF in
22005  [\\/]* | ?:[\\/]*)
22006  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22007  ;;
22008  *)
22009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22010for as_dir in $PATH
22011do
22012  IFS=$as_save_IFS
22013  test -z "$as_dir" && as_dir=.
22014    for ac_exec_ext in '' $ac_executable_extensions; do
22015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22016    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22018    break 2
22019  fi
22020done
22021  done
22022IFS=$as_save_IFS
22023
22024  ;;
22025esac
22026fi
22027READELF=$ac_cv_path_READELF
22028if test -n "$READELF"; then
22029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22030$as_echo "$READELF" >&6; }
22031else
22032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22033$as_echo "no" >&6; }
22034fi
22035
22036
22037  test -n "$READELF" && break
22038done
22039
22040  else
22041    # The variable is set, but is it from the command line or the environment?
22042
22043    # Try to remove the string !READELF! from our list.
22044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22046      # If it failed, the variable was not from the command line. Ignore it,
22047      # but warn the user (except for BASH, which is always set by the calling BASH).
22048      if test "xREADELF" != xBASH; then
22049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22050$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22051      fi
22052      # Try to locate tool using the code snippet
22053      for ac_prog in greadelf readelf
22054do
22055  # Extract the first word of "$ac_prog", so it can be a program name with args.
22056set dummy $ac_prog; ac_word=$2
22057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22058$as_echo_n "checking for $ac_word... " >&6; }
22059if ${ac_cv_path_READELF+:} false; then :
22060  $as_echo_n "(cached) " >&6
22061else
22062  case $READELF in
22063  [\\/]* | ?:[\\/]*)
22064  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22065  ;;
22066  *)
22067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22068for as_dir in $PATH
22069do
22070  IFS=$as_save_IFS
22071  test -z "$as_dir" && as_dir=.
22072    for ac_exec_ext in '' $ac_executable_extensions; do
22073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22074    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22076    break 2
22077  fi
22078done
22079  done
22080IFS=$as_save_IFS
22081
22082  ;;
22083esac
22084fi
22085READELF=$ac_cv_path_READELF
22086if test -n "$READELF"; then
22087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22088$as_echo "$READELF" >&6; }
22089else
22090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22091$as_echo "no" >&6; }
22092fi
22093
22094
22095  test -n "$READELF" && break
22096done
22097
22098    else
22099      # If it succeeded, then it was overridden by the user. We will use it
22100      # for the tool.
22101
22102      # First remove it from the list of overridden variables, so we can test
22103      # for unknown variables in the end.
22104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22105
22106      # Check if we try to supply an empty value
22107      if test "x$READELF" = x; then
22108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22109$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22111$as_echo_n "checking for READELF... " >&6; }
22112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22113$as_echo "disabled" >&6; }
22114      else
22115        # Check if the provided tool contains a complete path.
22116        tool_specified="$READELF"
22117        tool_basename="${tool_specified##*/}"
22118        if test "x$tool_basename" = "x$tool_specified"; then
22119          # A command without a complete path is provided, search $PATH.
22120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22121$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22122          # Extract the first word of "$tool_basename", so it can be a program name with args.
22123set dummy $tool_basename; ac_word=$2
22124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22125$as_echo_n "checking for $ac_word... " >&6; }
22126if ${ac_cv_path_READELF+:} false; then :
22127  $as_echo_n "(cached) " >&6
22128else
22129  case $READELF in
22130  [\\/]* | ?:[\\/]*)
22131  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22132  ;;
22133  *)
22134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22135for as_dir in $PATH
22136do
22137  IFS=$as_save_IFS
22138  test -z "$as_dir" && as_dir=.
22139    for ac_exec_ext in '' $ac_executable_extensions; do
22140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22141    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22143    break 2
22144  fi
22145done
22146  done
22147IFS=$as_save_IFS
22148
22149  ;;
22150esac
22151fi
22152READELF=$ac_cv_path_READELF
22153if test -n "$READELF"; then
22154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22155$as_echo "$READELF" >&6; }
22156else
22157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22158$as_echo "no" >&6; }
22159fi
22160
22161
22162          if test "x$READELF" = x; then
22163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22164          fi
22165        else
22166          # Otherwise we believe it is a complete path. Use it as it is.
22167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22168$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22170$as_echo_n "checking for READELF... " >&6; }
22171          if test ! -x "$tool_specified"; then
22172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22173$as_echo "not found" >&6; }
22174            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22175          fi
22176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22177$as_echo "$tool_specified" >&6; }
22178        fi
22179      fi
22180    fi
22181
22182  fi
22183
22184
22185
22186
22187  # Publish this variable in the help.
22188
22189
22190  if [ -z "${HG+x}" ]; then
22191    # The variable is not set by user, try to locate tool using the code snippet
22192    for ac_prog in hg
22193do
22194  # Extract the first word of "$ac_prog", so it can be a program name with args.
22195set dummy $ac_prog; ac_word=$2
22196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22197$as_echo_n "checking for $ac_word... " >&6; }
22198if ${ac_cv_path_HG+:} false; then :
22199  $as_echo_n "(cached) " >&6
22200else
22201  case $HG in
22202  [\\/]* | ?:[\\/]*)
22203  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22204  ;;
22205  *)
22206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22207for as_dir in $PATH
22208do
22209  IFS=$as_save_IFS
22210  test -z "$as_dir" && as_dir=.
22211    for ac_exec_ext in '' $ac_executable_extensions; do
22212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22213    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22215    break 2
22216  fi
22217done
22218  done
22219IFS=$as_save_IFS
22220
22221  ;;
22222esac
22223fi
22224HG=$ac_cv_path_HG
22225if test -n "$HG"; then
22226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22227$as_echo "$HG" >&6; }
22228else
22229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22230$as_echo "no" >&6; }
22231fi
22232
22233
22234  test -n "$HG" && break
22235done
22236
22237  else
22238    # The variable is set, but is it from the command line or the environment?
22239
22240    # Try to remove the string !HG! from our list.
22241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22243      # If it failed, the variable was not from the command line. Ignore it,
22244      # but warn the user (except for BASH, which is always set by the calling BASH).
22245      if test "xHG" != xBASH; then
22246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22247$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22248      fi
22249      # Try to locate tool using the code snippet
22250      for ac_prog in hg
22251do
22252  # Extract the first word of "$ac_prog", so it can be a program name with args.
22253set dummy $ac_prog; ac_word=$2
22254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22255$as_echo_n "checking for $ac_word... " >&6; }
22256if ${ac_cv_path_HG+:} false; then :
22257  $as_echo_n "(cached) " >&6
22258else
22259  case $HG in
22260  [\\/]* | ?:[\\/]*)
22261  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22262  ;;
22263  *)
22264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22265for as_dir in $PATH
22266do
22267  IFS=$as_save_IFS
22268  test -z "$as_dir" && as_dir=.
22269    for ac_exec_ext in '' $ac_executable_extensions; do
22270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22271    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22273    break 2
22274  fi
22275done
22276  done
22277IFS=$as_save_IFS
22278
22279  ;;
22280esac
22281fi
22282HG=$ac_cv_path_HG
22283if test -n "$HG"; then
22284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22285$as_echo "$HG" >&6; }
22286else
22287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22288$as_echo "no" >&6; }
22289fi
22290
22291
22292  test -n "$HG" && break
22293done
22294
22295    else
22296      # If it succeeded, then it was overridden by the user. We will use it
22297      # for the tool.
22298
22299      # First remove it from the list of overridden variables, so we can test
22300      # for unknown variables in the end.
22301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22302
22303      # Check if we try to supply an empty value
22304      if test "x$HG" = x; then
22305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22306$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22308$as_echo_n "checking for HG... " >&6; }
22309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22310$as_echo "disabled" >&6; }
22311      else
22312        # Check if the provided tool contains a complete path.
22313        tool_specified="$HG"
22314        tool_basename="${tool_specified##*/}"
22315        if test "x$tool_basename" = "x$tool_specified"; then
22316          # A command without a complete path is provided, search $PATH.
22317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22318$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22319          # Extract the first word of "$tool_basename", so it can be a program name with args.
22320set dummy $tool_basename; ac_word=$2
22321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22322$as_echo_n "checking for $ac_word... " >&6; }
22323if ${ac_cv_path_HG+:} false; then :
22324  $as_echo_n "(cached) " >&6
22325else
22326  case $HG in
22327  [\\/]* | ?:[\\/]*)
22328  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22329  ;;
22330  *)
22331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22332for as_dir in $PATH
22333do
22334  IFS=$as_save_IFS
22335  test -z "$as_dir" && as_dir=.
22336    for ac_exec_ext in '' $ac_executable_extensions; do
22337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22338    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22340    break 2
22341  fi
22342done
22343  done
22344IFS=$as_save_IFS
22345
22346  ;;
22347esac
22348fi
22349HG=$ac_cv_path_HG
22350if test -n "$HG"; then
22351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22352$as_echo "$HG" >&6; }
22353else
22354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22355$as_echo "no" >&6; }
22356fi
22357
22358
22359          if test "x$HG" = x; then
22360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22361          fi
22362        else
22363          # Otherwise we believe it is a complete path. Use it as it is.
22364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22365$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22367$as_echo_n "checking for HG... " >&6; }
22368          if test ! -x "$tool_specified"; then
22369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22370$as_echo "not found" >&6; }
22371            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22372          fi
22373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22374$as_echo "$tool_specified" >&6; }
22375        fi
22376      fi
22377    fi
22378
22379  fi
22380
22381
22382
22383
22384  # Publish this variable in the help.
22385
22386
22387  if [ -z "${STAT+x}" ]; then
22388    # The variable is not set by user, try to locate tool using the code snippet
22389    for ac_prog in stat
22390do
22391  # Extract the first word of "$ac_prog", so it can be a program name with args.
22392set dummy $ac_prog; ac_word=$2
22393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22394$as_echo_n "checking for $ac_word... " >&6; }
22395if ${ac_cv_path_STAT+:} false; then :
22396  $as_echo_n "(cached) " >&6
22397else
22398  case $STAT in
22399  [\\/]* | ?:[\\/]*)
22400  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22401  ;;
22402  *)
22403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22404for as_dir in $PATH
22405do
22406  IFS=$as_save_IFS
22407  test -z "$as_dir" && as_dir=.
22408    for ac_exec_ext in '' $ac_executable_extensions; do
22409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22410    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22412    break 2
22413  fi
22414done
22415  done
22416IFS=$as_save_IFS
22417
22418  ;;
22419esac
22420fi
22421STAT=$ac_cv_path_STAT
22422if test -n "$STAT"; then
22423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22424$as_echo "$STAT" >&6; }
22425else
22426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22427$as_echo "no" >&6; }
22428fi
22429
22430
22431  test -n "$STAT" && break
22432done
22433
22434  else
22435    # The variable is set, but is it from the command line or the environment?
22436
22437    # Try to remove the string !STAT! from our list.
22438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22440      # If it failed, the variable was not from the command line. Ignore it,
22441      # but warn the user (except for BASH, which is always set by the calling BASH).
22442      if test "xSTAT" != xBASH; then
22443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22444$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22445      fi
22446      # Try to locate tool using the code snippet
22447      for ac_prog in stat
22448do
22449  # Extract the first word of "$ac_prog", so it can be a program name with args.
22450set dummy $ac_prog; ac_word=$2
22451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22452$as_echo_n "checking for $ac_word... " >&6; }
22453if ${ac_cv_path_STAT+:} false; then :
22454  $as_echo_n "(cached) " >&6
22455else
22456  case $STAT in
22457  [\\/]* | ?:[\\/]*)
22458  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22459  ;;
22460  *)
22461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22462for as_dir in $PATH
22463do
22464  IFS=$as_save_IFS
22465  test -z "$as_dir" && as_dir=.
22466    for ac_exec_ext in '' $ac_executable_extensions; do
22467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22468    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22470    break 2
22471  fi
22472done
22473  done
22474IFS=$as_save_IFS
22475
22476  ;;
22477esac
22478fi
22479STAT=$ac_cv_path_STAT
22480if test -n "$STAT"; then
22481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22482$as_echo "$STAT" >&6; }
22483else
22484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22485$as_echo "no" >&6; }
22486fi
22487
22488
22489  test -n "$STAT" && break
22490done
22491
22492    else
22493      # If it succeeded, then it was overridden by the user. We will use it
22494      # for the tool.
22495
22496      # First remove it from the list of overridden variables, so we can test
22497      # for unknown variables in the end.
22498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22499
22500      # Check if we try to supply an empty value
22501      if test "x$STAT" = x; then
22502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22503$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22505$as_echo_n "checking for STAT... " >&6; }
22506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22507$as_echo "disabled" >&6; }
22508      else
22509        # Check if the provided tool contains a complete path.
22510        tool_specified="$STAT"
22511        tool_basename="${tool_specified##*/}"
22512        if test "x$tool_basename" = "x$tool_specified"; then
22513          # A command without a complete path is provided, search $PATH.
22514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22515$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22516          # Extract the first word of "$tool_basename", so it can be a program name with args.
22517set dummy $tool_basename; ac_word=$2
22518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22519$as_echo_n "checking for $ac_word... " >&6; }
22520if ${ac_cv_path_STAT+:} false; then :
22521  $as_echo_n "(cached) " >&6
22522else
22523  case $STAT in
22524  [\\/]* | ?:[\\/]*)
22525  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22526  ;;
22527  *)
22528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22529for as_dir in $PATH
22530do
22531  IFS=$as_save_IFS
22532  test -z "$as_dir" && as_dir=.
22533    for ac_exec_ext in '' $ac_executable_extensions; do
22534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22535    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22537    break 2
22538  fi
22539done
22540  done
22541IFS=$as_save_IFS
22542
22543  ;;
22544esac
22545fi
22546STAT=$ac_cv_path_STAT
22547if test -n "$STAT"; then
22548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22549$as_echo "$STAT" >&6; }
22550else
22551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22552$as_echo "no" >&6; }
22553fi
22554
22555
22556          if test "x$STAT" = x; then
22557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22558          fi
22559        else
22560          # Otherwise we believe it is a complete path. Use it as it is.
22561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22562$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22564$as_echo_n "checking for STAT... " >&6; }
22565          if test ! -x "$tool_specified"; then
22566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22567$as_echo "not found" >&6; }
22568            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22569          fi
22570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22571$as_echo "$tool_specified" >&6; }
22572        fi
22573      fi
22574    fi
22575
22576  fi
22577
22578
22579
22580
22581  # Publish this variable in the help.
22582
22583
22584  if [ -z "${TIME+x}" ]; then
22585    # The variable is not set by user, try to locate tool using the code snippet
22586    for ac_prog in time
22587do
22588  # Extract the first word of "$ac_prog", so it can be a program name with args.
22589set dummy $ac_prog; ac_word=$2
22590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22591$as_echo_n "checking for $ac_word... " >&6; }
22592if ${ac_cv_path_TIME+:} false; then :
22593  $as_echo_n "(cached) " >&6
22594else
22595  case $TIME in
22596  [\\/]* | ?:[\\/]*)
22597  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22598  ;;
22599  *)
22600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22601for as_dir in $PATH
22602do
22603  IFS=$as_save_IFS
22604  test -z "$as_dir" && as_dir=.
22605    for ac_exec_ext in '' $ac_executable_extensions; do
22606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22607    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22609    break 2
22610  fi
22611done
22612  done
22613IFS=$as_save_IFS
22614
22615  ;;
22616esac
22617fi
22618TIME=$ac_cv_path_TIME
22619if test -n "$TIME"; then
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22621$as_echo "$TIME" >&6; }
22622else
22623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22624$as_echo "no" >&6; }
22625fi
22626
22627
22628  test -n "$TIME" && break
22629done
22630
22631  else
22632    # The variable is set, but is it from the command line or the environment?
22633
22634    # Try to remove the string !TIME! from our list.
22635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22637      # If it failed, the variable was not from the command line. Ignore it,
22638      # but warn the user (except for BASH, which is always set by the calling BASH).
22639      if test "xTIME" != xBASH; then
22640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22641$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22642      fi
22643      # Try to locate tool using the code snippet
22644      for ac_prog in time
22645do
22646  # Extract the first word of "$ac_prog", so it can be a program name with args.
22647set dummy $ac_prog; ac_word=$2
22648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22649$as_echo_n "checking for $ac_word... " >&6; }
22650if ${ac_cv_path_TIME+:} false; then :
22651  $as_echo_n "(cached) " >&6
22652else
22653  case $TIME in
22654  [\\/]* | ?:[\\/]*)
22655  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22656  ;;
22657  *)
22658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22659for as_dir in $PATH
22660do
22661  IFS=$as_save_IFS
22662  test -z "$as_dir" && as_dir=.
22663    for ac_exec_ext in '' $ac_executable_extensions; do
22664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22665    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22667    break 2
22668  fi
22669done
22670  done
22671IFS=$as_save_IFS
22672
22673  ;;
22674esac
22675fi
22676TIME=$ac_cv_path_TIME
22677if test -n "$TIME"; then
22678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22679$as_echo "$TIME" >&6; }
22680else
22681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22682$as_echo "no" >&6; }
22683fi
22684
22685
22686  test -n "$TIME" && break
22687done
22688
22689    else
22690      # If it succeeded, then it was overridden by the user. We will use it
22691      # for the tool.
22692
22693      # First remove it from the list of overridden variables, so we can test
22694      # for unknown variables in the end.
22695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22696
22697      # Check if we try to supply an empty value
22698      if test "x$TIME" = x; then
22699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22700$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22702$as_echo_n "checking for TIME... " >&6; }
22703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22704$as_echo "disabled" >&6; }
22705      else
22706        # Check if the provided tool contains a complete path.
22707        tool_specified="$TIME"
22708        tool_basename="${tool_specified##*/}"
22709        if test "x$tool_basename" = "x$tool_specified"; then
22710          # A command without a complete path is provided, search $PATH.
22711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22712$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22713          # Extract the first word of "$tool_basename", so it can be a program name with args.
22714set dummy $tool_basename; ac_word=$2
22715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22716$as_echo_n "checking for $ac_word... " >&6; }
22717if ${ac_cv_path_TIME+:} false; then :
22718  $as_echo_n "(cached) " >&6
22719else
22720  case $TIME in
22721  [\\/]* | ?:[\\/]*)
22722  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22723  ;;
22724  *)
22725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22726for as_dir in $PATH
22727do
22728  IFS=$as_save_IFS
22729  test -z "$as_dir" && as_dir=.
22730    for ac_exec_ext in '' $ac_executable_extensions; do
22731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22732    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22734    break 2
22735  fi
22736done
22737  done
22738IFS=$as_save_IFS
22739
22740  ;;
22741esac
22742fi
22743TIME=$ac_cv_path_TIME
22744if test -n "$TIME"; then
22745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22746$as_echo "$TIME" >&6; }
22747else
22748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22749$as_echo "no" >&6; }
22750fi
22751
22752
22753          if test "x$TIME" = x; then
22754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22755          fi
22756        else
22757          # Otherwise we believe it is a complete path. Use it as it is.
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22759$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22761$as_echo_n "checking for TIME... " >&6; }
22762          if test ! -x "$tool_specified"; then
22763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22764$as_echo "not found" >&6; }
22765            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22766          fi
22767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22768$as_echo "$tool_specified" >&6; }
22769        fi
22770      fi
22771    fi
22772
22773  fi
22774
22775
22776
22777
22778  # Publish this variable in the help.
22779
22780
22781  if [ -z "${DTRACE+x}" ]; then
22782    # The variable is not set by user, try to locate tool using the code snippet
22783    for ac_prog in dtrace
22784do
22785  # Extract the first word of "$ac_prog", so it can be a program name with args.
22786set dummy $ac_prog; ac_word=$2
22787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22788$as_echo_n "checking for $ac_word... " >&6; }
22789if ${ac_cv_path_DTRACE+:} false; then :
22790  $as_echo_n "(cached) " >&6
22791else
22792  case $DTRACE in
22793  [\\/]* | ?:[\\/]*)
22794  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22795  ;;
22796  *)
22797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22798for as_dir in $PATH
22799do
22800  IFS=$as_save_IFS
22801  test -z "$as_dir" && as_dir=.
22802    for ac_exec_ext in '' $ac_executable_extensions; do
22803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22804    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22806    break 2
22807  fi
22808done
22809  done
22810IFS=$as_save_IFS
22811
22812  ;;
22813esac
22814fi
22815DTRACE=$ac_cv_path_DTRACE
22816if test -n "$DTRACE"; then
22817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22818$as_echo "$DTRACE" >&6; }
22819else
22820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22821$as_echo "no" >&6; }
22822fi
22823
22824
22825  test -n "$DTRACE" && break
22826done
22827
22828  else
22829    # The variable is set, but is it from the command line or the environment?
22830
22831    # Try to remove the string !DTRACE! from our list.
22832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22834      # If it failed, the variable was not from the command line. Ignore it,
22835      # but warn the user (except for BASH, which is always set by the calling BASH).
22836      if test "xDTRACE" != xBASH; then
22837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22838$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22839      fi
22840      # Try to locate tool using the code snippet
22841      for ac_prog in dtrace
22842do
22843  # Extract the first word of "$ac_prog", so it can be a program name with args.
22844set dummy $ac_prog; ac_word=$2
22845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22846$as_echo_n "checking for $ac_word... " >&6; }
22847if ${ac_cv_path_DTRACE+:} false; then :
22848  $as_echo_n "(cached) " >&6
22849else
22850  case $DTRACE in
22851  [\\/]* | ?:[\\/]*)
22852  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22853  ;;
22854  *)
22855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22856for as_dir in $PATH
22857do
22858  IFS=$as_save_IFS
22859  test -z "$as_dir" && as_dir=.
22860    for ac_exec_ext in '' $ac_executable_extensions; do
22861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22862    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22864    break 2
22865  fi
22866done
22867  done
22868IFS=$as_save_IFS
22869
22870  ;;
22871esac
22872fi
22873DTRACE=$ac_cv_path_DTRACE
22874if test -n "$DTRACE"; then
22875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22876$as_echo "$DTRACE" >&6; }
22877else
22878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22879$as_echo "no" >&6; }
22880fi
22881
22882
22883  test -n "$DTRACE" && break
22884done
22885
22886    else
22887      # If it succeeded, then it was overridden by the user. We will use it
22888      # for the tool.
22889
22890      # First remove it from the list of overridden variables, so we can test
22891      # for unknown variables in the end.
22892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22893
22894      # Check if we try to supply an empty value
22895      if test "x$DTRACE" = x; then
22896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22897$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22899$as_echo_n "checking for DTRACE... " >&6; }
22900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22901$as_echo "disabled" >&6; }
22902      else
22903        # Check if the provided tool contains a complete path.
22904        tool_specified="$DTRACE"
22905        tool_basename="${tool_specified##*/}"
22906        if test "x$tool_basename" = "x$tool_specified"; then
22907          # A command without a complete path is provided, search $PATH.
22908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22909$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22910          # Extract the first word of "$tool_basename", so it can be a program name with args.
22911set dummy $tool_basename; ac_word=$2
22912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22913$as_echo_n "checking for $ac_word... " >&6; }
22914if ${ac_cv_path_DTRACE+:} false; then :
22915  $as_echo_n "(cached) " >&6
22916else
22917  case $DTRACE in
22918  [\\/]* | ?:[\\/]*)
22919  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22920  ;;
22921  *)
22922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22923for as_dir in $PATH
22924do
22925  IFS=$as_save_IFS
22926  test -z "$as_dir" && as_dir=.
22927    for ac_exec_ext in '' $ac_executable_extensions; do
22928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22929    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22931    break 2
22932  fi
22933done
22934  done
22935IFS=$as_save_IFS
22936
22937  ;;
22938esac
22939fi
22940DTRACE=$ac_cv_path_DTRACE
22941if test -n "$DTRACE"; then
22942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22943$as_echo "$DTRACE" >&6; }
22944else
22945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22946$as_echo "no" >&6; }
22947fi
22948
22949
22950          if test "x$DTRACE" = x; then
22951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22952          fi
22953        else
22954          # Otherwise we believe it is a complete path. Use it as it is.
22955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22956$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22958$as_echo_n "checking for DTRACE... " >&6; }
22959          if test ! -x "$tool_specified"; then
22960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22961$as_echo "not found" >&6; }
22962            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22963          fi
22964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22965$as_echo "$tool_specified" >&6; }
22966        fi
22967      fi
22968    fi
22969
22970  fi
22971
22972
22973
22974
22975  # Publish this variable in the help.
22976
22977
22978  if [ -z "${PATCH+x}" ]; then
22979    # The variable is not set by user, try to locate tool using the code snippet
22980    for ac_prog in gpatch patch
22981do
22982  # Extract the first word of "$ac_prog", so it can be a program name with args.
22983set dummy $ac_prog; ac_word=$2
22984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22985$as_echo_n "checking for $ac_word... " >&6; }
22986if ${ac_cv_path_PATCH+:} false; then :
22987  $as_echo_n "(cached) " >&6
22988else
22989  case $PATCH in
22990  [\\/]* | ?:[\\/]*)
22991  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22992  ;;
22993  *)
22994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22995for as_dir in $PATH
22996do
22997  IFS=$as_save_IFS
22998  test -z "$as_dir" && as_dir=.
22999    for ac_exec_ext in '' $ac_executable_extensions; do
23000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23001    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23003    break 2
23004  fi
23005done
23006  done
23007IFS=$as_save_IFS
23008
23009  ;;
23010esac
23011fi
23012PATCH=$ac_cv_path_PATCH
23013if test -n "$PATCH"; then
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23015$as_echo "$PATCH" >&6; }
23016else
23017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23018$as_echo "no" >&6; }
23019fi
23020
23021
23022  test -n "$PATCH" && break
23023done
23024
23025  else
23026    # The variable is set, but is it from the command line or the environment?
23027
23028    # Try to remove the string !PATCH! from our list.
23029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23031      # If it failed, the variable was not from the command line. Ignore it,
23032      # but warn the user (except for BASH, which is always set by the calling BASH).
23033      if test "xPATCH" != xBASH; then
23034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23035$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23036      fi
23037      # Try to locate tool using the code snippet
23038      for ac_prog in gpatch patch
23039do
23040  # Extract the first word of "$ac_prog", so it can be a program name with args.
23041set dummy $ac_prog; ac_word=$2
23042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23043$as_echo_n "checking for $ac_word... " >&6; }
23044if ${ac_cv_path_PATCH+:} false; then :
23045  $as_echo_n "(cached) " >&6
23046else
23047  case $PATCH in
23048  [\\/]* | ?:[\\/]*)
23049  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23050  ;;
23051  *)
23052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23053for as_dir in $PATH
23054do
23055  IFS=$as_save_IFS
23056  test -z "$as_dir" && as_dir=.
23057    for ac_exec_ext in '' $ac_executable_extensions; do
23058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23059    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23061    break 2
23062  fi
23063done
23064  done
23065IFS=$as_save_IFS
23066
23067  ;;
23068esac
23069fi
23070PATCH=$ac_cv_path_PATCH
23071if test -n "$PATCH"; then
23072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23073$as_echo "$PATCH" >&6; }
23074else
23075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23076$as_echo "no" >&6; }
23077fi
23078
23079
23080  test -n "$PATCH" && break
23081done
23082
23083    else
23084      # If it succeeded, then it was overridden by the user. We will use it
23085      # for the tool.
23086
23087      # First remove it from the list of overridden variables, so we can test
23088      # for unknown variables in the end.
23089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23090
23091      # Check if we try to supply an empty value
23092      if test "x$PATCH" = x; then
23093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23094$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23096$as_echo_n "checking for PATCH... " >&6; }
23097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23098$as_echo "disabled" >&6; }
23099      else
23100        # Check if the provided tool contains a complete path.
23101        tool_specified="$PATCH"
23102        tool_basename="${tool_specified##*/}"
23103        if test "x$tool_basename" = "x$tool_specified"; then
23104          # A command without a complete path is provided, search $PATH.
23105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23106$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23107          # Extract the first word of "$tool_basename", so it can be a program name with args.
23108set dummy $tool_basename; ac_word=$2
23109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23110$as_echo_n "checking for $ac_word... " >&6; }
23111if ${ac_cv_path_PATCH+:} false; then :
23112  $as_echo_n "(cached) " >&6
23113else
23114  case $PATCH in
23115  [\\/]* | ?:[\\/]*)
23116  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23117  ;;
23118  *)
23119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23120for as_dir in $PATH
23121do
23122  IFS=$as_save_IFS
23123  test -z "$as_dir" && as_dir=.
23124    for ac_exec_ext in '' $ac_executable_extensions; do
23125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23126    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23128    break 2
23129  fi
23130done
23131  done
23132IFS=$as_save_IFS
23133
23134  ;;
23135esac
23136fi
23137PATCH=$ac_cv_path_PATCH
23138if test -n "$PATCH"; then
23139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23140$as_echo "$PATCH" >&6; }
23141else
23142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23143$as_echo "no" >&6; }
23144fi
23145
23146
23147          if test "x$PATCH" = x; then
23148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23149          fi
23150        else
23151          # Otherwise we believe it is a complete path. Use it as it is.
23152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23153$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23155$as_echo_n "checking for PATCH... " >&6; }
23156          if test ! -x "$tool_specified"; then
23157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23158$as_echo "not found" >&6; }
23159            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23160          fi
23161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23162$as_echo "$tool_specified" >&6; }
23163        fi
23164      fi
23165    fi
23166
23167  fi
23168
23169
23170  # Check if it's GNU time
23171  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23172  if test "x$IS_GNU_TIME" != x; then
23173    IS_GNU_TIME=yes
23174  else
23175    IS_GNU_TIME=no
23176  fi
23177
23178
23179  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23180
23181
23182
23183  # Publish this variable in the help.
23184
23185
23186  if [ -z "${DSYMUTIL+x}" ]; then
23187    # The variable is not set by user, try to locate tool using the code snippet
23188    for ac_prog in dsymutil
23189do
23190  # Extract the first word of "$ac_prog", so it can be a program name with args.
23191set dummy $ac_prog; ac_word=$2
23192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23193$as_echo_n "checking for $ac_word... " >&6; }
23194if ${ac_cv_path_DSYMUTIL+:} false; then :
23195  $as_echo_n "(cached) " >&6
23196else
23197  case $DSYMUTIL in
23198  [\\/]* | ?:[\\/]*)
23199  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23200  ;;
23201  *)
23202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23203for as_dir in $PATH
23204do
23205  IFS=$as_save_IFS
23206  test -z "$as_dir" && as_dir=.
23207    for ac_exec_ext in '' $ac_executable_extensions; do
23208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23209    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23211    break 2
23212  fi
23213done
23214  done
23215IFS=$as_save_IFS
23216
23217  ;;
23218esac
23219fi
23220DSYMUTIL=$ac_cv_path_DSYMUTIL
23221if test -n "$DSYMUTIL"; then
23222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23223$as_echo "$DSYMUTIL" >&6; }
23224else
23225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23226$as_echo "no" >&6; }
23227fi
23228
23229
23230  test -n "$DSYMUTIL" && break
23231done
23232
23233  else
23234    # The variable is set, but is it from the command line or the environment?
23235
23236    # Try to remove the string !DSYMUTIL! from our list.
23237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23239      # If it failed, the variable was not from the command line. Ignore it,
23240      # but warn the user (except for BASH, which is always set by the calling BASH).
23241      if test "xDSYMUTIL" != xBASH; then
23242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23243$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23244      fi
23245      # Try to locate tool using the code snippet
23246      for ac_prog in dsymutil
23247do
23248  # Extract the first word of "$ac_prog", so it can be a program name with args.
23249set dummy $ac_prog; ac_word=$2
23250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23251$as_echo_n "checking for $ac_word... " >&6; }
23252if ${ac_cv_path_DSYMUTIL+:} false; then :
23253  $as_echo_n "(cached) " >&6
23254else
23255  case $DSYMUTIL in
23256  [\\/]* | ?:[\\/]*)
23257  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23258  ;;
23259  *)
23260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23261for as_dir in $PATH
23262do
23263  IFS=$as_save_IFS
23264  test -z "$as_dir" && as_dir=.
23265    for ac_exec_ext in '' $ac_executable_extensions; do
23266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23267    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23269    break 2
23270  fi
23271done
23272  done
23273IFS=$as_save_IFS
23274
23275  ;;
23276esac
23277fi
23278DSYMUTIL=$ac_cv_path_DSYMUTIL
23279if test -n "$DSYMUTIL"; then
23280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23281$as_echo "$DSYMUTIL" >&6; }
23282else
23283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23284$as_echo "no" >&6; }
23285fi
23286
23287
23288  test -n "$DSYMUTIL" && break
23289done
23290
23291    else
23292      # If it succeeded, then it was overridden by the user. We will use it
23293      # for the tool.
23294
23295      # First remove it from the list of overridden variables, so we can test
23296      # for unknown variables in the end.
23297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23298
23299      # Check if we try to supply an empty value
23300      if test "x$DSYMUTIL" = x; then
23301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23302$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23304$as_echo_n "checking for DSYMUTIL... " >&6; }
23305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23306$as_echo "disabled" >&6; }
23307      else
23308        # Check if the provided tool contains a complete path.
23309        tool_specified="$DSYMUTIL"
23310        tool_basename="${tool_specified##*/}"
23311        if test "x$tool_basename" = "x$tool_specified"; then
23312          # A command without a complete path is provided, search $PATH.
23313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23314$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23315          # Extract the first word of "$tool_basename", so it can be a program name with args.
23316set dummy $tool_basename; ac_word=$2
23317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23318$as_echo_n "checking for $ac_word... " >&6; }
23319if ${ac_cv_path_DSYMUTIL+:} false; then :
23320  $as_echo_n "(cached) " >&6
23321else
23322  case $DSYMUTIL in
23323  [\\/]* | ?:[\\/]*)
23324  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23325  ;;
23326  *)
23327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23328for as_dir in $PATH
23329do
23330  IFS=$as_save_IFS
23331  test -z "$as_dir" && as_dir=.
23332    for ac_exec_ext in '' $ac_executable_extensions; do
23333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23334    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23336    break 2
23337  fi
23338done
23339  done
23340IFS=$as_save_IFS
23341
23342  ;;
23343esac
23344fi
23345DSYMUTIL=$ac_cv_path_DSYMUTIL
23346if test -n "$DSYMUTIL"; then
23347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23348$as_echo "$DSYMUTIL" >&6; }
23349else
23350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23351$as_echo "no" >&6; }
23352fi
23353
23354
23355          if test "x$DSYMUTIL" = x; then
23356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23357          fi
23358        else
23359          # Otherwise we believe it is a complete path. Use it as it is.
23360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23361$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23363$as_echo_n "checking for DSYMUTIL... " >&6; }
23364          if test ! -x "$tool_specified"; then
23365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23366$as_echo "not found" >&6; }
23367            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23368          fi
23369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23370$as_echo "$tool_specified" >&6; }
23371        fi
23372      fi
23373    fi
23374
23375  fi
23376
23377
23378
23379  if test "x$DSYMUTIL" = x; then
23380    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23381  fi
23382
23383
23384
23385
23386
23387  # Publish this variable in the help.
23388
23389
23390  if [ -z "${XATTR+x}" ]; then
23391    # The variable is not set by user, try to locate tool using the code snippet
23392    for ac_prog in xattr
23393do
23394  # Extract the first word of "$ac_prog", so it can be a program name with args.
23395set dummy $ac_prog; ac_word=$2
23396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23397$as_echo_n "checking for $ac_word... " >&6; }
23398if ${ac_cv_path_XATTR+:} false; then :
23399  $as_echo_n "(cached) " >&6
23400else
23401  case $XATTR in
23402  [\\/]* | ?:[\\/]*)
23403  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23404  ;;
23405  *)
23406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23407for as_dir in $PATH
23408do
23409  IFS=$as_save_IFS
23410  test -z "$as_dir" && as_dir=.
23411    for ac_exec_ext in '' $ac_executable_extensions; do
23412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23413    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23415    break 2
23416  fi
23417done
23418  done
23419IFS=$as_save_IFS
23420
23421  ;;
23422esac
23423fi
23424XATTR=$ac_cv_path_XATTR
23425if test -n "$XATTR"; then
23426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23427$as_echo "$XATTR" >&6; }
23428else
23429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23430$as_echo "no" >&6; }
23431fi
23432
23433
23434  test -n "$XATTR" && break
23435done
23436
23437  else
23438    # The variable is set, but is it from the command line or the environment?
23439
23440    # Try to remove the string !XATTR! from our list.
23441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23443      # If it failed, the variable was not from the command line. Ignore it,
23444      # but warn the user (except for BASH, which is always set by the calling BASH).
23445      if test "xXATTR" != xBASH; then
23446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23447$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23448      fi
23449      # Try to locate tool using the code snippet
23450      for ac_prog in xattr
23451do
23452  # Extract the first word of "$ac_prog", so it can be a program name with args.
23453set dummy $ac_prog; ac_word=$2
23454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23455$as_echo_n "checking for $ac_word... " >&6; }
23456if ${ac_cv_path_XATTR+:} false; then :
23457  $as_echo_n "(cached) " >&6
23458else
23459  case $XATTR in
23460  [\\/]* | ?:[\\/]*)
23461  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23462  ;;
23463  *)
23464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23465for as_dir in $PATH
23466do
23467  IFS=$as_save_IFS
23468  test -z "$as_dir" && as_dir=.
23469    for ac_exec_ext in '' $ac_executable_extensions; do
23470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23471    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23473    break 2
23474  fi
23475done
23476  done
23477IFS=$as_save_IFS
23478
23479  ;;
23480esac
23481fi
23482XATTR=$ac_cv_path_XATTR
23483if test -n "$XATTR"; then
23484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23485$as_echo "$XATTR" >&6; }
23486else
23487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23488$as_echo "no" >&6; }
23489fi
23490
23491
23492  test -n "$XATTR" && break
23493done
23494
23495    else
23496      # If it succeeded, then it was overridden by the user. We will use it
23497      # for the tool.
23498
23499      # First remove it from the list of overridden variables, so we can test
23500      # for unknown variables in the end.
23501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23502
23503      # Check if we try to supply an empty value
23504      if test "x$XATTR" = x; then
23505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23506$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23508$as_echo_n "checking for XATTR... " >&6; }
23509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23510$as_echo "disabled" >&6; }
23511      else
23512        # Check if the provided tool contains a complete path.
23513        tool_specified="$XATTR"
23514        tool_basename="${tool_specified##*/}"
23515        if test "x$tool_basename" = "x$tool_specified"; then
23516          # A command without a complete path is provided, search $PATH.
23517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23518$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23519          # Extract the first word of "$tool_basename", so it can be a program name with args.
23520set dummy $tool_basename; ac_word=$2
23521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23522$as_echo_n "checking for $ac_word... " >&6; }
23523if ${ac_cv_path_XATTR+:} false; then :
23524  $as_echo_n "(cached) " >&6
23525else
23526  case $XATTR in
23527  [\\/]* | ?:[\\/]*)
23528  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23529  ;;
23530  *)
23531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23532for as_dir in $PATH
23533do
23534  IFS=$as_save_IFS
23535  test -z "$as_dir" && as_dir=.
23536    for ac_exec_ext in '' $ac_executable_extensions; do
23537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23538    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23540    break 2
23541  fi
23542done
23543  done
23544IFS=$as_save_IFS
23545
23546  ;;
23547esac
23548fi
23549XATTR=$ac_cv_path_XATTR
23550if test -n "$XATTR"; then
23551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23552$as_echo "$XATTR" >&6; }
23553else
23554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23555$as_echo "no" >&6; }
23556fi
23557
23558
23559          if test "x$XATTR" = x; then
23560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23561          fi
23562        else
23563          # Otherwise we believe it is a complete path. Use it as it is.
23564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23565$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23567$as_echo_n "checking for XATTR... " >&6; }
23568          if test ! -x "$tool_specified"; then
23569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23570$as_echo "not found" >&6; }
23571            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23572          fi
23573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23574$as_echo "$tool_specified" >&6; }
23575        fi
23576      fi
23577    fi
23578
23579  fi
23580
23581
23582
23583  if test "x$XATTR" = x; then
23584    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23585  fi
23586
23587
23588
23589
23590  # Publish this variable in the help.
23591
23592
23593  if [ -z "${CODESIGN+x}" ]; then
23594    # The variable is not set by user, try to locate tool using the code snippet
23595    for ac_prog in codesign
23596do
23597  # Extract the first word of "$ac_prog", so it can be a program name with args.
23598set dummy $ac_prog; ac_word=$2
23599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23600$as_echo_n "checking for $ac_word... " >&6; }
23601if ${ac_cv_path_CODESIGN+:} false; then :
23602  $as_echo_n "(cached) " >&6
23603else
23604  case $CODESIGN in
23605  [\\/]* | ?:[\\/]*)
23606  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23607  ;;
23608  *)
23609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23610for as_dir in $PATH
23611do
23612  IFS=$as_save_IFS
23613  test -z "$as_dir" && as_dir=.
23614    for ac_exec_ext in '' $ac_executable_extensions; do
23615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23616    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23618    break 2
23619  fi
23620done
23621  done
23622IFS=$as_save_IFS
23623
23624  ;;
23625esac
23626fi
23627CODESIGN=$ac_cv_path_CODESIGN
23628if test -n "$CODESIGN"; then
23629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23630$as_echo "$CODESIGN" >&6; }
23631else
23632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23633$as_echo "no" >&6; }
23634fi
23635
23636
23637  test -n "$CODESIGN" && break
23638done
23639
23640  else
23641    # The variable is set, but is it from the command line or the environment?
23642
23643    # Try to remove the string !CODESIGN! from our list.
23644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23646      # If it failed, the variable was not from the command line. Ignore it,
23647      # but warn the user (except for BASH, which is always set by the calling BASH).
23648      if test "xCODESIGN" != xBASH; then
23649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23650$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23651      fi
23652      # Try to locate tool using the code snippet
23653      for ac_prog in codesign
23654do
23655  # Extract the first word of "$ac_prog", so it can be a program name with args.
23656set dummy $ac_prog; ac_word=$2
23657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23658$as_echo_n "checking for $ac_word... " >&6; }
23659if ${ac_cv_path_CODESIGN+:} false; then :
23660  $as_echo_n "(cached) " >&6
23661else
23662  case $CODESIGN in
23663  [\\/]* | ?:[\\/]*)
23664  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23665  ;;
23666  *)
23667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23668for as_dir in $PATH
23669do
23670  IFS=$as_save_IFS
23671  test -z "$as_dir" && as_dir=.
23672    for ac_exec_ext in '' $ac_executable_extensions; do
23673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23674    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23676    break 2
23677  fi
23678done
23679  done
23680IFS=$as_save_IFS
23681
23682  ;;
23683esac
23684fi
23685CODESIGN=$ac_cv_path_CODESIGN
23686if test -n "$CODESIGN"; then
23687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23688$as_echo "$CODESIGN" >&6; }
23689else
23690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23691$as_echo "no" >&6; }
23692fi
23693
23694
23695  test -n "$CODESIGN" && break
23696done
23697
23698    else
23699      # If it succeeded, then it was overridden by the user. We will use it
23700      # for the tool.
23701
23702      # First remove it from the list of overridden variables, so we can test
23703      # for unknown variables in the end.
23704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23705
23706      # Check if we try to supply an empty value
23707      if test "x$CODESIGN" = x; then
23708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23709$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23711$as_echo_n "checking for CODESIGN... " >&6; }
23712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23713$as_echo "disabled" >&6; }
23714      else
23715        # Check if the provided tool contains a complete path.
23716        tool_specified="$CODESIGN"
23717        tool_basename="${tool_specified##*/}"
23718        if test "x$tool_basename" = "x$tool_specified"; then
23719          # A command without a complete path is provided, search $PATH.
23720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23721$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23722          # Extract the first word of "$tool_basename", so it can be a program name with args.
23723set dummy $tool_basename; ac_word=$2
23724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23725$as_echo_n "checking for $ac_word... " >&6; }
23726if ${ac_cv_path_CODESIGN+:} false; then :
23727  $as_echo_n "(cached) " >&6
23728else
23729  case $CODESIGN in
23730  [\\/]* | ?:[\\/]*)
23731  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23732  ;;
23733  *)
23734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23735for as_dir in $PATH
23736do
23737  IFS=$as_save_IFS
23738  test -z "$as_dir" && as_dir=.
23739    for ac_exec_ext in '' $ac_executable_extensions; do
23740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23741    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23743    break 2
23744  fi
23745done
23746  done
23747IFS=$as_save_IFS
23748
23749  ;;
23750esac
23751fi
23752CODESIGN=$ac_cv_path_CODESIGN
23753if test -n "$CODESIGN"; then
23754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23755$as_echo "$CODESIGN" >&6; }
23756else
23757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23758$as_echo "no" >&6; }
23759fi
23760
23761
23762          if test "x$CODESIGN" = x; then
23763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23764          fi
23765        else
23766          # Otherwise we believe it is a complete path. Use it as it is.
23767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23768$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23770$as_echo_n "checking for CODESIGN... " >&6; }
23771          if test ! -x "$tool_specified"; then
23772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23773$as_echo "not found" >&6; }
23774            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23775          fi
23776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23777$as_echo "$tool_specified" >&6; }
23778        fi
23779      fi
23780    fi
23781
23782  fi
23783
23784
23785    if test "x$CODESIGN" != "x"; then
23786      # Verify that the openjdk_codesign certificate is present
23787      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23788$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23789      $RM codesign-testfile
23790      $TOUCH codesign-testfile
23791      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23792      $RM codesign-testfile
23793      if test "x$CODESIGN" = x; then
23794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23795$as_echo "no" >&6; }
23796      else
23797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23798$as_echo "yes" >&6; }
23799      fi
23800    fi
23801
23802
23803
23804  # Publish this variable in the help.
23805
23806
23807  if [ -z "${SETFILE+x}" ]; then
23808    # The variable is not set by user, try to locate tool using the code snippet
23809    for ac_prog in SetFile
23810do
23811  # Extract the first word of "$ac_prog", so it can be a program name with args.
23812set dummy $ac_prog; ac_word=$2
23813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23814$as_echo_n "checking for $ac_word... " >&6; }
23815if ${ac_cv_path_SETFILE+:} false; then :
23816  $as_echo_n "(cached) " >&6
23817else
23818  case $SETFILE in
23819  [\\/]* | ?:[\\/]*)
23820  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23821  ;;
23822  *)
23823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23824for as_dir in $PATH
23825do
23826  IFS=$as_save_IFS
23827  test -z "$as_dir" && as_dir=.
23828    for ac_exec_ext in '' $ac_executable_extensions; do
23829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23830    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23832    break 2
23833  fi
23834done
23835  done
23836IFS=$as_save_IFS
23837
23838  ;;
23839esac
23840fi
23841SETFILE=$ac_cv_path_SETFILE
23842if test -n "$SETFILE"; then
23843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23844$as_echo "$SETFILE" >&6; }
23845else
23846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23847$as_echo "no" >&6; }
23848fi
23849
23850
23851  test -n "$SETFILE" && break
23852done
23853
23854  else
23855    # The variable is set, but is it from the command line or the environment?
23856
23857    # Try to remove the string !SETFILE! from our list.
23858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23860      # If it failed, the variable was not from the command line. Ignore it,
23861      # but warn the user (except for BASH, which is always set by the calling BASH).
23862      if test "xSETFILE" != xBASH; then
23863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23864$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23865      fi
23866      # Try to locate tool using the code snippet
23867      for ac_prog in SetFile
23868do
23869  # Extract the first word of "$ac_prog", so it can be a program name with args.
23870set dummy $ac_prog; ac_word=$2
23871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23872$as_echo_n "checking for $ac_word... " >&6; }
23873if ${ac_cv_path_SETFILE+:} false; then :
23874  $as_echo_n "(cached) " >&6
23875else
23876  case $SETFILE in
23877  [\\/]* | ?:[\\/]*)
23878  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23879  ;;
23880  *)
23881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23882for as_dir in $PATH
23883do
23884  IFS=$as_save_IFS
23885  test -z "$as_dir" && as_dir=.
23886    for ac_exec_ext in '' $ac_executable_extensions; do
23887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23888    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23890    break 2
23891  fi
23892done
23893  done
23894IFS=$as_save_IFS
23895
23896  ;;
23897esac
23898fi
23899SETFILE=$ac_cv_path_SETFILE
23900if test -n "$SETFILE"; then
23901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23902$as_echo "$SETFILE" >&6; }
23903else
23904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23905$as_echo "no" >&6; }
23906fi
23907
23908
23909  test -n "$SETFILE" && break
23910done
23911
23912    else
23913      # If it succeeded, then it was overridden by the user. We will use it
23914      # for the tool.
23915
23916      # First remove it from the list of overridden variables, so we can test
23917      # for unknown variables in the end.
23918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23919
23920      # Check if we try to supply an empty value
23921      if test "x$SETFILE" = x; then
23922        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23923$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23925$as_echo_n "checking for SETFILE... " >&6; }
23926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23927$as_echo "disabled" >&6; }
23928      else
23929        # Check if the provided tool contains a complete path.
23930        tool_specified="$SETFILE"
23931        tool_basename="${tool_specified##*/}"
23932        if test "x$tool_basename" = "x$tool_specified"; then
23933          # A command without a complete path is provided, search $PATH.
23934          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23935$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23936          # Extract the first word of "$tool_basename", so it can be a program name with args.
23937set dummy $tool_basename; ac_word=$2
23938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23939$as_echo_n "checking for $ac_word... " >&6; }
23940if ${ac_cv_path_SETFILE+:} false; then :
23941  $as_echo_n "(cached) " >&6
23942else
23943  case $SETFILE in
23944  [\\/]* | ?:[\\/]*)
23945  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23946  ;;
23947  *)
23948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23949for as_dir in $PATH
23950do
23951  IFS=$as_save_IFS
23952  test -z "$as_dir" && as_dir=.
23953    for ac_exec_ext in '' $ac_executable_extensions; do
23954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23955    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23957    break 2
23958  fi
23959done
23960  done
23961IFS=$as_save_IFS
23962
23963  ;;
23964esac
23965fi
23966SETFILE=$ac_cv_path_SETFILE
23967if test -n "$SETFILE"; then
23968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23969$as_echo "$SETFILE" >&6; }
23970else
23971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23972$as_echo "no" >&6; }
23973fi
23974
23975
23976          if test "x$SETFILE" = x; then
23977            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23978          fi
23979        else
23980          # Otherwise we believe it is a complete path. Use it as it is.
23981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23982$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23983          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23984$as_echo_n "checking for SETFILE... " >&6; }
23985          if test ! -x "$tool_specified"; then
23986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23987$as_echo "not found" >&6; }
23988            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23989          fi
23990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23991$as_echo "$tool_specified" >&6; }
23992        fi
23993      fi
23994    fi
23995
23996  fi
23997
23998
23999
24000  if test "x$SETFILE" = x; then
24001    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24002  fi
24003
24004
24005  fi
24006
24007
24008  # Test if bash supports pipefail.
24009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24010$as_echo_n "checking if bash supports pipefail... " >&6; }
24011  if ${BASH} -c 'set -o pipefail'; then
24012    BASH_ARGS="$BASH_ARGS -o pipefail"
24013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24014$as_echo "yes" >&6; }
24015  else
24016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24017$as_echo "no" >&6; }
24018  fi
24019
24020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24021$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24022  if ${BASH} -e -c 'true'; then
24023    BASH_ARGS="$BASH_ARGS -e"
24024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24025$as_echo "yes" >&6; }
24026  else
24027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24028$as_echo "no" >&6; }
24029  fi
24030
24031
24032
24033
24034# Check if pkg-config is available.
24035
24036
24037if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24038	if test -n "$ac_tool_prefix"; then
24039  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24040set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24042$as_echo_n "checking for $ac_word... " >&6; }
24043if ${ac_cv_path_PKG_CONFIG+:} false; then :
24044  $as_echo_n "(cached) " >&6
24045else
24046  case $PKG_CONFIG in
24047  [\\/]* | ?:[\\/]*)
24048  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24049  ;;
24050  *)
24051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24052for as_dir in $PATH
24053do
24054  IFS=$as_save_IFS
24055  test -z "$as_dir" && as_dir=.
24056    for ac_exec_ext in '' $ac_executable_extensions; do
24057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24058    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24060    break 2
24061  fi
24062done
24063  done
24064IFS=$as_save_IFS
24065
24066  ;;
24067esac
24068fi
24069PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24070if test -n "$PKG_CONFIG"; then
24071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24072$as_echo "$PKG_CONFIG" >&6; }
24073else
24074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24075$as_echo "no" >&6; }
24076fi
24077
24078
24079fi
24080if test -z "$ac_cv_path_PKG_CONFIG"; then
24081  ac_pt_PKG_CONFIG=$PKG_CONFIG
24082  # Extract the first word of "pkg-config", so it can be a program name with args.
24083set dummy pkg-config; ac_word=$2
24084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24085$as_echo_n "checking for $ac_word... " >&6; }
24086if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24087  $as_echo_n "(cached) " >&6
24088else
24089  case $ac_pt_PKG_CONFIG in
24090  [\\/]* | ?:[\\/]*)
24091  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24092  ;;
24093  *)
24094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24095for as_dir in $PATH
24096do
24097  IFS=$as_save_IFS
24098  test -z "$as_dir" && as_dir=.
24099    for ac_exec_ext in '' $ac_executable_extensions; do
24100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24101    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24103    break 2
24104  fi
24105done
24106  done
24107IFS=$as_save_IFS
24108
24109  ;;
24110esac
24111fi
24112ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24113if test -n "$ac_pt_PKG_CONFIG"; then
24114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24115$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24116else
24117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24118$as_echo "no" >&6; }
24119fi
24120
24121  if test "x$ac_pt_PKG_CONFIG" = x; then
24122    PKG_CONFIG=""
24123  else
24124    case $cross_compiling:$ac_tool_warned in
24125yes:)
24126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24128ac_tool_warned=yes ;;
24129esac
24130    PKG_CONFIG=$ac_pt_PKG_CONFIG
24131  fi
24132else
24133  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24134fi
24135
24136fi
24137if test -n "$PKG_CONFIG"; then
24138	_pkg_min_version=0.9.0
24139	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24140$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24141	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24142		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24143$as_echo "yes" >&6; }
24144	else
24145		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24146$as_echo "no" >&6; }
24147		PKG_CONFIG=""
24148	fi
24149
24150fi
24151
24152# After basic tools have been setup, we can check build os specific details.
24153
24154  ###############################################################################
24155
24156  # Note that this is the build platform OS version!
24157
24158  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24159  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24160  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24161  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24162
24163
24164
24165
24166
24167# Misc basic settings
24168
24169
24170# Check whether --with-default-make-target was given.
24171if test "${with_default_make_target+set}" = set; then :
24172  withval=$with_default_make_target;
24173fi
24174
24175  if test "x$with_default_make_target" = "x" \
24176      || test "x$with_default_make_target" = "xyes"; then
24177    DEFAULT_MAKE_TARGET="exploded-image"
24178  elif test "x$with_default_make_target" = "xno"; then
24179    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24180  else
24181    DEFAULT_MAKE_TARGET="$with_default_make_target"
24182  fi
24183
24184
24185
24186
24187###############################################################################
24188#
24189# Determine OpenJDK variants, options and version numbers.
24190#
24191###############################################################################
24192
24193# We need build & target for this.
24194
24195  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24196  # We always build headless support.
24197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24198$as_echo_n "checking headful support... " >&6; }
24199  # Check whether --enable-headful was given.
24200if test "${enable_headful+set}" = set; then :
24201  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24202else
24203  SUPPORT_HEADFUL=yes
24204fi
24205
24206
24207  SUPPORT_HEADLESS=yes
24208  BUILD_HEADLESS="BUILD_HEADLESS:=true"
24209
24210  if test "x$SUPPORT_HEADFUL" = xyes; then
24211    # We are building both headful and headless.
24212    headful_msg="include support for both headful and headless"
24213  fi
24214
24215  if test "x$SUPPORT_HEADFUL" = xno; then
24216    # Thus we are building headless only.
24217    BUILD_HEADLESS="BUILD_HEADLESS:=true"
24218    headful_msg="headless only"
24219  fi
24220
24221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24222$as_echo "$headful_msg" >&6; }
24223
24224
24225
24226
24227
24228  # Choose cacerts source file
24229
24230# Check whether --with-cacerts-file was given.
24231if test "${with_cacerts_file+set}" = set; then :
24232  withval=$with_cacerts_file;
24233fi
24234
24235  if test "x$with_cacerts_file" != x; then
24236    CACERTS_FILE=$with_cacerts_file
24237  fi
24238
24239
24240  # Enable or disable unlimited crypto
24241  # Check whether --enable-unlimited-crypto was given.
24242if test "${enable_unlimited_crypto+set}" = set; then :
24243  enableval=$enable_unlimited_crypto;
24244else
24245  enable_unlimited_crypto=no
24246fi
24247
24248  if test "x$enable_unlimited_crypto" = "xyes"; then
24249    UNLIMITED_CRYPTO=true
24250  else
24251    UNLIMITED_CRYPTO=false
24252  fi
24253
24254
24255  # Should we build the serviceability agent (SA)?
24256  INCLUDE_SA=true
24257  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24258    INCLUDE_SA=false
24259  fi
24260  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24261    INCLUDE_SA=false
24262  fi
24263
24264
24265  # Compress jars
24266  COMPRESS_JARS=false
24267
24268
24269
24270  # Setup default copyright year. Mostly overridden when building close to a new year.
24271
24272# Check whether --with-copyright-year was given.
24273if test "${with_copyright_year+set}" = set; then :
24274  withval=$with_copyright_year;
24275fi
24276
24277  if test "x$with_copyright_year" = xyes; then
24278    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24279  elif test "x$with_copyright_year" != x; then
24280    COPYRIGHT_YEAR="$with_copyright_year"
24281  else
24282    COPYRIGHT_YEAR=`$DATE +'%Y'`
24283  fi
24284
24285
24286
24287  # Check whether --enable-keep-packaged-modules was given.
24288if test "${enable_keep_packaged_modules+set}" = set; then :
24289  enableval=$enable_keep_packaged_modules;
24290fi
24291
24292
24293  if test "x$enable_keep_packaged_modules" = "xyes"; then
24294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24295$as_echo_n "checking if packaged modules are kept... " >&6; }
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24297$as_echo "yes" >&6; }
24298    JLINK_KEEP_PACKAGED_MODULES=true
24299  elif test "x$enable_keep_packaged_modules" = "xno"; then
24300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24301$as_echo_n "checking if packaged modules are kept... " >&6; }
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24303$as_echo "no" >&6; }
24304    JLINK_KEEP_PACKAGED_MODULES=false
24305  elif test "x$enable_keep_packaged_modules" = "x"; then
24306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24307$as_echo "yes (default)" >&6; }
24308    JLINK_KEEP_PACKAGED_MODULES=true
24309  else
24310    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24311  fi
24312
24313
24314
24315
24316  # Warn user that old version arguments are deprecated.
24317
24318
24319# Check whether --with-milestone was given.
24320if test "${with_milestone+set}" = set; then :
24321  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24322$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24323fi
24324
24325
24326
24327
24328# Check whether --with-update-version was given.
24329if test "${with_update_version+set}" = set; then :
24330  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24331$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24332fi
24333
24334
24335
24336
24337# Check whether --with-user-release-suffix was given.
24338if test "${with_user_release_suffix+set}" = set; then :
24339  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
24340$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24341fi
24342
24343
24344
24345
24346# Check whether --with-build-number was given.
24347if test "${with_build_number+set}" = set; then :
24348  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24349$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24350fi
24351
24352
24353
24354  # Source the version numbers file
24355  . $AUTOCONF_DIR/version-numbers
24356
24357  # Some non-version number information is set in that file
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367  # Override version from arguments
24368
24369  # If --with-version-string is set, process it first. It is possible to
24370  # override parts with more specific flags, since these are processed later.
24371
24372# Check whether --with-version-string was given.
24373if test "${with_version_string+set}" = set; then :
24374  withval=$with_version_string;
24375fi
24376
24377  if test "x$with_version_string" = xyes; then
24378    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24379  elif test "x$with_version_string" != x; then
24380    # Additional [] needed to keep m4 from mangling shell constructs.
24381    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24382      VERSION_MAJOR=${BASH_REMATCH[1]}
24383      VERSION_MINOR=${BASH_REMATCH[3]}
24384      VERSION_SECURITY=${BASH_REMATCH[5]}
24385      VERSION_PATCH=${BASH_REMATCH[7]}
24386      VERSION_PRE=${BASH_REMATCH[9]}
24387      version_plus_separator=${BASH_REMATCH[11]}
24388      VERSION_BUILD=${BASH_REMATCH[12]}
24389      VERSION_OPT=${BASH_REMATCH[14]}
24390      # Unspecified numerical fields are interpreted as 0.
24391      if test "x$VERSION_MINOR" = x; then
24392        VERSION_MINOR=0
24393      fi
24394      if test "x$VERSION_SECURITY" = x; then
24395        VERSION_SECURITY=0
24396      fi
24397      if test "x$VERSION_PATCH" = x; then
24398        VERSION_PATCH=0
24399      fi
24400      if test "x$version_plus_separator" != x \
24401          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24402        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24403      fi
24404      # Stop the version part process from setting default values.
24405      # We still allow them to explicitely override though.
24406      NO_DEFAULT_VERSION_PARTS=true
24407    else
24408      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24409    fi
24410  fi
24411
24412
24413# Check whether --with-version-pre was given.
24414if test "${with_version_pre+set}" = set; then :
24415  withval=$with_version_pre; with_version_pre_present=true
24416else
24417  with_version_pre_present=false
24418fi
24419
24420
24421  if test "x$with_version_pre_present" = xtrue; then
24422    if test "x$with_version_pre" = xyes; then
24423      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24424    elif test "x$with_version_pre" = xno; then
24425      # Interpret --without-* as empty string instead of the literal "no"
24426      VERSION_PRE=
24427    else
24428      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24429       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24430      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24432$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24433      fi
24434    fi
24435  else
24436    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24437      # Default is to use "internal" as pre
24438      VERSION_PRE="internal"
24439    fi
24440  fi
24441
24442
24443# Check whether --with-version-opt was given.
24444if test "${with_version_opt+set}" = set; then :
24445  withval=$with_version_opt; with_version_opt_present=true
24446else
24447  with_version_opt_present=false
24448fi
24449
24450
24451  if test "x$with_version_opt_present" = xtrue; then
24452    if test "x$with_version_opt" = xyes; then
24453      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24454    elif test "x$with_version_opt" = xno; then
24455      # Interpret --without-* as empty string instead of the literal "no"
24456      VERSION_OPT=
24457    else
24458      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24459       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24460      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24462$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24463      fi
24464    fi
24465  else
24466    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24467      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24468      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24469      # Outer [ ] to quote m4.
24470       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24471      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24472    fi
24473  fi
24474
24475
24476# Check whether --with-version-build was given.
24477if test "${with_version_build+set}" = set; then :
24478  withval=$with_version_build; with_version_build_present=true
24479else
24480  with_version_build_present=false
24481fi
24482
24483
24484  if test "x$with_version_build_present" = xtrue; then
24485    if test "x$with_version_build" = xyes; then
24486      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24487    elif test "x$with_version_build" = xno; then
24488      # Interpret --without-* as empty string instead of the literal "no"
24489      VERSION_BUILD=
24490    elif test "x$with_version_build" = x; then
24491      VERSION_BUILD=
24492    else
24493
24494  # Additional [] needed to keep m4 from mangling shell constructs.
24495  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24496    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24497  fi
24498  # Extract the version number without leading zeros.
24499  cleaned_value=${BASH_REMATCH[1]}
24500  if test "x$cleaned_value" = x; then
24501    # Special case for zero
24502    cleaned_value=${BASH_REMATCH[2]}
24503  fi
24504
24505  if test $cleaned_value -gt 255; then
24506    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24507  fi
24508  if test "x$cleaned_value" != "x$with_version_build"; then
24509    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24510$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24511  fi
24512  VERSION_BUILD=$cleaned_value
24513
24514    fi
24515  else
24516    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24517      # Default is to not have a build number.
24518      VERSION_BUILD=""
24519      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24520      VERSION_BUILD=0
24521    fi
24522  fi
24523
24524
24525# Check whether --with-version-major was given.
24526if test "${with_version_major+set}" = set; then :
24527  withval=$with_version_major; with_version_major_present=true
24528else
24529  with_version_major_present=false
24530fi
24531
24532
24533  if test "x$with_version_major_present" = xtrue; then
24534    if test "x$with_version_major" = xyes; then
24535      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24536    else
24537
24538  # Additional [] needed to keep m4 from mangling shell constructs.
24539  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24540    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24541  fi
24542  # Extract the version number without leading zeros.
24543  cleaned_value=${BASH_REMATCH[1]}
24544  if test "x$cleaned_value" = x; then
24545    # Special case for zero
24546    cleaned_value=${BASH_REMATCH[2]}
24547  fi
24548
24549  if test $cleaned_value -gt 255; then
24550    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24551  fi
24552  if test "x$cleaned_value" != "x$with_version_major"; then
24553    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24554$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24555  fi
24556  VERSION_MAJOR=$cleaned_value
24557
24558    fi
24559  else
24560    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24561      # Default is to get value from version-numbers
24562      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24563    fi
24564  fi
24565
24566
24567# Check whether --with-version-minor was given.
24568if test "${with_version_minor+set}" = set; then :
24569  withval=$with_version_minor; with_version_minor_present=true
24570else
24571  with_version_minor_present=false
24572fi
24573
24574
24575  if test "x$with_version_minor_present" = xtrue; then
24576    if test "x$with_version_minor" = xyes; then
24577      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24578    elif test "x$with_version_minor" = xno; then
24579      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24580      VERSION_MINOR=0
24581    elif test "x$with_version_minor" = x; then
24582      VERSION_MINOR=0
24583    else
24584
24585  # Additional [] needed to keep m4 from mangling shell constructs.
24586  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24587    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24588  fi
24589  # Extract the version number without leading zeros.
24590  cleaned_value=${BASH_REMATCH[1]}
24591  if test "x$cleaned_value" = x; then
24592    # Special case for zero
24593    cleaned_value=${BASH_REMATCH[2]}
24594  fi
24595
24596  if test $cleaned_value -gt 255; then
24597    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24598  fi
24599  if test "x$cleaned_value" != "x$with_version_minor"; then
24600    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24601$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24602  fi
24603  VERSION_MINOR=$cleaned_value
24604
24605    fi
24606  else
24607    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24608      # Default is 0, if unspecified
24609      VERSION_MINOR=0
24610    fi
24611  fi
24612
24613
24614# Check whether --with-version-security was given.
24615if test "${with_version_security+set}" = set; then :
24616  withval=$with_version_security; with_version_security_present=true
24617else
24618  with_version_security_present=false
24619fi
24620
24621
24622  if test "x$with_version_security_present" = xtrue; then
24623    if test "x$with_version_security" = xyes; then
24624      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24625    elif test "x$with_version_security" = xno; then
24626      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24627      VERSION_SECURITY=0
24628    elif test "x$with_version_security" = x; then
24629      VERSION_SECURITY=0
24630    else
24631
24632  # Additional [] needed to keep m4 from mangling shell constructs.
24633  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24634    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24635  fi
24636  # Extract the version number without leading zeros.
24637  cleaned_value=${BASH_REMATCH[1]}
24638  if test "x$cleaned_value" = x; then
24639    # Special case for zero
24640    cleaned_value=${BASH_REMATCH[2]}
24641  fi
24642
24643  if test $cleaned_value -gt 255; then
24644    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24645  fi
24646  if test "x$cleaned_value" != "x$with_version_security"; then
24647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24648$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24649  fi
24650  VERSION_SECURITY=$cleaned_value
24651
24652    fi
24653  else
24654    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24655      # Default is 0, if unspecified
24656      VERSION_SECURITY=0
24657    fi
24658  fi
24659
24660
24661# Check whether --with-version-patch was given.
24662if test "${with_version_patch+set}" = set; then :
24663  withval=$with_version_patch; with_version_patch_present=true
24664else
24665  with_version_patch_present=false
24666fi
24667
24668
24669  if test "x$with_version_patch_present" = xtrue; then
24670    if test "x$with_version_patch" = xyes; then
24671      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24672    elif test "x$with_version_patch" = xno; then
24673      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24674      VERSION_PATCH=0
24675    elif test "x$with_version_patch" = x; then
24676      VERSION_PATCH=0
24677    else
24678
24679  # Additional [] needed to keep m4 from mangling shell constructs.
24680  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24681    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24682  fi
24683  # Extract the version number without leading zeros.
24684  cleaned_value=${BASH_REMATCH[1]}
24685  if test "x$cleaned_value" = x; then
24686    # Special case for zero
24687    cleaned_value=${BASH_REMATCH[2]}
24688  fi
24689
24690  if test $cleaned_value -gt 255; then
24691    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24692  fi
24693  if test "x$cleaned_value" != "x$with_version_patch"; then
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24695$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24696  fi
24697  VERSION_PATCH=$cleaned_value
24698
24699    fi
24700  else
24701    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24702      # Default is 0, if unspecified
24703      VERSION_PATCH=0
24704    fi
24705  fi
24706
24707  # Calculate derived version properties
24708
24709  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24710  if test "x$VERSION_PRE" = x; then
24711    VERSION_IS_GA=true
24712  else
24713    VERSION_IS_GA=false
24714  fi
24715
24716  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24717  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24718
24719  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24720  # Strip trailing zeroes from stripped_version_number
24721  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24722  VERSION_NUMBER=$stripped_version_number
24723
24724  # The complete version string, with additional build information
24725  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24726    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24727  else
24728    # If either build or opt is set, we need a + separator
24729    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24730  fi
24731
24732  # The short version string, just VERSION_NUMBER and PRE, if present.
24733  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24734
24735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24736$as_echo_n "checking for version string... " >&6; }
24737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24738$as_echo "$VERSION_STRING" >&6; }
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754###############################################################################
24755#
24756# Setup BootJDK, used to bootstrap the build.
24757#
24758###############################################################################
24759
24760
24761  BOOT_JDK_FOUND=no
24762
24763# Check whether --with-boot-jdk was given.
24764if test "${with_boot_jdk+set}" = set; then :
24765  withval=$with_boot_jdk;
24766fi
24767
24768
24769  # We look for the Boot JDK through various means, going from more certain to
24770  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24771  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24772  # must check if this is indeed valid; otherwise we'll continue looking.
24773
24774  # Test: Is bootjdk explicitely set by command line arguments?
24775
24776  if test "x$BOOT_JDK_FOUND" = xno; then
24777    # Now execute the test
24778
24779  if test "x$with_boot_jdk" != x; then
24780    BOOT_JDK=$with_boot_jdk
24781    BOOT_JDK_FOUND=maybe
24782    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24783$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24784  fi
24785
24786
24787    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24788    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24789      # Do we have a bin/java?
24790      if test ! -x "$BOOT_JDK/bin/java"; then
24791        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24793        BOOT_JDK_FOUND=no
24794      else
24795        # Do we have a bin/javac?
24796        if test ! -x "$BOOT_JDK/bin/javac"; then
24797          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24799          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24800$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24801          BOOT_JDK_FOUND=no
24802        else
24803          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24804          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24805
24806          # Extra M4 quote needed to protect [] in grep expression.
24807          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24808          if test "x$FOUND_CORRECT_VERSION" = x; then
24809            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24811            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24812$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24813            BOOT_JDK_FOUND=no
24814          else
24815            # We're done! :-)
24816            BOOT_JDK_FOUND=yes
24817
24818  # Only process if variable expands to non-empty
24819
24820  if test "x$BOOT_JDK" != x; then
24821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24822
24823  # Input might be given as Windows format, start by converting to
24824  # unix format.
24825  path="$BOOT_JDK"
24826  new_path=`$CYGPATH -u "$path"`
24827
24828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24831  # "foo.exe" is OK but "foo" is an error.
24832  #
24833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24834  # It is also a way to make sure we got the proper file name for the real test later on.
24835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24836  if test "x$test_shortpath" = x; then
24837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24839    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24840  fi
24841
24842  # Call helper function which possibly converts this using DOS-style short mode.
24843  # If so, the updated path is stored in $new_path.
24844
24845  input_path="$new_path"
24846  # Check if we need to convert this using DOS-style short mode. If the path
24847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24848  # take no chances and rewrite it.
24849  # Note: m4 eats our [], so we need to use [ and ] instead.
24850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24851  if test "x$has_forbidden_chars" != x; then
24852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24856      # Going to short mode and back again did indeed matter. Since short mode is
24857      # case insensitive, let's make it lowercase to improve readability.
24858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24859      # Now convert it back to Unix-style (cygpath)
24860      input_path=`$CYGPATH -u "$shortmode_path"`
24861      new_path="$input_path"
24862    fi
24863  fi
24864
24865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24866  if test "x$test_cygdrive_prefix" = x; then
24867    # As a simple fix, exclude /usr/bin since it's not a real path.
24868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24870      # a path prefixed by /cygdrive for fixpath to work.
24871      new_path="$CYGWIN_ROOT_PATH$input_path"
24872    fi
24873  fi
24874
24875
24876  if test "x$path" != "x$new_path"; then
24877    BOOT_JDK="$new_path"
24878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24880  fi
24881
24882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24883
24884  path="$BOOT_JDK"
24885  has_colon=`$ECHO $path | $GREP ^.:`
24886  new_path="$path"
24887  if test "x$has_colon" = x; then
24888    # Not in mixed or Windows style, start by that.
24889    new_path=`cmd //c echo $path`
24890  fi
24891
24892
24893  input_path="$new_path"
24894  # Check if we need to convert this using DOS-style short mode. If the path
24895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24896  # take no chances and rewrite it.
24897  # Note: m4 eats our [], so we need to use [ and ] instead.
24898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24899  if test "x$has_forbidden_chars" != x; then
24900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24902  fi
24903
24904
24905  windows_path="$new_path"
24906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24907    unix_path=`$CYGPATH -u "$windows_path"`
24908    new_path="$unix_path"
24909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24911    new_path="$unix_path"
24912  fi
24913
24914  if test "x$path" != "x$new_path"; then
24915    BOOT_JDK="$new_path"
24916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24918  fi
24919
24920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24922
24923    else
24924      # We're on a unix platform. Hooray! :)
24925      path="$BOOT_JDK"
24926      has_space=`$ECHO "$path" | $GREP " "`
24927      if test "x$has_space" != x; then
24928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24930        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24931      fi
24932
24933      # Use eval to expand a potential ~
24934      eval path="$path"
24935      if test ! -f "$path" && test ! -d "$path"; then
24936        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24937      fi
24938
24939      if test -d "$path"; then
24940        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24941      else
24942        dir="`$DIRNAME "$path"`"
24943        base="`$BASENAME "$path"`"
24944        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24945      fi
24946    fi
24947  fi
24948
24949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24950$as_echo_n "checking for Boot JDK... " >&6; }
24951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24952$as_echo "$BOOT_JDK" >&6; }
24953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24954$as_echo_n "checking Boot JDK version... " >&6; }
24955            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24957$as_echo "$BOOT_JDK_VERSION" >&6; }
24958          fi # end check jdk version
24959        fi # end check javac
24960      fi # end check java
24961    fi # end check boot jdk found
24962  fi
24963
24964  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24965    # Having specified an argument which is incorrect will produce an instant failure;
24966    # we should not go on looking
24967    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24968  fi
24969
24970  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24971
24972  if test "x$BOOT_JDK_FOUND" = xno; then
24973    # Now execute the test
24974
24975  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24976    # First check at user selected default
24977
24978  if test "x$BOOT_JDK_FOUND" = xno; then
24979    # Now execute the test
24980
24981  if test -x /usr/libexec/java_home; then
24982    BOOT_JDK=`/usr/libexec/java_home `
24983    BOOT_JDK_FOUND=maybe
24984    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24985$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24986  fi
24987
24988
24989    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24990    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24991      # Do we have a bin/java?
24992      if test ! -x "$BOOT_JDK/bin/java"; then
24993        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24995        BOOT_JDK_FOUND=no
24996      else
24997        # Do we have a bin/javac?
24998        if test ! -x "$BOOT_JDK/bin/javac"; then
24999          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25001          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25002$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25003          BOOT_JDK_FOUND=no
25004        else
25005          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25006          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25007
25008          # Extra M4 quote needed to protect [] in grep expression.
25009          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25010          if test "x$FOUND_CORRECT_VERSION" = x; then
25011            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25013            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25014$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25015            BOOT_JDK_FOUND=no
25016          else
25017            # We're done! :-)
25018            BOOT_JDK_FOUND=yes
25019
25020  # Only process if variable expands to non-empty
25021
25022  if test "x$BOOT_JDK" != x; then
25023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25024
25025  # Input might be given as Windows format, start by converting to
25026  # unix format.
25027  path="$BOOT_JDK"
25028  new_path=`$CYGPATH -u "$path"`
25029
25030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25033  # "foo.exe" is OK but "foo" is an error.
25034  #
25035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25036  # It is also a way to make sure we got the proper file name for the real test later on.
25037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25038  if test "x$test_shortpath" = x; then
25039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25041    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25042  fi
25043
25044  # Call helper function which possibly converts this using DOS-style short mode.
25045  # If so, the updated path is stored in $new_path.
25046
25047  input_path="$new_path"
25048  # Check if we need to convert this using DOS-style short mode. If the path
25049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25050  # take no chances and rewrite it.
25051  # Note: m4 eats our [], so we need to use [ and ] instead.
25052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25053  if test "x$has_forbidden_chars" != x; then
25054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25058      # Going to short mode and back again did indeed matter. Since short mode is
25059      # case insensitive, let's make it lowercase to improve readability.
25060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25061      # Now convert it back to Unix-style (cygpath)
25062      input_path=`$CYGPATH -u "$shortmode_path"`
25063      new_path="$input_path"
25064    fi
25065  fi
25066
25067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25068  if test "x$test_cygdrive_prefix" = x; then
25069    # As a simple fix, exclude /usr/bin since it's not a real path.
25070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25072      # a path prefixed by /cygdrive for fixpath to work.
25073      new_path="$CYGWIN_ROOT_PATH$input_path"
25074    fi
25075  fi
25076
25077
25078  if test "x$path" != "x$new_path"; then
25079    BOOT_JDK="$new_path"
25080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25081$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25082  fi
25083
25084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25085
25086  path="$BOOT_JDK"
25087  has_colon=`$ECHO $path | $GREP ^.:`
25088  new_path="$path"
25089  if test "x$has_colon" = x; then
25090    # Not in mixed or Windows style, start by that.
25091    new_path=`cmd //c echo $path`
25092  fi
25093
25094
25095  input_path="$new_path"
25096  # Check if we need to convert this using DOS-style short mode. If the path
25097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25098  # take no chances and rewrite it.
25099  # Note: m4 eats our [], so we need to use [ and ] instead.
25100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25101  if test "x$has_forbidden_chars" != x; then
25102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25104  fi
25105
25106
25107  windows_path="$new_path"
25108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25109    unix_path=`$CYGPATH -u "$windows_path"`
25110    new_path="$unix_path"
25111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25113    new_path="$unix_path"
25114  fi
25115
25116  if test "x$path" != "x$new_path"; then
25117    BOOT_JDK="$new_path"
25118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25119$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25120  fi
25121
25122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25124
25125    else
25126      # We're on a unix platform. Hooray! :)
25127      path="$BOOT_JDK"
25128      has_space=`$ECHO "$path" | $GREP " "`
25129      if test "x$has_space" != x; then
25130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25133      fi
25134
25135      # Use eval to expand a potential ~
25136      eval path="$path"
25137      if test ! -f "$path" && test ! -d "$path"; then
25138        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25139      fi
25140
25141      if test -d "$path"; then
25142        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25143      else
25144        dir="`$DIRNAME "$path"`"
25145        base="`$BASENAME "$path"`"
25146        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25147      fi
25148    fi
25149  fi
25150
25151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25152$as_echo_n "checking for Boot JDK... " >&6; }
25153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25154$as_echo "$BOOT_JDK" >&6; }
25155            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25156$as_echo_n "checking Boot JDK version... " >&6; }
25157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25159$as_echo "$BOOT_JDK_VERSION" >&6; }
25160          fi # end check jdk version
25161        fi # end check javac
25162      fi # end check java
25163    fi # end check boot jdk found
25164  fi
25165
25166    # If that did not work out (e.g. too old), try explicit versions instead
25167
25168  if test "x$BOOT_JDK_FOUND" = xno; then
25169    # Now execute the test
25170
25171  if test -x /usr/libexec/java_home; then
25172    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25173    BOOT_JDK_FOUND=maybe
25174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25175$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25176  fi
25177
25178
25179    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25180    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25181      # Do we have a bin/java?
25182      if test ! -x "$BOOT_JDK/bin/java"; then
25183        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25185        BOOT_JDK_FOUND=no
25186      else
25187        # Do we have a bin/javac?
25188        if test ! -x "$BOOT_JDK/bin/javac"; then
25189          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25191          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25192$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25193          BOOT_JDK_FOUND=no
25194        else
25195          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25196          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25197
25198          # Extra M4 quote needed to protect [] in grep expression.
25199          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25200          if test "x$FOUND_CORRECT_VERSION" = x; then
25201            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25203            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25204$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25205            BOOT_JDK_FOUND=no
25206          else
25207            # We're done! :-)
25208            BOOT_JDK_FOUND=yes
25209
25210  # Only process if variable expands to non-empty
25211
25212  if test "x$BOOT_JDK" != x; then
25213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25214
25215  # Input might be given as Windows format, start by converting to
25216  # unix format.
25217  path="$BOOT_JDK"
25218  new_path=`$CYGPATH -u "$path"`
25219
25220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25223  # "foo.exe" is OK but "foo" is an error.
25224  #
25225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25226  # It is also a way to make sure we got the proper file name for the real test later on.
25227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25228  if test "x$test_shortpath" = x; then
25229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25231    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25232  fi
25233
25234  # Call helper function which possibly converts this using DOS-style short mode.
25235  # If so, the updated path is stored in $new_path.
25236
25237  input_path="$new_path"
25238  # Check if we need to convert this using DOS-style short mode. If the path
25239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25240  # take no chances and rewrite it.
25241  # Note: m4 eats our [], so we need to use [ and ] instead.
25242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25243  if test "x$has_forbidden_chars" != x; then
25244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25248      # Going to short mode and back again did indeed matter. Since short mode is
25249      # case insensitive, let's make it lowercase to improve readability.
25250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25251      # Now convert it back to Unix-style (cygpath)
25252      input_path=`$CYGPATH -u "$shortmode_path"`
25253      new_path="$input_path"
25254    fi
25255  fi
25256
25257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25258  if test "x$test_cygdrive_prefix" = x; then
25259    # As a simple fix, exclude /usr/bin since it's not a real path.
25260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25262      # a path prefixed by /cygdrive for fixpath to work.
25263      new_path="$CYGWIN_ROOT_PATH$input_path"
25264    fi
25265  fi
25266
25267
25268  if test "x$path" != "x$new_path"; then
25269    BOOT_JDK="$new_path"
25270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25272  fi
25273
25274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25275
25276  path="$BOOT_JDK"
25277  has_colon=`$ECHO $path | $GREP ^.:`
25278  new_path="$path"
25279  if test "x$has_colon" = x; then
25280    # Not in mixed or Windows style, start by that.
25281    new_path=`cmd //c echo $path`
25282  fi
25283
25284
25285  input_path="$new_path"
25286  # Check if we need to convert this using DOS-style short mode. If the path
25287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25288  # take no chances and rewrite it.
25289  # Note: m4 eats our [], so we need to use [ and ] instead.
25290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25291  if test "x$has_forbidden_chars" != x; then
25292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25294  fi
25295
25296
25297  windows_path="$new_path"
25298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25299    unix_path=`$CYGPATH -u "$windows_path"`
25300    new_path="$unix_path"
25301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25303    new_path="$unix_path"
25304  fi
25305
25306  if test "x$path" != "x$new_path"; then
25307    BOOT_JDK="$new_path"
25308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25309$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25310  fi
25311
25312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25314
25315    else
25316      # We're on a unix platform. Hooray! :)
25317      path="$BOOT_JDK"
25318      has_space=`$ECHO "$path" | $GREP " "`
25319      if test "x$has_space" != x; then
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25322        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25323      fi
25324
25325      # Use eval to expand a potential ~
25326      eval path="$path"
25327      if test ! -f "$path" && test ! -d "$path"; then
25328        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25329      fi
25330
25331      if test -d "$path"; then
25332        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25333      else
25334        dir="`$DIRNAME "$path"`"
25335        base="`$BASENAME "$path"`"
25336        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25337      fi
25338    fi
25339  fi
25340
25341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25342$as_echo_n "checking for Boot JDK... " >&6; }
25343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25344$as_echo "$BOOT_JDK" >&6; }
25345            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25346$as_echo_n "checking Boot JDK version... " >&6; }
25347            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25349$as_echo "$BOOT_JDK_VERSION" >&6; }
25350          fi # end check jdk version
25351        fi # end check javac
25352      fi # end check java
25353    fi # end check boot jdk found
25354  fi
25355
25356
25357  if test "x$BOOT_JDK_FOUND" = xno; then
25358    # Now execute the test
25359
25360  if test -x /usr/libexec/java_home; then
25361    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25362    BOOT_JDK_FOUND=maybe
25363    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25364$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25365  fi
25366
25367
25368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25370      # Do we have a bin/java?
25371      if test ! -x "$BOOT_JDK/bin/java"; then
25372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25374        BOOT_JDK_FOUND=no
25375      else
25376        # Do we have a bin/javac?
25377        if test ! -x "$BOOT_JDK/bin/javac"; then
25378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25382          BOOT_JDK_FOUND=no
25383        else
25384          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25385          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25386
25387          # Extra M4 quote needed to protect [] in grep expression.
25388          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25389          if test "x$FOUND_CORRECT_VERSION" = x; then
25390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25392            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25393$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25394            BOOT_JDK_FOUND=no
25395          else
25396            # We're done! :-)
25397            BOOT_JDK_FOUND=yes
25398
25399  # Only process if variable expands to non-empty
25400
25401  if test "x$BOOT_JDK" != x; then
25402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25403
25404  # Input might be given as Windows format, start by converting to
25405  # unix format.
25406  path="$BOOT_JDK"
25407  new_path=`$CYGPATH -u "$path"`
25408
25409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25412  # "foo.exe" is OK but "foo" is an error.
25413  #
25414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25415  # It is also a way to make sure we got the proper file name for the real test later on.
25416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25417  if test "x$test_shortpath" = x; then
25418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25421  fi
25422
25423  # Call helper function which possibly converts this using DOS-style short mode.
25424  # If so, the updated path is stored in $new_path.
25425
25426  input_path="$new_path"
25427  # Check if we need to convert this using DOS-style short mode. If the path
25428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25429  # take no chances and rewrite it.
25430  # Note: m4 eats our [], so we need to use [ and ] instead.
25431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25432  if test "x$has_forbidden_chars" != x; then
25433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25437      # Going to short mode and back again did indeed matter. Since short mode is
25438      # case insensitive, let's make it lowercase to improve readability.
25439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25440      # Now convert it back to Unix-style (cygpath)
25441      input_path=`$CYGPATH -u "$shortmode_path"`
25442      new_path="$input_path"
25443    fi
25444  fi
25445
25446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25447  if test "x$test_cygdrive_prefix" = x; then
25448    # As a simple fix, exclude /usr/bin since it's not a real path.
25449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25451      # a path prefixed by /cygdrive for fixpath to work.
25452      new_path="$CYGWIN_ROOT_PATH$input_path"
25453    fi
25454  fi
25455
25456
25457  if test "x$path" != "x$new_path"; then
25458    BOOT_JDK="$new_path"
25459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25461  fi
25462
25463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25464
25465  path="$BOOT_JDK"
25466  has_colon=`$ECHO $path | $GREP ^.:`
25467  new_path="$path"
25468  if test "x$has_colon" = x; then
25469    # Not in mixed or Windows style, start by that.
25470    new_path=`cmd //c echo $path`
25471  fi
25472
25473
25474  input_path="$new_path"
25475  # Check if we need to convert this using DOS-style short mode. If the path
25476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25477  # take no chances and rewrite it.
25478  # Note: m4 eats our [], so we need to use [ and ] instead.
25479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25480  if test "x$has_forbidden_chars" != x; then
25481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25483  fi
25484
25485
25486  windows_path="$new_path"
25487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25488    unix_path=`$CYGPATH -u "$windows_path"`
25489    new_path="$unix_path"
25490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25492    new_path="$unix_path"
25493  fi
25494
25495  if test "x$path" != "x$new_path"; then
25496    BOOT_JDK="$new_path"
25497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25499  fi
25500
25501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25503
25504    else
25505      # We're on a unix platform. Hooray! :)
25506      path="$BOOT_JDK"
25507      has_space=`$ECHO "$path" | $GREP " "`
25508      if test "x$has_space" != x; then
25509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25510$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25512      fi
25513
25514      # Use eval to expand a potential ~
25515      eval path="$path"
25516      if test ! -f "$path" && test ! -d "$path"; then
25517        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25518      fi
25519
25520      if test -d "$path"; then
25521        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25522      else
25523        dir="`$DIRNAME "$path"`"
25524        base="`$BASENAME "$path"`"
25525        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25526      fi
25527    fi
25528  fi
25529
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25531$as_echo_n "checking for Boot JDK... " >&6; }
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25533$as_echo "$BOOT_JDK" >&6; }
25534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25535$as_echo_n "checking Boot JDK version... " >&6; }
25536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25538$as_echo "$BOOT_JDK_VERSION" >&6; }
25539          fi # end check jdk version
25540        fi # end check javac
25541      fi # end check java
25542    fi # end check boot jdk found
25543  fi
25544
25545
25546  if test "x$BOOT_JDK_FOUND" = xno; then
25547    # Now execute the test
25548
25549  if test -x /usr/libexec/java_home; then
25550    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25551    BOOT_JDK_FOUND=maybe
25552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25553$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25554  fi
25555
25556
25557    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25558    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25559      # Do we have a bin/java?
25560      if test ! -x "$BOOT_JDK/bin/java"; then
25561        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25563        BOOT_JDK_FOUND=no
25564      else
25565        # Do we have a bin/javac?
25566        if test ! -x "$BOOT_JDK/bin/javac"; then
25567          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25569          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25570$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25571          BOOT_JDK_FOUND=no
25572        else
25573          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25574          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25575
25576          # Extra M4 quote needed to protect [] in grep expression.
25577          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25578          if test "x$FOUND_CORRECT_VERSION" = x; then
25579            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25581            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25582$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25583            BOOT_JDK_FOUND=no
25584          else
25585            # We're done! :-)
25586            BOOT_JDK_FOUND=yes
25587
25588  # Only process if variable expands to non-empty
25589
25590  if test "x$BOOT_JDK" != x; then
25591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25592
25593  # Input might be given as Windows format, start by converting to
25594  # unix format.
25595  path="$BOOT_JDK"
25596  new_path=`$CYGPATH -u "$path"`
25597
25598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25601  # "foo.exe" is OK but "foo" is an error.
25602  #
25603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25604  # It is also a way to make sure we got the proper file name for the real test later on.
25605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25606  if test "x$test_shortpath" = x; then
25607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25608$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25609    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25610  fi
25611
25612  # Call helper function which possibly converts this using DOS-style short mode.
25613  # If so, the updated path is stored in $new_path.
25614
25615  input_path="$new_path"
25616  # Check if we need to convert this using DOS-style short mode. If the path
25617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25618  # take no chances and rewrite it.
25619  # Note: m4 eats our [], so we need to use [ and ] instead.
25620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25621  if test "x$has_forbidden_chars" != x; then
25622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25626      # Going to short mode and back again did indeed matter. Since short mode is
25627      # case insensitive, let's make it lowercase to improve readability.
25628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25629      # Now convert it back to Unix-style (cygpath)
25630      input_path=`$CYGPATH -u "$shortmode_path"`
25631      new_path="$input_path"
25632    fi
25633  fi
25634
25635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25636  if test "x$test_cygdrive_prefix" = x; then
25637    # As a simple fix, exclude /usr/bin since it's not a real path.
25638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25640      # a path prefixed by /cygdrive for fixpath to work.
25641      new_path="$CYGWIN_ROOT_PATH$input_path"
25642    fi
25643  fi
25644
25645
25646  if test "x$path" != "x$new_path"; then
25647    BOOT_JDK="$new_path"
25648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25649$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25650  fi
25651
25652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25653
25654  path="$BOOT_JDK"
25655  has_colon=`$ECHO $path | $GREP ^.:`
25656  new_path="$path"
25657  if test "x$has_colon" = x; then
25658    # Not in mixed or Windows style, start by that.
25659    new_path=`cmd //c echo $path`
25660  fi
25661
25662
25663  input_path="$new_path"
25664  # Check if we need to convert this using DOS-style short mode. If the path
25665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25666  # take no chances and rewrite it.
25667  # Note: m4 eats our [], so we need to use [ and ] instead.
25668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25669  if test "x$has_forbidden_chars" != x; then
25670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25672  fi
25673
25674
25675  windows_path="$new_path"
25676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25677    unix_path=`$CYGPATH -u "$windows_path"`
25678    new_path="$unix_path"
25679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25681    new_path="$unix_path"
25682  fi
25683
25684  if test "x$path" != "x$new_path"; then
25685    BOOT_JDK="$new_path"
25686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25688  fi
25689
25690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25692
25693    else
25694      # We're on a unix platform. Hooray! :)
25695      path="$BOOT_JDK"
25696      has_space=`$ECHO "$path" | $GREP " "`
25697      if test "x$has_space" != x; then
25698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25701      fi
25702
25703      # Use eval to expand a potential ~
25704      eval path="$path"
25705      if test ! -f "$path" && test ! -d "$path"; then
25706        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25707      fi
25708
25709      if test -d "$path"; then
25710        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25711      else
25712        dir="`$DIRNAME "$path"`"
25713        base="`$BASENAME "$path"`"
25714        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25715      fi
25716    fi
25717  fi
25718
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25720$as_echo_n "checking for Boot JDK... " >&6; }
25721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25722$as_echo "$BOOT_JDK" >&6; }
25723            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25724$as_echo_n "checking Boot JDK version... " >&6; }
25725            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25727$as_echo "$BOOT_JDK_VERSION" >&6; }
25728          fi # end check jdk version
25729        fi # end check javac
25730      fi # end check java
25731    fi # end check boot jdk found
25732  fi
25733
25734  fi
25735
25736
25737    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25738    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25739      # Do we have a bin/java?
25740      if test ! -x "$BOOT_JDK/bin/java"; then
25741        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25743        BOOT_JDK_FOUND=no
25744      else
25745        # Do we have a bin/javac?
25746        if test ! -x "$BOOT_JDK/bin/javac"; then
25747          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25749          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25750$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25751          BOOT_JDK_FOUND=no
25752        else
25753          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25754          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25755
25756          # Extra M4 quote needed to protect [] in grep expression.
25757          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25758          if test "x$FOUND_CORRECT_VERSION" = x; then
25759            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25761            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25762$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25763            BOOT_JDK_FOUND=no
25764          else
25765            # We're done! :-)
25766            BOOT_JDK_FOUND=yes
25767
25768  # Only process if variable expands to non-empty
25769
25770  if test "x$BOOT_JDK" != x; then
25771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25772
25773  # Input might be given as Windows format, start by converting to
25774  # unix format.
25775  path="$BOOT_JDK"
25776  new_path=`$CYGPATH -u "$path"`
25777
25778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25781  # "foo.exe" is OK but "foo" is an error.
25782  #
25783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25784  # It is also a way to make sure we got the proper file name for the real test later on.
25785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25786  if test "x$test_shortpath" = x; then
25787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25788$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25789    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25790  fi
25791
25792  # Call helper function which possibly converts this using DOS-style short mode.
25793  # If so, the updated path is stored in $new_path.
25794
25795  input_path="$new_path"
25796  # Check if we need to convert this using DOS-style short mode. If the path
25797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25798  # take no chances and rewrite it.
25799  # Note: m4 eats our [], so we need to use [ and ] instead.
25800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25801  if test "x$has_forbidden_chars" != x; then
25802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25806      # Going to short mode and back again did indeed matter. Since short mode is
25807      # case insensitive, let's make it lowercase to improve readability.
25808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25809      # Now convert it back to Unix-style (cygpath)
25810      input_path=`$CYGPATH -u "$shortmode_path"`
25811      new_path="$input_path"
25812    fi
25813  fi
25814
25815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25816  if test "x$test_cygdrive_prefix" = x; then
25817    # As a simple fix, exclude /usr/bin since it's not a real path.
25818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25820      # a path prefixed by /cygdrive for fixpath to work.
25821      new_path="$CYGWIN_ROOT_PATH$input_path"
25822    fi
25823  fi
25824
25825
25826  if test "x$path" != "x$new_path"; then
25827    BOOT_JDK="$new_path"
25828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25829$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25830  fi
25831
25832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25833
25834  path="$BOOT_JDK"
25835  has_colon=`$ECHO $path | $GREP ^.:`
25836  new_path="$path"
25837  if test "x$has_colon" = x; then
25838    # Not in mixed or Windows style, start by that.
25839    new_path=`cmd //c echo $path`
25840  fi
25841
25842
25843  input_path="$new_path"
25844  # Check if we need to convert this using DOS-style short mode. If the path
25845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25846  # take no chances and rewrite it.
25847  # Note: m4 eats our [], so we need to use [ and ] instead.
25848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25849  if test "x$has_forbidden_chars" != x; then
25850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25852  fi
25853
25854
25855  windows_path="$new_path"
25856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25857    unix_path=`$CYGPATH -u "$windows_path"`
25858    new_path="$unix_path"
25859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25861    new_path="$unix_path"
25862  fi
25863
25864  if test "x$path" != "x$new_path"; then
25865    BOOT_JDK="$new_path"
25866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25868  fi
25869
25870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25872
25873    else
25874      # We're on a unix platform. Hooray! :)
25875      path="$BOOT_JDK"
25876      has_space=`$ECHO "$path" | $GREP " "`
25877      if test "x$has_space" != x; then
25878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25881      fi
25882
25883      # Use eval to expand a potential ~
25884      eval path="$path"
25885      if test ! -f "$path" && test ! -d "$path"; then
25886        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25887      fi
25888
25889      if test -d "$path"; then
25890        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25891      else
25892        dir="`$DIRNAME "$path"`"
25893        base="`$BASENAME "$path"`"
25894        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25895      fi
25896    fi
25897  fi
25898
25899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25900$as_echo_n "checking for Boot JDK... " >&6; }
25901            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25902$as_echo "$BOOT_JDK" >&6; }
25903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25904$as_echo_n "checking Boot JDK version... " >&6; }
25905            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25907$as_echo "$BOOT_JDK_VERSION" >&6; }
25908          fi # end check jdk version
25909        fi # end check javac
25910      fi # end check java
25911    fi # end check boot jdk found
25912  fi
25913
25914
25915  # Test: Is $JAVA_HOME set?
25916
25917  if test "x$BOOT_JDK_FOUND" = xno; then
25918    # Now execute the test
25919
25920  if test "x$JAVA_HOME" != x; then
25921    JAVA_HOME_PROCESSED="$JAVA_HOME"
25922
25923  # Only process if variable expands to non-empty
25924
25925  if test "x$JAVA_HOME_PROCESSED" != x; then
25926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25927
25928  # Input might be given as Windows format, start by converting to
25929  # unix format.
25930  path="$JAVA_HOME_PROCESSED"
25931  new_path=`$CYGPATH -u "$path"`
25932
25933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25936  # "foo.exe" is OK but "foo" is an error.
25937  #
25938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25939  # It is also a way to make sure we got the proper file name for the real test later on.
25940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25941  if test "x$test_shortpath" = x; then
25942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25943$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25944    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25945  fi
25946
25947  # Call helper function which possibly converts this using DOS-style short mode.
25948  # If so, the updated path is stored in $new_path.
25949
25950  input_path="$new_path"
25951  # Check if we need to convert this using DOS-style short mode. If the path
25952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25953  # take no chances and rewrite it.
25954  # Note: m4 eats our [], so we need to use [ and ] instead.
25955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25956  if test "x$has_forbidden_chars" != x; then
25957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25961      # Going to short mode and back again did indeed matter. Since short mode is
25962      # case insensitive, let's make it lowercase to improve readability.
25963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25964      # Now convert it back to Unix-style (cygpath)
25965      input_path=`$CYGPATH -u "$shortmode_path"`
25966      new_path="$input_path"
25967    fi
25968  fi
25969
25970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25971  if test "x$test_cygdrive_prefix" = x; then
25972    # As a simple fix, exclude /usr/bin since it's not a real path.
25973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25975      # a path prefixed by /cygdrive for fixpath to work.
25976      new_path="$CYGWIN_ROOT_PATH$input_path"
25977    fi
25978  fi
25979
25980
25981  if test "x$path" != "x$new_path"; then
25982    JAVA_HOME_PROCESSED="$new_path"
25983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25984$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25985  fi
25986
25987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25988
25989  path="$JAVA_HOME_PROCESSED"
25990  has_colon=`$ECHO $path | $GREP ^.:`
25991  new_path="$path"
25992  if test "x$has_colon" = x; then
25993    # Not in mixed or Windows style, start by that.
25994    new_path=`cmd //c echo $path`
25995  fi
25996
25997
25998  input_path="$new_path"
25999  # Check if we need to convert this using DOS-style short mode. If the path
26000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26001  # take no chances and rewrite it.
26002  # Note: m4 eats our [], so we need to use [ and ] instead.
26003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26004  if test "x$has_forbidden_chars" != x; then
26005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26007  fi
26008
26009
26010  windows_path="$new_path"
26011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26012    unix_path=`$CYGPATH -u "$windows_path"`
26013    new_path="$unix_path"
26014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26016    new_path="$unix_path"
26017  fi
26018
26019  if test "x$path" != "x$new_path"; then
26020    JAVA_HOME_PROCESSED="$new_path"
26021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26022$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26023  fi
26024
26025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26027
26028    else
26029      # We're on a unix platform. Hooray! :)
26030      path="$JAVA_HOME_PROCESSED"
26031      has_space=`$ECHO "$path" | $GREP " "`
26032      if test "x$has_space" != x; then
26033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26034$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26036      fi
26037
26038      # Use eval to expand a potential ~
26039      eval path="$path"
26040      if test ! -f "$path" && test ! -d "$path"; then
26041        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26042      fi
26043
26044      if test -d "$path"; then
26045        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26046      else
26047        dir="`$DIRNAME "$path"`"
26048        base="`$BASENAME "$path"`"
26049        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26050      fi
26051    fi
26052  fi
26053
26054    if test ! -d "$JAVA_HOME_PROCESSED"; then
26055      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26056$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26057    else
26058      # Aha, the user has set a JAVA_HOME
26059      # let us use that as the Boot JDK.
26060      BOOT_JDK="$JAVA_HOME_PROCESSED"
26061      BOOT_JDK_FOUND=maybe
26062      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26063$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26064    fi
26065  fi
26066
26067
26068    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26069    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26070      # Do we have a bin/java?
26071      if test ! -x "$BOOT_JDK/bin/java"; then
26072        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26074        BOOT_JDK_FOUND=no
26075      else
26076        # Do we have a bin/javac?
26077        if test ! -x "$BOOT_JDK/bin/javac"; then
26078          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26080          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26081$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26082          BOOT_JDK_FOUND=no
26083        else
26084          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26085          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26086
26087          # Extra M4 quote needed to protect [] in grep expression.
26088          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26089          if test "x$FOUND_CORRECT_VERSION" = x; then
26090            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26091$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26092            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26093$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26094            BOOT_JDK_FOUND=no
26095          else
26096            # We're done! :-)
26097            BOOT_JDK_FOUND=yes
26098
26099  # Only process if variable expands to non-empty
26100
26101  if test "x$BOOT_JDK" != x; then
26102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26103
26104  # Input might be given as Windows format, start by converting to
26105  # unix format.
26106  path="$BOOT_JDK"
26107  new_path=`$CYGPATH -u "$path"`
26108
26109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26112  # "foo.exe" is OK but "foo" is an error.
26113  #
26114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26115  # It is also a way to make sure we got the proper file name for the real test later on.
26116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26117  if test "x$test_shortpath" = x; then
26118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26120    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26121  fi
26122
26123  # Call helper function which possibly converts this using DOS-style short mode.
26124  # If so, the updated path is stored in $new_path.
26125
26126  input_path="$new_path"
26127  # Check if we need to convert this using DOS-style short mode. If the path
26128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26129  # take no chances and rewrite it.
26130  # Note: m4 eats our [], so we need to use [ and ] instead.
26131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26132  if test "x$has_forbidden_chars" != x; then
26133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26137      # Going to short mode and back again did indeed matter. Since short mode is
26138      # case insensitive, let's make it lowercase to improve readability.
26139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26140      # Now convert it back to Unix-style (cygpath)
26141      input_path=`$CYGPATH -u "$shortmode_path"`
26142      new_path="$input_path"
26143    fi
26144  fi
26145
26146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26147  if test "x$test_cygdrive_prefix" = x; then
26148    # As a simple fix, exclude /usr/bin since it's not a real path.
26149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26151      # a path prefixed by /cygdrive for fixpath to work.
26152      new_path="$CYGWIN_ROOT_PATH$input_path"
26153    fi
26154  fi
26155
26156
26157  if test "x$path" != "x$new_path"; then
26158    BOOT_JDK="$new_path"
26159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26161  fi
26162
26163    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26164
26165  path="$BOOT_JDK"
26166  has_colon=`$ECHO $path | $GREP ^.:`
26167  new_path="$path"
26168  if test "x$has_colon" = x; then
26169    # Not in mixed or Windows style, start by that.
26170    new_path=`cmd //c echo $path`
26171  fi
26172
26173
26174  input_path="$new_path"
26175  # Check if we need to convert this using DOS-style short mode. If the path
26176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26177  # take no chances and rewrite it.
26178  # Note: m4 eats our [], so we need to use [ and ] instead.
26179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26180  if test "x$has_forbidden_chars" != x; then
26181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26183  fi
26184
26185
26186  windows_path="$new_path"
26187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26188    unix_path=`$CYGPATH -u "$windows_path"`
26189    new_path="$unix_path"
26190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26192    new_path="$unix_path"
26193  fi
26194
26195  if test "x$path" != "x$new_path"; then
26196    BOOT_JDK="$new_path"
26197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26198$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26199  fi
26200
26201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26203
26204    else
26205      # We're on a unix platform. Hooray! :)
26206      path="$BOOT_JDK"
26207      has_space=`$ECHO "$path" | $GREP " "`
26208      if test "x$has_space" != x; then
26209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26211        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26212      fi
26213
26214      # Use eval to expand a potential ~
26215      eval path="$path"
26216      if test ! -f "$path" && test ! -d "$path"; then
26217        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26218      fi
26219
26220      if test -d "$path"; then
26221        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26222      else
26223        dir="`$DIRNAME "$path"`"
26224        base="`$BASENAME "$path"`"
26225        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26226      fi
26227    fi
26228  fi
26229
26230            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26231$as_echo_n "checking for Boot JDK... " >&6; }
26232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26233$as_echo "$BOOT_JDK" >&6; }
26234            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26235$as_echo_n "checking Boot JDK version... " >&6; }
26236            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26238$as_echo "$BOOT_JDK_VERSION" >&6; }
26239          fi # end check jdk version
26240        fi # end check javac
26241      fi # end check java
26242    fi # end check boot jdk found
26243  fi
26244
26245
26246  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26247
26248  if test "x$BOOT_JDK_FOUND" = xno; then
26249    # Now execute the test
26250
26251  # Extract the first word of "javac", so it can be a program name with args.
26252set dummy javac; ac_word=$2
26253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26254$as_echo_n "checking for $ac_word... " >&6; }
26255if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26256  $as_echo_n "(cached) " >&6
26257else
26258  case $JAVAC_CHECK in
26259  [\\/]* | ?:[\\/]*)
26260  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26261  ;;
26262  *)
26263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26264for as_dir in $PATH
26265do
26266  IFS=$as_save_IFS
26267  test -z "$as_dir" && as_dir=.
26268    for ac_exec_ext in '' $ac_executable_extensions; do
26269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26270    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26272    break 2
26273  fi
26274done
26275  done
26276IFS=$as_save_IFS
26277
26278  ;;
26279esac
26280fi
26281JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26282if test -n "$JAVAC_CHECK"; then
26283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26284$as_echo "$JAVAC_CHECK" >&6; }
26285else
26286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26287$as_echo "no" >&6; }
26288fi
26289
26290
26291  # Extract the first word of "java", so it can be a program name with args.
26292set dummy java; ac_word=$2
26293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26294$as_echo_n "checking for $ac_word... " >&6; }
26295if ${ac_cv_path_JAVA_CHECK+:} false; then :
26296  $as_echo_n "(cached) " >&6
26297else
26298  case $JAVA_CHECK in
26299  [\\/]* | ?:[\\/]*)
26300  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26301  ;;
26302  *)
26303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26304for as_dir in $PATH
26305do
26306  IFS=$as_save_IFS
26307  test -z "$as_dir" && as_dir=.
26308    for ac_exec_ext in '' $ac_executable_extensions; do
26309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26310    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26312    break 2
26313  fi
26314done
26315  done
26316IFS=$as_save_IFS
26317
26318  ;;
26319esac
26320fi
26321JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26322if test -n "$JAVA_CHECK"; then
26323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26324$as_echo "$JAVA_CHECK" >&6; }
26325else
26326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26327$as_echo "no" >&6; }
26328fi
26329
26330
26331  BINARY="$JAVAC_CHECK"
26332  if test "x$JAVAC_CHECK" = x; then
26333    BINARY="$JAVA_CHECK"
26334  fi
26335  if test "x$BINARY" != x; then
26336    # So there is a java(c) binary, it might be part of a JDK.
26337    # Lets find the JDK/JRE directory by following symbolic links.
26338    # Linux/GNU systems often have links from /usr/bin/java to
26339    # /etc/alternatives/java to the real JDK binary.
26340
26341  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26342    # Follow a chain of symbolic links. Use readlink
26343    # where it exists, else fall back to horribly
26344    # complicated shell code.
26345    if test "x$READLINK_TESTED" != yes; then
26346      # On MacOSX there is a readlink tool with a different
26347      # purpose than the GNU readlink tool. Check the found readlink.
26348      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26349      if test "x$ISGNU" = x; then
26350        # A readlink that we do not know how to use.
26351        # Are there other non-GNU readlinks out there?
26352        READLINK_TESTED=yes
26353        READLINK=
26354      fi
26355    fi
26356
26357    if test "x$READLINK" != x; then
26358      BINARY=`$READLINK -f $BINARY`
26359    else
26360      # Save the current directory for restoring afterwards
26361      STARTDIR=$PWD
26362      COUNTER=0
26363      sym_link_dir=`$DIRNAME $BINARY`
26364      sym_link_file=`$BASENAME $BINARY`
26365      cd $sym_link_dir
26366      # Use -P flag to resolve symlinks in directories.
26367      cd `$THEPWDCMD -P`
26368      sym_link_dir=`$THEPWDCMD -P`
26369      # Resolve file symlinks
26370      while test $COUNTER -lt 20; do
26371        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26372        if test "x$ISLINK" == x; then
26373          # This is not a symbolic link! We are done!
26374          break
26375        fi
26376        # Again resolve directory symlinks since the target of the just found
26377        # link could be in a different directory
26378        cd `$DIRNAME $ISLINK`
26379        sym_link_dir=`$THEPWDCMD -P`
26380        sym_link_file=`$BASENAME $ISLINK`
26381        let COUNTER=COUNTER+1
26382      done
26383      cd $STARTDIR
26384      BINARY=$sym_link_dir/$sym_link_file
26385    fi
26386  fi
26387
26388    BOOT_JDK=`dirname "$BINARY"`
26389    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26390    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26391      # Looks like we found ourselves an JDK
26392      BOOT_JDK_FOUND=maybe
26393      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26394$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26395    fi
26396  fi
26397
26398
26399    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26400    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26401      # Do we have a bin/java?
26402      if test ! -x "$BOOT_JDK/bin/java"; then
26403        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26405        BOOT_JDK_FOUND=no
26406      else
26407        # Do we have a bin/javac?
26408        if test ! -x "$BOOT_JDK/bin/javac"; then
26409          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26411          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26412$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26413          BOOT_JDK_FOUND=no
26414        else
26415          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26416          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26417
26418          # Extra M4 quote needed to protect [] in grep expression.
26419          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26420          if test "x$FOUND_CORRECT_VERSION" = x; then
26421            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26423            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26424$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26425            BOOT_JDK_FOUND=no
26426          else
26427            # We're done! :-)
26428            BOOT_JDK_FOUND=yes
26429
26430  # Only process if variable expands to non-empty
26431
26432  if test "x$BOOT_JDK" != x; then
26433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26434
26435  # Input might be given as Windows format, start by converting to
26436  # unix format.
26437  path="$BOOT_JDK"
26438  new_path=`$CYGPATH -u "$path"`
26439
26440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26443  # "foo.exe" is OK but "foo" is an error.
26444  #
26445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26446  # It is also a way to make sure we got the proper file name for the real test later on.
26447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26448  if test "x$test_shortpath" = x; then
26449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26451    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26452  fi
26453
26454  # Call helper function which possibly converts this using DOS-style short mode.
26455  # If so, the updated path is stored in $new_path.
26456
26457  input_path="$new_path"
26458  # Check if we need to convert this using DOS-style short mode. If the path
26459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26460  # take no chances and rewrite it.
26461  # Note: m4 eats our [], so we need to use [ and ] instead.
26462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26463  if test "x$has_forbidden_chars" != x; then
26464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26468      # Going to short mode and back again did indeed matter. Since short mode is
26469      # case insensitive, let's make it lowercase to improve readability.
26470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26471      # Now convert it back to Unix-style (cygpath)
26472      input_path=`$CYGPATH -u "$shortmode_path"`
26473      new_path="$input_path"
26474    fi
26475  fi
26476
26477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26478  if test "x$test_cygdrive_prefix" = x; then
26479    # As a simple fix, exclude /usr/bin since it's not a real path.
26480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26482      # a path prefixed by /cygdrive for fixpath to work.
26483      new_path="$CYGWIN_ROOT_PATH$input_path"
26484    fi
26485  fi
26486
26487
26488  if test "x$path" != "x$new_path"; then
26489    BOOT_JDK="$new_path"
26490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26492  fi
26493
26494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26495
26496  path="$BOOT_JDK"
26497  has_colon=`$ECHO $path | $GREP ^.:`
26498  new_path="$path"
26499  if test "x$has_colon" = x; then
26500    # Not in mixed or Windows style, start by that.
26501    new_path=`cmd //c echo $path`
26502  fi
26503
26504
26505  input_path="$new_path"
26506  # Check if we need to convert this using DOS-style short mode. If the path
26507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26508  # take no chances and rewrite it.
26509  # Note: m4 eats our [], so we need to use [ and ] instead.
26510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26511  if test "x$has_forbidden_chars" != x; then
26512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26514  fi
26515
26516
26517  windows_path="$new_path"
26518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26519    unix_path=`$CYGPATH -u "$windows_path"`
26520    new_path="$unix_path"
26521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26523    new_path="$unix_path"
26524  fi
26525
26526  if test "x$path" != "x$new_path"; then
26527    BOOT_JDK="$new_path"
26528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26530  fi
26531
26532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26534
26535    else
26536      # We're on a unix platform. Hooray! :)
26537      path="$BOOT_JDK"
26538      has_space=`$ECHO "$path" | $GREP " "`
26539      if test "x$has_space" != x; then
26540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26542        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26543      fi
26544
26545      # Use eval to expand a potential ~
26546      eval path="$path"
26547      if test ! -f "$path" && test ! -d "$path"; then
26548        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26549      fi
26550
26551      if test -d "$path"; then
26552        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26553      else
26554        dir="`$DIRNAME "$path"`"
26555        base="`$BASENAME "$path"`"
26556        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26557      fi
26558    fi
26559  fi
26560
26561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26562$as_echo_n "checking for Boot JDK... " >&6; }
26563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26564$as_echo "$BOOT_JDK" >&6; }
26565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26566$as_echo_n "checking Boot JDK version... " >&6; }
26567            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26569$as_echo "$BOOT_JDK_VERSION" >&6; }
26570          fi # end check jdk version
26571        fi # end check javac
26572      fi # end check java
26573    fi # end check boot jdk found
26574  fi
26575
26576
26577  # Test: Is there a JDK installed in default, well-known locations?
26578
26579  if test "x$BOOT_JDK_FOUND" = xno; then
26580    # Now execute the test
26581
26582  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26583
26584  if test "x$BOOT_JDK_FOUND" = xno; then
26585    # Now execute the test
26586
26587  if test "x$ProgramW6432" != x; then
26588    VIRTUAL_DIR="$ProgramW6432/Java"
26589
26590  windows_path="$VIRTUAL_DIR"
26591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26592    unix_path=`$CYGPATH -u "$windows_path"`
26593    VIRTUAL_DIR="$unix_path"
26594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26596    VIRTUAL_DIR="$unix_path"
26597  fi
26598
26599
26600  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26601  BOOT_JDK_SUFFIX=""
26602  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26603  if test "x$ALL_JDKS_FOUND" != x; then
26604    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26605
26606  if test "x$BOOT_JDK_FOUND" = xno; then
26607    # Now execute the test
26608
26609        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26610        if test -d "$BOOT_JDK"; then
26611          BOOT_JDK_FOUND=maybe
26612          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26613$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26614        fi
26615
26616
26617    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26618    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26619      # Do we have a bin/java?
26620      if test ! -x "$BOOT_JDK/bin/java"; then
26621        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26623        BOOT_JDK_FOUND=no
26624      else
26625        # Do we have a bin/javac?
26626        if test ! -x "$BOOT_JDK/bin/javac"; then
26627          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26629          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26630$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26631          BOOT_JDK_FOUND=no
26632        else
26633          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26634          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26635
26636          # Extra M4 quote needed to protect [] in grep expression.
26637          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26638          if test "x$FOUND_CORRECT_VERSION" = x; then
26639            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26641            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26642$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26643            BOOT_JDK_FOUND=no
26644          else
26645            # We're done! :-)
26646            BOOT_JDK_FOUND=yes
26647
26648  # Only process if variable expands to non-empty
26649
26650  if test "x$BOOT_JDK" != x; then
26651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26652
26653  # Input might be given as Windows format, start by converting to
26654  # unix format.
26655  path="$BOOT_JDK"
26656  new_path=`$CYGPATH -u "$path"`
26657
26658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26661  # "foo.exe" is OK but "foo" is an error.
26662  #
26663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26664  # It is also a way to make sure we got the proper file name for the real test later on.
26665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26666  if test "x$test_shortpath" = x; then
26667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26668$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26669    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26670  fi
26671
26672  # Call helper function which possibly converts this using DOS-style short mode.
26673  # If so, the updated path is stored in $new_path.
26674
26675  input_path="$new_path"
26676  # Check if we need to convert this using DOS-style short mode. If the path
26677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26678  # take no chances and rewrite it.
26679  # Note: m4 eats our [], so we need to use [ and ] instead.
26680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26681  if test "x$has_forbidden_chars" != x; then
26682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26686      # Going to short mode and back again did indeed matter. Since short mode is
26687      # case insensitive, let's make it lowercase to improve readability.
26688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26689      # Now convert it back to Unix-style (cygpath)
26690      input_path=`$CYGPATH -u "$shortmode_path"`
26691      new_path="$input_path"
26692    fi
26693  fi
26694
26695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26696  if test "x$test_cygdrive_prefix" = x; then
26697    # As a simple fix, exclude /usr/bin since it's not a real path.
26698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26700      # a path prefixed by /cygdrive for fixpath to work.
26701      new_path="$CYGWIN_ROOT_PATH$input_path"
26702    fi
26703  fi
26704
26705
26706  if test "x$path" != "x$new_path"; then
26707    BOOT_JDK="$new_path"
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26710  fi
26711
26712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26713
26714  path="$BOOT_JDK"
26715  has_colon=`$ECHO $path | $GREP ^.:`
26716  new_path="$path"
26717  if test "x$has_colon" = x; then
26718    # Not in mixed or Windows style, start by that.
26719    new_path=`cmd //c echo $path`
26720  fi
26721
26722
26723  input_path="$new_path"
26724  # Check if we need to convert this using DOS-style short mode. If the path
26725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26726  # take no chances and rewrite it.
26727  # Note: m4 eats our [], so we need to use [ and ] instead.
26728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26729  if test "x$has_forbidden_chars" != x; then
26730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26732  fi
26733
26734
26735  windows_path="$new_path"
26736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26737    unix_path=`$CYGPATH -u "$windows_path"`
26738    new_path="$unix_path"
26739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26741    new_path="$unix_path"
26742  fi
26743
26744  if test "x$path" != "x$new_path"; then
26745    BOOT_JDK="$new_path"
26746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26747$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26748  fi
26749
26750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26752
26753    else
26754      # We're on a unix platform. Hooray! :)
26755      path="$BOOT_JDK"
26756      has_space=`$ECHO "$path" | $GREP " "`
26757      if test "x$has_space" != x; then
26758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26761      fi
26762
26763      # Use eval to expand a potential ~
26764      eval path="$path"
26765      if test ! -f "$path" && test ! -d "$path"; then
26766        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26767      fi
26768
26769      if test -d "$path"; then
26770        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26771      else
26772        dir="`$DIRNAME "$path"`"
26773        base="`$BASENAME "$path"`"
26774        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26775      fi
26776    fi
26777  fi
26778
26779            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26780$as_echo_n "checking for Boot JDK... " >&6; }
26781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26782$as_echo "$BOOT_JDK" >&6; }
26783            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26784$as_echo_n "checking Boot JDK version... " >&6; }
26785            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26787$as_echo "$BOOT_JDK_VERSION" >&6; }
26788          fi # end check jdk version
26789        fi # end check javac
26790      fi # end check java
26791    fi # end check boot jdk found
26792  fi
26793
26794    done
26795  fi
26796
26797  fi
26798
26799
26800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26802      # Do we have a bin/java?
26803      if test ! -x "$BOOT_JDK/bin/java"; then
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26806        BOOT_JDK_FOUND=no
26807      else
26808        # Do we have a bin/javac?
26809        if test ! -x "$BOOT_JDK/bin/javac"; then
26810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26814          BOOT_JDK_FOUND=no
26815        else
26816          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26817          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26818
26819          # Extra M4 quote needed to protect [] in grep expression.
26820          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26821          if test "x$FOUND_CORRECT_VERSION" = x; then
26822            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26824            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26825$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26826            BOOT_JDK_FOUND=no
26827          else
26828            # We're done! :-)
26829            BOOT_JDK_FOUND=yes
26830
26831  # Only process if variable expands to non-empty
26832
26833  if test "x$BOOT_JDK" != x; then
26834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26835
26836  # Input might be given as Windows format, start by converting to
26837  # unix format.
26838  path="$BOOT_JDK"
26839  new_path=`$CYGPATH -u "$path"`
26840
26841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26844  # "foo.exe" is OK but "foo" is an error.
26845  #
26846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26847  # It is also a way to make sure we got the proper file name for the real test later on.
26848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26849  if test "x$test_shortpath" = x; then
26850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26853  fi
26854
26855  # Call helper function which possibly converts this using DOS-style short mode.
26856  # If so, the updated path is stored in $new_path.
26857
26858  input_path="$new_path"
26859  # Check if we need to convert this using DOS-style short mode. If the path
26860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26861  # take no chances and rewrite it.
26862  # Note: m4 eats our [], so we need to use [ and ] instead.
26863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26864  if test "x$has_forbidden_chars" != x; then
26865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26869      # Going to short mode and back again did indeed matter. Since short mode is
26870      # case insensitive, let's make it lowercase to improve readability.
26871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26872      # Now convert it back to Unix-style (cygpath)
26873      input_path=`$CYGPATH -u "$shortmode_path"`
26874      new_path="$input_path"
26875    fi
26876  fi
26877
26878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26879  if test "x$test_cygdrive_prefix" = x; then
26880    # As a simple fix, exclude /usr/bin since it's not a real path.
26881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26883      # a path prefixed by /cygdrive for fixpath to work.
26884      new_path="$CYGWIN_ROOT_PATH$input_path"
26885    fi
26886  fi
26887
26888
26889  if test "x$path" != "x$new_path"; then
26890    BOOT_JDK="$new_path"
26891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26893  fi
26894
26895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26896
26897  path="$BOOT_JDK"
26898  has_colon=`$ECHO $path | $GREP ^.:`
26899  new_path="$path"
26900  if test "x$has_colon" = x; then
26901    # Not in mixed or Windows style, start by that.
26902    new_path=`cmd //c echo $path`
26903  fi
26904
26905
26906  input_path="$new_path"
26907  # Check if we need to convert this using DOS-style short mode. If the path
26908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26909  # take no chances and rewrite it.
26910  # Note: m4 eats our [], so we need to use [ and ] instead.
26911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26912  if test "x$has_forbidden_chars" != x; then
26913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26915  fi
26916
26917
26918  windows_path="$new_path"
26919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26920    unix_path=`$CYGPATH -u "$windows_path"`
26921    new_path="$unix_path"
26922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26924    new_path="$unix_path"
26925  fi
26926
26927  if test "x$path" != "x$new_path"; then
26928    BOOT_JDK="$new_path"
26929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26931  fi
26932
26933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26935
26936    else
26937      # We're on a unix platform. Hooray! :)
26938      path="$BOOT_JDK"
26939      has_space=`$ECHO "$path" | $GREP " "`
26940      if test "x$has_space" != x; then
26941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26944      fi
26945
26946      # Use eval to expand a potential ~
26947      eval path="$path"
26948      if test ! -f "$path" && test ! -d "$path"; then
26949        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26950      fi
26951
26952      if test -d "$path"; then
26953        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26954      else
26955        dir="`$DIRNAME "$path"`"
26956        base="`$BASENAME "$path"`"
26957        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26958      fi
26959    fi
26960  fi
26961
26962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26963$as_echo_n "checking for Boot JDK... " >&6; }
26964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26965$as_echo "$BOOT_JDK" >&6; }
26966            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26967$as_echo_n "checking Boot JDK version... " >&6; }
26968            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26970$as_echo "$BOOT_JDK_VERSION" >&6; }
26971          fi # end check jdk version
26972        fi # end check javac
26973      fi # end check java
26974    fi # end check boot jdk found
26975  fi
26976
26977
26978  if test "x$BOOT_JDK_FOUND" = xno; then
26979    # Now execute the test
26980
26981  if test "x$PROGRAMW6432" != x; then
26982    VIRTUAL_DIR="$PROGRAMW6432/Java"
26983
26984  windows_path="$VIRTUAL_DIR"
26985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26986    unix_path=`$CYGPATH -u "$windows_path"`
26987    VIRTUAL_DIR="$unix_path"
26988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26990    VIRTUAL_DIR="$unix_path"
26991  fi
26992
26993
26994  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26995  BOOT_JDK_SUFFIX=""
26996  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26997  if test "x$ALL_JDKS_FOUND" != x; then
26998    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26999
27000  if test "x$BOOT_JDK_FOUND" = xno; then
27001    # Now execute the test
27002
27003        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27004        if test -d "$BOOT_JDK"; then
27005          BOOT_JDK_FOUND=maybe
27006          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27007$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27008        fi
27009
27010
27011    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27012    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27013      # Do we have a bin/java?
27014      if test ! -x "$BOOT_JDK/bin/java"; then
27015        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27017        BOOT_JDK_FOUND=no
27018      else
27019        # Do we have a bin/javac?
27020        if test ! -x "$BOOT_JDK/bin/javac"; then
27021          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27023          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27024$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27025          BOOT_JDK_FOUND=no
27026        else
27027          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27028          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27029
27030          # Extra M4 quote needed to protect [] in grep expression.
27031          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27032          if test "x$FOUND_CORRECT_VERSION" = x; then
27033            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27035            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27036$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27037            BOOT_JDK_FOUND=no
27038          else
27039            # We're done! :-)
27040            BOOT_JDK_FOUND=yes
27041
27042  # Only process if variable expands to non-empty
27043
27044  if test "x$BOOT_JDK" != x; then
27045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27046
27047  # Input might be given as Windows format, start by converting to
27048  # unix format.
27049  path="$BOOT_JDK"
27050  new_path=`$CYGPATH -u "$path"`
27051
27052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27055  # "foo.exe" is OK but "foo" is an error.
27056  #
27057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27058  # It is also a way to make sure we got the proper file name for the real test later on.
27059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27060  if test "x$test_shortpath" = x; then
27061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27063    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27064  fi
27065
27066  # Call helper function which possibly converts this using DOS-style short mode.
27067  # If so, the updated path is stored in $new_path.
27068
27069  input_path="$new_path"
27070  # Check if we need to convert this using DOS-style short mode. If the path
27071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27072  # take no chances and rewrite it.
27073  # Note: m4 eats our [], so we need to use [ and ] instead.
27074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27075  if test "x$has_forbidden_chars" != x; then
27076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27080      # Going to short mode and back again did indeed matter. Since short mode is
27081      # case insensitive, let's make it lowercase to improve readability.
27082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27083      # Now convert it back to Unix-style (cygpath)
27084      input_path=`$CYGPATH -u "$shortmode_path"`
27085      new_path="$input_path"
27086    fi
27087  fi
27088
27089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27090  if test "x$test_cygdrive_prefix" = x; then
27091    # As a simple fix, exclude /usr/bin since it's not a real path.
27092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27094      # a path prefixed by /cygdrive for fixpath to work.
27095      new_path="$CYGWIN_ROOT_PATH$input_path"
27096    fi
27097  fi
27098
27099
27100  if test "x$path" != "x$new_path"; then
27101    BOOT_JDK="$new_path"
27102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27104  fi
27105
27106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27107
27108  path="$BOOT_JDK"
27109  has_colon=`$ECHO $path | $GREP ^.:`
27110  new_path="$path"
27111  if test "x$has_colon" = x; then
27112    # Not in mixed or Windows style, start by that.
27113    new_path=`cmd //c echo $path`
27114  fi
27115
27116
27117  input_path="$new_path"
27118  # Check if we need to convert this using DOS-style short mode. If the path
27119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27120  # take no chances and rewrite it.
27121  # Note: m4 eats our [], so we need to use [ and ] instead.
27122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27123  if test "x$has_forbidden_chars" != x; then
27124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27126  fi
27127
27128
27129  windows_path="$new_path"
27130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27131    unix_path=`$CYGPATH -u "$windows_path"`
27132    new_path="$unix_path"
27133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27135    new_path="$unix_path"
27136  fi
27137
27138  if test "x$path" != "x$new_path"; then
27139    BOOT_JDK="$new_path"
27140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27142  fi
27143
27144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27146
27147    else
27148      # We're on a unix platform. Hooray! :)
27149      path="$BOOT_JDK"
27150      has_space=`$ECHO "$path" | $GREP " "`
27151      if test "x$has_space" != x; then
27152        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27153$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27154        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27155      fi
27156
27157      # Use eval to expand a potential ~
27158      eval path="$path"
27159      if test ! -f "$path" && test ! -d "$path"; then
27160        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27161      fi
27162
27163      if test -d "$path"; then
27164        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27165      else
27166        dir="`$DIRNAME "$path"`"
27167        base="`$BASENAME "$path"`"
27168        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27169      fi
27170    fi
27171  fi
27172
27173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27174$as_echo_n "checking for Boot JDK... " >&6; }
27175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27176$as_echo "$BOOT_JDK" >&6; }
27177            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27178$as_echo_n "checking Boot JDK version... " >&6; }
27179            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27181$as_echo "$BOOT_JDK_VERSION" >&6; }
27182          fi # end check jdk version
27183        fi # end check javac
27184      fi # end check java
27185    fi # end check boot jdk found
27186  fi
27187
27188    done
27189  fi
27190
27191  fi
27192
27193
27194    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27195    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27196      # Do we have a bin/java?
27197      if test ! -x "$BOOT_JDK/bin/java"; then
27198        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27200        BOOT_JDK_FOUND=no
27201      else
27202        # Do we have a bin/javac?
27203        if test ! -x "$BOOT_JDK/bin/javac"; then
27204          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27206          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27207$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27208          BOOT_JDK_FOUND=no
27209        else
27210          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27211          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27212
27213          # Extra M4 quote needed to protect [] in grep expression.
27214          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27215          if test "x$FOUND_CORRECT_VERSION" = x; then
27216            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27218            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27219$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27220            BOOT_JDK_FOUND=no
27221          else
27222            # We're done! :-)
27223            BOOT_JDK_FOUND=yes
27224
27225  # Only process if variable expands to non-empty
27226
27227  if test "x$BOOT_JDK" != x; then
27228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27229
27230  # Input might be given as Windows format, start by converting to
27231  # unix format.
27232  path="$BOOT_JDK"
27233  new_path=`$CYGPATH -u "$path"`
27234
27235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27238  # "foo.exe" is OK but "foo" is an error.
27239  #
27240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27241  # It is also a way to make sure we got the proper file name for the real test later on.
27242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27243  if test "x$test_shortpath" = x; then
27244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27246    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27247  fi
27248
27249  # Call helper function which possibly converts this using DOS-style short mode.
27250  # If so, the updated path is stored in $new_path.
27251
27252  input_path="$new_path"
27253  # Check if we need to convert this using DOS-style short mode. If the path
27254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27255  # take no chances and rewrite it.
27256  # Note: m4 eats our [], so we need to use [ and ] instead.
27257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27258  if test "x$has_forbidden_chars" != x; then
27259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27263      # Going to short mode and back again did indeed matter. Since short mode is
27264      # case insensitive, let's make it lowercase to improve readability.
27265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27266      # Now convert it back to Unix-style (cygpath)
27267      input_path=`$CYGPATH -u "$shortmode_path"`
27268      new_path="$input_path"
27269    fi
27270  fi
27271
27272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27273  if test "x$test_cygdrive_prefix" = x; then
27274    # As a simple fix, exclude /usr/bin since it's not a real path.
27275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27277      # a path prefixed by /cygdrive for fixpath to work.
27278      new_path="$CYGWIN_ROOT_PATH$input_path"
27279    fi
27280  fi
27281
27282
27283  if test "x$path" != "x$new_path"; then
27284    BOOT_JDK="$new_path"
27285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27287  fi
27288
27289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27290
27291  path="$BOOT_JDK"
27292  has_colon=`$ECHO $path | $GREP ^.:`
27293  new_path="$path"
27294  if test "x$has_colon" = x; then
27295    # Not in mixed or Windows style, start by that.
27296    new_path=`cmd //c echo $path`
27297  fi
27298
27299
27300  input_path="$new_path"
27301  # Check if we need to convert this using DOS-style short mode. If the path
27302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27303  # take no chances and rewrite it.
27304  # Note: m4 eats our [], so we need to use [ and ] instead.
27305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27306  if test "x$has_forbidden_chars" != x; then
27307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27309  fi
27310
27311
27312  windows_path="$new_path"
27313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27314    unix_path=`$CYGPATH -u "$windows_path"`
27315    new_path="$unix_path"
27316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27318    new_path="$unix_path"
27319  fi
27320
27321  if test "x$path" != "x$new_path"; then
27322    BOOT_JDK="$new_path"
27323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27325  fi
27326
27327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27329
27330    else
27331      # We're on a unix platform. Hooray! :)
27332      path="$BOOT_JDK"
27333      has_space=`$ECHO "$path" | $GREP " "`
27334      if test "x$has_space" != x; then
27335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27338      fi
27339
27340      # Use eval to expand a potential ~
27341      eval path="$path"
27342      if test ! -f "$path" && test ! -d "$path"; then
27343        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27344      fi
27345
27346      if test -d "$path"; then
27347        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27348      else
27349        dir="`$DIRNAME "$path"`"
27350        base="`$BASENAME "$path"`"
27351        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27352      fi
27353    fi
27354  fi
27355
27356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27357$as_echo_n "checking for Boot JDK... " >&6; }
27358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27359$as_echo "$BOOT_JDK" >&6; }
27360            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27361$as_echo_n "checking Boot JDK version... " >&6; }
27362            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27364$as_echo "$BOOT_JDK_VERSION" >&6; }
27365          fi # end check jdk version
27366        fi # end check javac
27367      fi # end check java
27368    fi # end check boot jdk found
27369  fi
27370
27371
27372  if test "x$BOOT_JDK_FOUND" = xno; then
27373    # Now execute the test
27374
27375  if test "x$PROGRAMFILES" != x; then
27376    VIRTUAL_DIR="$PROGRAMFILES/Java"
27377
27378  windows_path="$VIRTUAL_DIR"
27379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27380    unix_path=`$CYGPATH -u "$windows_path"`
27381    VIRTUAL_DIR="$unix_path"
27382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27384    VIRTUAL_DIR="$unix_path"
27385  fi
27386
27387
27388  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27389  BOOT_JDK_SUFFIX=""
27390  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27391  if test "x$ALL_JDKS_FOUND" != x; then
27392    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27393
27394  if test "x$BOOT_JDK_FOUND" = xno; then
27395    # Now execute the test
27396
27397        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27398        if test -d "$BOOT_JDK"; then
27399          BOOT_JDK_FOUND=maybe
27400          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27401$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27402        fi
27403
27404
27405    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27406    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27407      # Do we have a bin/java?
27408      if test ! -x "$BOOT_JDK/bin/java"; then
27409        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27411        BOOT_JDK_FOUND=no
27412      else
27413        # Do we have a bin/javac?
27414        if test ! -x "$BOOT_JDK/bin/javac"; then
27415          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27417          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27418$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27419          BOOT_JDK_FOUND=no
27420        else
27421          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27422          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27423
27424          # Extra M4 quote needed to protect [] in grep expression.
27425          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27426          if test "x$FOUND_CORRECT_VERSION" = x; then
27427            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27429            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27430$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27431            BOOT_JDK_FOUND=no
27432          else
27433            # We're done! :-)
27434            BOOT_JDK_FOUND=yes
27435
27436  # Only process if variable expands to non-empty
27437
27438  if test "x$BOOT_JDK" != x; then
27439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27440
27441  # Input might be given as Windows format, start by converting to
27442  # unix format.
27443  path="$BOOT_JDK"
27444  new_path=`$CYGPATH -u "$path"`
27445
27446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27449  # "foo.exe" is OK but "foo" is an error.
27450  #
27451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27452  # It is also a way to make sure we got the proper file name for the real test later on.
27453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27454  if test "x$test_shortpath" = x; then
27455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27457    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27458  fi
27459
27460  # Call helper function which possibly converts this using DOS-style short mode.
27461  # If so, the updated path is stored in $new_path.
27462
27463  input_path="$new_path"
27464  # Check if we need to convert this using DOS-style short mode. If the path
27465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27466  # take no chances and rewrite it.
27467  # Note: m4 eats our [], so we need to use [ and ] instead.
27468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27469  if test "x$has_forbidden_chars" != x; then
27470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27474      # Going to short mode and back again did indeed matter. Since short mode is
27475      # case insensitive, let's make it lowercase to improve readability.
27476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27477      # Now convert it back to Unix-style (cygpath)
27478      input_path=`$CYGPATH -u "$shortmode_path"`
27479      new_path="$input_path"
27480    fi
27481  fi
27482
27483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27484  if test "x$test_cygdrive_prefix" = x; then
27485    # As a simple fix, exclude /usr/bin since it's not a real path.
27486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27488      # a path prefixed by /cygdrive for fixpath to work.
27489      new_path="$CYGWIN_ROOT_PATH$input_path"
27490    fi
27491  fi
27492
27493
27494  if test "x$path" != "x$new_path"; then
27495    BOOT_JDK="$new_path"
27496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27498  fi
27499
27500    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27501
27502  path="$BOOT_JDK"
27503  has_colon=`$ECHO $path | $GREP ^.:`
27504  new_path="$path"
27505  if test "x$has_colon" = x; then
27506    # Not in mixed or Windows style, start by that.
27507    new_path=`cmd //c echo $path`
27508  fi
27509
27510
27511  input_path="$new_path"
27512  # Check if we need to convert this using DOS-style short mode. If the path
27513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27514  # take no chances and rewrite it.
27515  # Note: m4 eats our [], so we need to use [ and ] instead.
27516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27517  if test "x$has_forbidden_chars" != x; then
27518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27520  fi
27521
27522
27523  windows_path="$new_path"
27524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27525    unix_path=`$CYGPATH -u "$windows_path"`
27526    new_path="$unix_path"
27527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27529    new_path="$unix_path"
27530  fi
27531
27532  if test "x$path" != "x$new_path"; then
27533    BOOT_JDK="$new_path"
27534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27536  fi
27537
27538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27540
27541    else
27542      # We're on a unix platform. Hooray! :)
27543      path="$BOOT_JDK"
27544      has_space=`$ECHO "$path" | $GREP " "`
27545      if test "x$has_space" != x; then
27546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27548        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27549      fi
27550
27551      # Use eval to expand a potential ~
27552      eval path="$path"
27553      if test ! -f "$path" && test ! -d "$path"; then
27554        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27555      fi
27556
27557      if test -d "$path"; then
27558        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27559      else
27560        dir="`$DIRNAME "$path"`"
27561        base="`$BASENAME "$path"`"
27562        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27563      fi
27564    fi
27565  fi
27566
27567            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27568$as_echo_n "checking for Boot JDK... " >&6; }
27569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27570$as_echo "$BOOT_JDK" >&6; }
27571            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27572$as_echo_n "checking Boot JDK version... " >&6; }
27573            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27575$as_echo "$BOOT_JDK_VERSION" >&6; }
27576          fi # end check jdk version
27577        fi # end check javac
27578      fi # end check java
27579    fi # end check boot jdk found
27580  fi
27581
27582    done
27583  fi
27584
27585  fi
27586
27587
27588    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27589    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27590      # Do we have a bin/java?
27591      if test ! -x "$BOOT_JDK/bin/java"; then
27592        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27594        BOOT_JDK_FOUND=no
27595      else
27596        # Do we have a bin/javac?
27597        if test ! -x "$BOOT_JDK/bin/javac"; then
27598          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27600          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27601$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27602          BOOT_JDK_FOUND=no
27603        else
27604          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27605          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27606
27607          # Extra M4 quote needed to protect [] in grep expression.
27608          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27609          if test "x$FOUND_CORRECT_VERSION" = x; then
27610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27612            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27613$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27614            BOOT_JDK_FOUND=no
27615          else
27616            # We're done! :-)
27617            BOOT_JDK_FOUND=yes
27618
27619  # Only process if variable expands to non-empty
27620
27621  if test "x$BOOT_JDK" != x; then
27622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27623
27624  # Input might be given as Windows format, start by converting to
27625  # unix format.
27626  path="$BOOT_JDK"
27627  new_path=`$CYGPATH -u "$path"`
27628
27629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27632  # "foo.exe" is OK but "foo" is an error.
27633  #
27634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27635  # It is also a way to make sure we got the proper file name for the real test later on.
27636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27637  if test "x$test_shortpath" = x; then
27638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27640    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27641  fi
27642
27643  # Call helper function which possibly converts this using DOS-style short mode.
27644  # If so, the updated path is stored in $new_path.
27645
27646  input_path="$new_path"
27647  # Check if we need to convert this using DOS-style short mode. If the path
27648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27649  # take no chances and rewrite it.
27650  # Note: m4 eats our [], so we need to use [ and ] instead.
27651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27652  if test "x$has_forbidden_chars" != x; then
27653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27657      # Going to short mode and back again did indeed matter. Since short mode is
27658      # case insensitive, let's make it lowercase to improve readability.
27659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27660      # Now convert it back to Unix-style (cygpath)
27661      input_path=`$CYGPATH -u "$shortmode_path"`
27662      new_path="$input_path"
27663    fi
27664  fi
27665
27666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27667  if test "x$test_cygdrive_prefix" = x; then
27668    # As a simple fix, exclude /usr/bin since it's not a real path.
27669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27671      # a path prefixed by /cygdrive for fixpath to work.
27672      new_path="$CYGWIN_ROOT_PATH$input_path"
27673    fi
27674  fi
27675
27676
27677  if test "x$path" != "x$new_path"; then
27678    BOOT_JDK="$new_path"
27679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27681  fi
27682
27683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27684
27685  path="$BOOT_JDK"
27686  has_colon=`$ECHO $path | $GREP ^.:`
27687  new_path="$path"
27688  if test "x$has_colon" = x; then
27689    # Not in mixed or Windows style, start by that.
27690    new_path=`cmd //c echo $path`
27691  fi
27692
27693
27694  input_path="$new_path"
27695  # Check if we need to convert this using DOS-style short mode. If the path
27696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27697  # take no chances and rewrite it.
27698  # Note: m4 eats our [], so we need to use [ and ] instead.
27699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27700  if test "x$has_forbidden_chars" != x; then
27701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27703  fi
27704
27705
27706  windows_path="$new_path"
27707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27708    unix_path=`$CYGPATH -u "$windows_path"`
27709    new_path="$unix_path"
27710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27712    new_path="$unix_path"
27713  fi
27714
27715  if test "x$path" != "x$new_path"; then
27716    BOOT_JDK="$new_path"
27717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27719  fi
27720
27721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27723
27724    else
27725      # We're on a unix platform. Hooray! :)
27726      path="$BOOT_JDK"
27727      has_space=`$ECHO "$path" | $GREP " "`
27728      if test "x$has_space" != x; then
27729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27732      fi
27733
27734      # Use eval to expand a potential ~
27735      eval path="$path"
27736      if test ! -f "$path" && test ! -d "$path"; then
27737        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27738      fi
27739
27740      if test -d "$path"; then
27741        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27742      else
27743        dir="`$DIRNAME "$path"`"
27744        base="`$BASENAME "$path"`"
27745        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27746      fi
27747    fi
27748  fi
27749
27750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27751$as_echo_n "checking for Boot JDK... " >&6; }
27752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27753$as_echo "$BOOT_JDK" >&6; }
27754            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27755$as_echo_n "checking Boot JDK version... " >&6; }
27756            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27758$as_echo "$BOOT_JDK_VERSION" >&6; }
27759          fi # end check jdk version
27760        fi # end check javac
27761      fi # end check java
27762    fi # end check boot jdk found
27763  fi
27764
27765
27766  if test "x$BOOT_JDK_FOUND" = xno; then
27767    # Now execute the test
27768
27769  if test "x$ProgramFiles" != x; then
27770    VIRTUAL_DIR="$ProgramFiles/Java"
27771
27772  windows_path="$VIRTUAL_DIR"
27773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27774    unix_path=`$CYGPATH -u "$windows_path"`
27775    VIRTUAL_DIR="$unix_path"
27776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27778    VIRTUAL_DIR="$unix_path"
27779  fi
27780
27781
27782  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27783  BOOT_JDK_SUFFIX=""
27784  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27785  if test "x$ALL_JDKS_FOUND" != x; then
27786    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27787
27788  if test "x$BOOT_JDK_FOUND" = xno; then
27789    # Now execute the test
27790
27791        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27792        if test -d "$BOOT_JDK"; then
27793          BOOT_JDK_FOUND=maybe
27794          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27795$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27796        fi
27797
27798
27799    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27800    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27801      # Do we have a bin/java?
27802      if test ! -x "$BOOT_JDK/bin/java"; then
27803        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27805        BOOT_JDK_FOUND=no
27806      else
27807        # Do we have a bin/javac?
27808        if test ! -x "$BOOT_JDK/bin/javac"; then
27809          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27811          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27812$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27813          BOOT_JDK_FOUND=no
27814        else
27815          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27816          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27817
27818          # Extra M4 quote needed to protect [] in grep expression.
27819          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27820          if test "x$FOUND_CORRECT_VERSION" = x; then
27821            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27823            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27824$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27825            BOOT_JDK_FOUND=no
27826          else
27827            # We're done! :-)
27828            BOOT_JDK_FOUND=yes
27829
27830  # Only process if variable expands to non-empty
27831
27832  if test "x$BOOT_JDK" != x; then
27833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27834
27835  # Input might be given as Windows format, start by converting to
27836  # unix format.
27837  path="$BOOT_JDK"
27838  new_path=`$CYGPATH -u "$path"`
27839
27840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27843  # "foo.exe" is OK but "foo" is an error.
27844  #
27845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27846  # It is also a way to make sure we got the proper file name for the real test later on.
27847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27848  if test "x$test_shortpath" = x; then
27849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27851    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27852  fi
27853
27854  # Call helper function which possibly converts this using DOS-style short mode.
27855  # If so, the updated path is stored in $new_path.
27856
27857  input_path="$new_path"
27858  # Check if we need to convert this using DOS-style short mode. If the path
27859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27860  # take no chances and rewrite it.
27861  # Note: m4 eats our [], so we need to use [ and ] instead.
27862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27863  if test "x$has_forbidden_chars" != x; then
27864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27868      # Going to short mode and back again did indeed matter. Since short mode is
27869      # case insensitive, let's make it lowercase to improve readability.
27870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27871      # Now convert it back to Unix-style (cygpath)
27872      input_path=`$CYGPATH -u "$shortmode_path"`
27873      new_path="$input_path"
27874    fi
27875  fi
27876
27877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27878  if test "x$test_cygdrive_prefix" = x; then
27879    # As a simple fix, exclude /usr/bin since it's not a real path.
27880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27882      # a path prefixed by /cygdrive for fixpath to work.
27883      new_path="$CYGWIN_ROOT_PATH$input_path"
27884    fi
27885  fi
27886
27887
27888  if test "x$path" != "x$new_path"; then
27889    BOOT_JDK="$new_path"
27890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27892  fi
27893
27894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27895
27896  path="$BOOT_JDK"
27897  has_colon=`$ECHO $path | $GREP ^.:`
27898  new_path="$path"
27899  if test "x$has_colon" = x; then
27900    # Not in mixed or Windows style, start by that.
27901    new_path=`cmd //c echo $path`
27902  fi
27903
27904
27905  input_path="$new_path"
27906  # Check if we need to convert this using DOS-style short mode. If the path
27907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27908  # take no chances and rewrite it.
27909  # Note: m4 eats our [], so we need to use [ and ] instead.
27910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27911  if test "x$has_forbidden_chars" != x; then
27912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27914  fi
27915
27916
27917  windows_path="$new_path"
27918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27919    unix_path=`$CYGPATH -u "$windows_path"`
27920    new_path="$unix_path"
27921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27923    new_path="$unix_path"
27924  fi
27925
27926  if test "x$path" != "x$new_path"; then
27927    BOOT_JDK="$new_path"
27928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27930  fi
27931
27932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27934
27935    else
27936      # We're on a unix platform. Hooray! :)
27937      path="$BOOT_JDK"
27938      has_space=`$ECHO "$path" | $GREP " "`
27939      if test "x$has_space" != x; then
27940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27941$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27943      fi
27944
27945      # Use eval to expand a potential ~
27946      eval path="$path"
27947      if test ! -f "$path" && test ! -d "$path"; then
27948        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27949      fi
27950
27951      if test -d "$path"; then
27952        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27953      else
27954        dir="`$DIRNAME "$path"`"
27955        base="`$BASENAME "$path"`"
27956        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27957      fi
27958    fi
27959  fi
27960
27961            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27962$as_echo_n "checking for Boot JDK... " >&6; }
27963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27964$as_echo "$BOOT_JDK" >&6; }
27965            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27966$as_echo_n "checking Boot JDK version... " >&6; }
27967            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27969$as_echo "$BOOT_JDK_VERSION" >&6; }
27970          fi # end check jdk version
27971        fi # end check javac
27972      fi # end check java
27973    fi # end check boot jdk found
27974  fi
27975
27976    done
27977  fi
27978
27979  fi
27980
27981
27982    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27983    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27984      # Do we have a bin/java?
27985      if test ! -x "$BOOT_JDK/bin/java"; then
27986        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27988        BOOT_JDK_FOUND=no
27989      else
27990        # Do we have a bin/javac?
27991        if test ! -x "$BOOT_JDK/bin/javac"; then
27992          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27994          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27995$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27996          BOOT_JDK_FOUND=no
27997        else
27998          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27999          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28000
28001          # Extra M4 quote needed to protect [] in grep expression.
28002          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28003          if test "x$FOUND_CORRECT_VERSION" = x; then
28004            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28006            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28007$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28008            BOOT_JDK_FOUND=no
28009          else
28010            # We're done! :-)
28011            BOOT_JDK_FOUND=yes
28012
28013  # Only process if variable expands to non-empty
28014
28015  if test "x$BOOT_JDK" != x; then
28016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28017
28018  # Input might be given as Windows format, start by converting to
28019  # unix format.
28020  path="$BOOT_JDK"
28021  new_path=`$CYGPATH -u "$path"`
28022
28023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28026  # "foo.exe" is OK but "foo" is an error.
28027  #
28028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28029  # It is also a way to make sure we got the proper file name for the real test later on.
28030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28031  if test "x$test_shortpath" = x; then
28032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28034    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28035  fi
28036
28037  # Call helper function which possibly converts this using DOS-style short mode.
28038  # If so, the updated path is stored in $new_path.
28039
28040  input_path="$new_path"
28041  # Check if we need to convert this using DOS-style short mode. If the path
28042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28043  # take no chances and rewrite it.
28044  # Note: m4 eats our [], so we need to use [ and ] instead.
28045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28046  if test "x$has_forbidden_chars" != x; then
28047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28051      # Going to short mode and back again did indeed matter. Since short mode is
28052      # case insensitive, let's make it lowercase to improve readability.
28053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28054      # Now convert it back to Unix-style (cygpath)
28055      input_path=`$CYGPATH -u "$shortmode_path"`
28056      new_path="$input_path"
28057    fi
28058  fi
28059
28060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28061  if test "x$test_cygdrive_prefix" = x; then
28062    # As a simple fix, exclude /usr/bin since it's not a real path.
28063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28065      # a path prefixed by /cygdrive for fixpath to work.
28066      new_path="$CYGWIN_ROOT_PATH$input_path"
28067    fi
28068  fi
28069
28070
28071  if test "x$path" != "x$new_path"; then
28072    BOOT_JDK="$new_path"
28073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28075  fi
28076
28077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28078
28079  path="$BOOT_JDK"
28080  has_colon=`$ECHO $path | $GREP ^.:`
28081  new_path="$path"
28082  if test "x$has_colon" = x; then
28083    # Not in mixed or Windows style, start by that.
28084    new_path=`cmd //c echo $path`
28085  fi
28086
28087
28088  input_path="$new_path"
28089  # Check if we need to convert this using DOS-style short mode. If the path
28090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28091  # take no chances and rewrite it.
28092  # Note: m4 eats our [], so we need to use [ and ] instead.
28093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28094  if test "x$has_forbidden_chars" != x; then
28095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28097  fi
28098
28099
28100  windows_path="$new_path"
28101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28102    unix_path=`$CYGPATH -u "$windows_path"`
28103    new_path="$unix_path"
28104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28106    new_path="$unix_path"
28107  fi
28108
28109  if test "x$path" != "x$new_path"; then
28110    BOOT_JDK="$new_path"
28111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28113  fi
28114
28115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28117
28118    else
28119      # We're on a unix platform. Hooray! :)
28120      path="$BOOT_JDK"
28121      has_space=`$ECHO "$path" | $GREP " "`
28122      if test "x$has_space" != x; then
28123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28125        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28126      fi
28127
28128      # Use eval to expand a potential ~
28129      eval path="$path"
28130      if test ! -f "$path" && test ! -d "$path"; then
28131        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28132      fi
28133
28134      if test -d "$path"; then
28135        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28136      else
28137        dir="`$DIRNAME "$path"`"
28138        base="`$BASENAME "$path"`"
28139        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28140      fi
28141    fi
28142  fi
28143
28144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28145$as_echo_n "checking for Boot JDK... " >&6; }
28146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28147$as_echo "$BOOT_JDK" >&6; }
28148            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28149$as_echo_n "checking Boot JDK version... " >&6; }
28150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28152$as_echo "$BOOT_JDK_VERSION" >&6; }
28153          fi # end check jdk version
28154        fi # end check javac
28155      fi # end check java
28156    fi # end check boot jdk found
28157  fi
28158
28159
28160  if test "x$BOOT_JDK_FOUND" = xno; then
28161    # Now execute the test
28162
28163  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28164  BOOT_JDK_SUFFIX=""
28165  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28166  if test "x$ALL_JDKS_FOUND" != x; then
28167    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28168
28169  if test "x$BOOT_JDK_FOUND" = xno; then
28170    # Now execute the test
28171
28172        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28173        if test -d "$BOOT_JDK"; then
28174          BOOT_JDK_FOUND=maybe
28175          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28176$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28177        fi
28178
28179
28180    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28181    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28182      # Do we have a bin/java?
28183      if test ! -x "$BOOT_JDK/bin/java"; then
28184        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28186        BOOT_JDK_FOUND=no
28187      else
28188        # Do we have a bin/javac?
28189        if test ! -x "$BOOT_JDK/bin/javac"; then
28190          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28192          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28193$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28194          BOOT_JDK_FOUND=no
28195        else
28196          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28197          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28198
28199          # Extra M4 quote needed to protect [] in grep expression.
28200          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28201          if test "x$FOUND_CORRECT_VERSION" = x; then
28202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28204            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28205$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28206            BOOT_JDK_FOUND=no
28207          else
28208            # We're done! :-)
28209            BOOT_JDK_FOUND=yes
28210
28211  # Only process if variable expands to non-empty
28212
28213  if test "x$BOOT_JDK" != x; then
28214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28215
28216  # Input might be given as Windows format, start by converting to
28217  # unix format.
28218  path="$BOOT_JDK"
28219  new_path=`$CYGPATH -u "$path"`
28220
28221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28224  # "foo.exe" is OK but "foo" is an error.
28225  #
28226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28227  # It is also a way to make sure we got the proper file name for the real test later on.
28228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28229  if test "x$test_shortpath" = x; then
28230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28232    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28233  fi
28234
28235  # Call helper function which possibly converts this using DOS-style short mode.
28236  # If so, the updated path is stored in $new_path.
28237
28238  input_path="$new_path"
28239  # Check if we need to convert this using DOS-style short mode. If the path
28240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28241  # take no chances and rewrite it.
28242  # Note: m4 eats our [], so we need to use [ and ] instead.
28243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28244  if test "x$has_forbidden_chars" != x; then
28245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28249      # Going to short mode and back again did indeed matter. Since short mode is
28250      # case insensitive, let's make it lowercase to improve readability.
28251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28252      # Now convert it back to Unix-style (cygpath)
28253      input_path=`$CYGPATH -u "$shortmode_path"`
28254      new_path="$input_path"
28255    fi
28256  fi
28257
28258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28259  if test "x$test_cygdrive_prefix" = x; then
28260    # As a simple fix, exclude /usr/bin since it's not a real path.
28261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28263      # a path prefixed by /cygdrive for fixpath to work.
28264      new_path="$CYGWIN_ROOT_PATH$input_path"
28265    fi
28266  fi
28267
28268
28269  if test "x$path" != "x$new_path"; then
28270    BOOT_JDK="$new_path"
28271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28273  fi
28274
28275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28276
28277  path="$BOOT_JDK"
28278  has_colon=`$ECHO $path | $GREP ^.:`
28279  new_path="$path"
28280  if test "x$has_colon" = x; then
28281    # Not in mixed or Windows style, start by that.
28282    new_path=`cmd //c echo $path`
28283  fi
28284
28285
28286  input_path="$new_path"
28287  # Check if we need to convert this using DOS-style short mode. If the path
28288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28289  # take no chances and rewrite it.
28290  # Note: m4 eats our [], so we need to use [ and ] instead.
28291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28292  if test "x$has_forbidden_chars" != x; then
28293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28295  fi
28296
28297
28298  windows_path="$new_path"
28299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28300    unix_path=`$CYGPATH -u "$windows_path"`
28301    new_path="$unix_path"
28302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28304    new_path="$unix_path"
28305  fi
28306
28307  if test "x$path" != "x$new_path"; then
28308    BOOT_JDK="$new_path"
28309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28311  fi
28312
28313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28315
28316    else
28317      # We're on a unix platform. Hooray! :)
28318      path="$BOOT_JDK"
28319      has_space=`$ECHO "$path" | $GREP " "`
28320      if test "x$has_space" != x; then
28321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28324      fi
28325
28326      # Use eval to expand a potential ~
28327      eval path="$path"
28328      if test ! -f "$path" && test ! -d "$path"; then
28329        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28330      fi
28331
28332      if test -d "$path"; then
28333        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28334      else
28335        dir="`$DIRNAME "$path"`"
28336        base="`$BASENAME "$path"`"
28337        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28338      fi
28339    fi
28340  fi
28341
28342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28343$as_echo_n "checking for Boot JDK... " >&6; }
28344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28345$as_echo "$BOOT_JDK" >&6; }
28346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28347$as_echo_n "checking Boot JDK version... " >&6; }
28348            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28350$as_echo "$BOOT_JDK_VERSION" >&6; }
28351          fi # end check jdk version
28352        fi # end check javac
28353      fi # end check java
28354    fi # end check boot jdk found
28355  fi
28356
28357    done
28358  fi
28359
28360
28361    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28362    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28363      # Do we have a bin/java?
28364      if test ! -x "$BOOT_JDK/bin/java"; then
28365        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28367        BOOT_JDK_FOUND=no
28368      else
28369        # Do we have a bin/javac?
28370        if test ! -x "$BOOT_JDK/bin/javac"; then
28371          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28373          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28374$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28375          BOOT_JDK_FOUND=no
28376        else
28377          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28378          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28379
28380          # Extra M4 quote needed to protect [] in grep expression.
28381          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28382          if test "x$FOUND_CORRECT_VERSION" = x; then
28383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28385            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28386$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28387            BOOT_JDK_FOUND=no
28388          else
28389            # We're done! :-)
28390            BOOT_JDK_FOUND=yes
28391
28392  # Only process if variable expands to non-empty
28393
28394  if test "x$BOOT_JDK" != x; then
28395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28396
28397  # Input might be given as Windows format, start by converting to
28398  # unix format.
28399  path="$BOOT_JDK"
28400  new_path=`$CYGPATH -u "$path"`
28401
28402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28405  # "foo.exe" is OK but "foo" is an error.
28406  #
28407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28408  # It is also a way to make sure we got the proper file name for the real test later on.
28409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28410  if test "x$test_shortpath" = x; then
28411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28413    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28414  fi
28415
28416  # Call helper function which possibly converts this using DOS-style short mode.
28417  # If so, the updated path is stored in $new_path.
28418
28419  input_path="$new_path"
28420  # Check if we need to convert this using DOS-style short mode. If the path
28421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28422  # take no chances and rewrite it.
28423  # Note: m4 eats our [], so we need to use [ and ] instead.
28424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28425  if test "x$has_forbidden_chars" != x; then
28426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28430      # Going to short mode and back again did indeed matter. Since short mode is
28431      # case insensitive, let's make it lowercase to improve readability.
28432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28433      # Now convert it back to Unix-style (cygpath)
28434      input_path=`$CYGPATH -u "$shortmode_path"`
28435      new_path="$input_path"
28436    fi
28437  fi
28438
28439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28440  if test "x$test_cygdrive_prefix" = x; then
28441    # As a simple fix, exclude /usr/bin since it's not a real path.
28442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28444      # a path prefixed by /cygdrive for fixpath to work.
28445      new_path="$CYGWIN_ROOT_PATH$input_path"
28446    fi
28447  fi
28448
28449
28450  if test "x$path" != "x$new_path"; then
28451    BOOT_JDK="$new_path"
28452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28454  fi
28455
28456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28457
28458  path="$BOOT_JDK"
28459  has_colon=`$ECHO $path | $GREP ^.:`
28460  new_path="$path"
28461  if test "x$has_colon" = x; then
28462    # Not in mixed or Windows style, start by that.
28463    new_path=`cmd //c echo $path`
28464  fi
28465
28466
28467  input_path="$new_path"
28468  # Check if we need to convert this using DOS-style short mode. If the path
28469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28470  # take no chances and rewrite it.
28471  # Note: m4 eats our [], so we need to use [ and ] instead.
28472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28473  if test "x$has_forbidden_chars" != x; then
28474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28476  fi
28477
28478
28479  windows_path="$new_path"
28480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28481    unix_path=`$CYGPATH -u "$windows_path"`
28482    new_path="$unix_path"
28483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28485    new_path="$unix_path"
28486  fi
28487
28488  if test "x$path" != "x$new_path"; then
28489    BOOT_JDK="$new_path"
28490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28492  fi
28493
28494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28496
28497    else
28498      # We're on a unix platform. Hooray! :)
28499      path="$BOOT_JDK"
28500      has_space=`$ECHO "$path" | $GREP " "`
28501      if test "x$has_space" != x; then
28502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28505      fi
28506
28507      # Use eval to expand a potential ~
28508      eval path="$path"
28509      if test ! -f "$path" && test ! -d "$path"; then
28510        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28511      fi
28512
28513      if test -d "$path"; then
28514        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28515      else
28516        dir="`$DIRNAME "$path"`"
28517        base="`$BASENAME "$path"`"
28518        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28519      fi
28520    fi
28521  fi
28522
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28524$as_echo_n "checking for Boot JDK... " >&6; }
28525            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28526$as_echo "$BOOT_JDK" >&6; }
28527            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28528$as_echo_n "checking Boot JDK version... " >&6; }
28529            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28531$as_echo "$BOOT_JDK_VERSION" >&6; }
28532          fi # end check jdk version
28533        fi # end check javac
28534      fi # end check java
28535    fi # end check boot jdk found
28536  fi
28537
28538  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28539
28540  if test "x$BOOT_JDK_FOUND" = xno; then
28541    # Now execute the test
28542
28543  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28544  BOOT_JDK_SUFFIX="/Contents/Home"
28545  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28546  if test "x$ALL_JDKS_FOUND" != x; then
28547    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28548
28549  if test "x$BOOT_JDK_FOUND" = xno; then
28550    # Now execute the test
28551
28552        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28553        if test -d "$BOOT_JDK"; then
28554          BOOT_JDK_FOUND=maybe
28555          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28556$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28557        fi
28558
28559
28560    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28561    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28562      # Do we have a bin/java?
28563      if test ! -x "$BOOT_JDK/bin/java"; then
28564        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28566        BOOT_JDK_FOUND=no
28567      else
28568        # Do we have a bin/javac?
28569        if test ! -x "$BOOT_JDK/bin/javac"; then
28570          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28572          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28573$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28574          BOOT_JDK_FOUND=no
28575        else
28576          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28577          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28578
28579          # Extra M4 quote needed to protect [] in grep expression.
28580          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28581          if test "x$FOUND_CORRECT_VERSION" = x; then
28582            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28584            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28585$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28586            BOOT_JDK_FOUND=no
28587          else
28588            # We're done! :-)
28589            BOOT_JDK_FOUND=yes
28590
28591  # Only process if variable expands to non-empty
28592
28593  if test "x$BOOT_JDK" != x; then
28594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28595
28596  # Input might be given as Windows format, start by converting to
28597  # unix format.
28598  path="$BOOT_JDK"
28599  new_path=`$CYGPATH -u "$path"`
28600
28601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28604  # "foo.exe" is OK but "foo" is an error.
28605  #
28606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28607  # It is also a way to make sure we got the proper file name for the real test later on.
28608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28609  if test "x$test_shortpath" = x; then
28610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28611$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28612    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28613  fi
28614
28615  # Call helper function which possibly converts this using DOS-style short mode.
28616  # If so, the updated path is stored in $new_path.
28617
28618  input_path="$new_path"
28619  # Check if we need to convert this using DOS-style short mode. If the path
28620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28621  # take no chances and rewrite it.
28622  # Note: m4 eats our [], so we need to use [ and ] instead.
28623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28624  if test "x$has_forbidden_chars" != x; then
28625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28629      # Going to short mode and back again did indeed matter. Since short mode is
28630      # case insensitive, let's make it lowercase to improve readability.
28631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28632      # Now convert it back to Unix-style (cygpath)
28633      input_path=`$CYGPATH -u "$shortmode_path"`
28634      new_path="$input_path"
28635    fi
28636  fi
28637
28638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28639  if test "x$test_cygdrive_prefix" = x; then
28640    # As a simple fix, exclude /usr/bin since it's not a real path.
28641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28643      # a path prefixed by /cygdrive for fixpath to work.
28644      new_path="$CYGWIN_ROOT_PATH$input_path"
28645    fi
28646  fi
28647
28648
28649  if test "x$path" != "x$new_path"; then
28650    BOOT_JDK="$new_path"
28651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28652$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28653  fi
28654
28655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28656
28657  path="$BOOT_JDK"
28658  has_colon=`$ECHO $path | $GREP ^.:`
28659  new_path="$path"
28660  if test "x$has_colon" = x; then
28661    # Not in mixed or Windows style, start by that.
28662    new_path=`cmd //c echo $path`
28663  fi
28664
28665
28666  input_path="$new_path"
28667  # Check if we need to convert this using DOS-style short mode. If the path
28668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28669  # take no chances and rewrite it.
28670  # Note: m4 eats our [], so we need to use [ and ] instead.
28671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28672  if test "x$has_forbidden_chars" != x; then
28673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28675  fi
28676
28677
28678  windows_path="$new_path"
28679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28680    unix_path=`$CYGPATH -u "$windows_path"`
28681    new_path="$unix_path"
28682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28684    new_path="$unix_path"
28685  fi
28686
28687  if test "x$path" != "x$new_path"; then
28688    BOOT_JDK="$new_path"
28689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28690$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28691  fi
28692
28693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28695
28696    else
28697      # We're on a unix platform. Hooray! :)
28698      path="$BOOT_JDK"
28699      has_space=`$ECHO "$path" | $GREP " "`
28700      if test "x$has_space" != x; then
28701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28702$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28703        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28704      fi
28705
28706      # Use eval to expand a potential ~
28707      eval path="$path"
28708      if test ! -f "$path" && test ! -d "$path"; then
28709        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28710      fi
28711
28712      if test -d "$path"; then
28713        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28714      else
28715        dir="`$DIRNAME "$path"`"
28716        base="`$BASENAME "$path"`"
28717        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28718      fi
28719    fi
28720  fi
28721
28722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28723$as_echo_n "checking for Boot JDK... " >&6; }
28724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28725$as_echo "$BOOT_JDK" >&6; }
28726            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28727$as_echo_n "checking Boot JDK version... " >&6; }
28728            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28730$as_echo "$BOOT_JDK_VERSION" >&6; }
28731          fi # end check jdk version
28732        fi # end check javac
28733      fi # end check java
28734    fi # end check boot jdk found
28735  fi
28736
28737    done
28738  fi
28739
28740
28741    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28742    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28743      # Do we have a bin/java?
28744      if test ! -x "$BOOT_JDK/bin/java"; then
28745        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28747        BOOT_JDK_FOUND=no
28748      else
28749        # Do we have a bin/javac?
28750        if test ! -x "$BOOT_JDK/bin/javac"; then
28751          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28753          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28754$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28755          BOOT_JDK_FOUND=no
28756        else
28757          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28758          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28759
28760          # Extra M4 quote needed to protect [] in grep expression.
28761          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28762          if test "x$FOUND_CORRECT_VERSION" = x; then
28763            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28765            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28766$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28767            BOOT_JDK_FOUND=no
28768          else
28769            # We're done! :-)
28770            BOOT_JDK_FOUND=yes
28771
28772  # Only process if variable expands to non-empty
28773
28774  if test "x$BOOT_JDK" != x; then
28775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28776
28777  # Input might be given as Windows format, start by converting to
28778  # unix format.
28779  path="$BOOT_JDK"
28780  new_path=`$CYGPATH -u "$path"`
28781
28782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28785  # "foo.exe" is OK but "foo" is an error.
28786  #
28787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28788  # It is also a way to make sure we got the proper file name for the real test later on.
28789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28790  if test "x$test_shortpath" = x; then
28791    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28792$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28793    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28794  fi
28795
28796  # Call helper function which possibly converts this using DOS-style short mode.
28797  # If so, the updated path is stored in $new_path.
28798
28799  input_path="$new_path"
28800  # Check if we need to convert this using DOS-style short mode. If the path
28801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28802  # take no chances and rewrite it.
28803  # Note: m4 eats our [], so we need to use [ and ] instead.
28804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28805  if test "x$has_forbidden_chars" != x; then
28806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28810      # Going to short mode and back again did indeed matter. Since short mode is
28811      # case insensitive, let's make it lowercase to improve readability.
28812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28813      # Now convert it back to Unix-style (cygpath)
28814      input_path=`$CYGPATH -u "$shortmode_path"`
28815      new_path="$input_path"
28816    fi
28817  fi
28818
28819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28820  if test "x$test_cygdrive_prefix" = x; then
28821    # As a simple fix, exclude /usr/bin since it's not a real path.
28822    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28824      # a path prefixed by /cygdrive for fixpath to work.
28825      new_path="$CYGWIN_ROOT_PATH$input_path"
28826    fi
28827  fi
28828
28829
28830  if test "x$path" != "x$new_path"; then
28831    BOOT_JDK="$new_path"
28832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28833$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28834  fi
28835
28836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28837
28838  path="$BOOT_JDK"
28839  has_colon=`$ECHO $path | $GREP ^.:`
28840  new_path="$path"
28841  if test "x$has_colon" = x; then
28842    # Not in mixed or Windows style, start by that.
28843    new_path=`cmd //c echo $path`
28844  fi
28845
28846
28847  input_path="$new_path"
28848  # Check if we need to convert this using DOS-style short mode. If the path
28849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28850  # take no chances and rewrite it.
28851  # Note: m4 eats our [], so we need to use [ and ] instead.
28852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28853  if test "x$has_forbidden_chars" != x; then
28854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28856  fi
28857
28858
28859  windows_path="$new_path"
28860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28861    unix_path=`$CYGPATH -u "$windows_path"`
28862    new_path="$unix_path"
28863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28865    new_path="$unix_path"
28866  fi
28867
28868  if test "x$path" != "x$new_path"; then
28869    BOOT_JDK="$new_path"
28870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28872  fi
28873
28874  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28875  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28876
28877    else
28878      # We're on a unix platform. Hooray! :)
28879      path="$BOOT_JDK"
28880      has_space=`$ECHO "$path" | $GREP " "`
28881      if test "x$has_space" != x; then
28882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28884        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28885      fi
28886
28887      # Use eval to expand a potential ~
28888      eval path="$path"
28889      if test ! -f "$path" && test ! -d "$path"; then
28890        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28891      fi
28892
28893      if test -d "$path"; then
28894        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28895      else
28896        dir="`$DIRNAME "$path"`"
28897        base="`$BASENAME "$path"`"
28898        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28899      fi
28900    fi
28901  fi
28902
28903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28904$as_echo_n "checking for Boot JDK... " >&6; }
28905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28906$as_echo "$BOOT_JDK" >&6; }
28907            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28908$as_echo_n "checking Boot JDK version... " >&6; }
28909            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28911$as_echo "$BOOT_JDK_VERSION" >&6; }
28912          fi # end check jdk version
28913        fi # end check javac
28914      fi # end check java
28915    fi # end check boot jdk found
28916  fi
28917
28918
28919  if test "x$BOOT_JDK_FOUND" = xno; then
28920    # Now execute the test
28921
28922  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28923  BOOT_JDK_SUFFIX="/Contents/Home"
28924  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28925  if test "x$ALL_JDKS_FOUND" != x; then
28926    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28927
28928  if test "x$BOOT_JDK_FOUND" = xno; then
28929    # Now execute the test
28930
28931        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28932        if test -d "$BOOT_JDK"; then
28933          BOOT_JDK_FOUND=maybe
28934          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28935$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28936        fi
28937
28938
28939    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28940    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28941      # Do we have a bin/java?
28942      if test ! -x "$BOOT_JDK/bin/java"; then
28943        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28945        BOOT_JDK_FOUND=no
28946      else
28947        # Do we have a bin/javac?
28948        if test ! -x "$BOOT_JDK/bin/javac"; then
28949          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28951          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28952$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28953          BOOT_JDK_FOUND=no
28954        else
28955          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28956          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28957
28958          # Extra M4 quote needed to protect [] in grep expression.
28959          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28960          if test "x$FOUND_CORRECT_VERSION" = x; then
28961            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28963            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28964$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28965            BOOT_JDK_FOUND=no
28966          else
28967            # We're done! :-)
28968            BOOT_JDK_FOUND=yes
28969
28970  # Only process if variable expands to non-empty
28971
28972  if test "x$BOOT_JDK" != x; then
28973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28974
28975  # Input might be given as Windows format, start by converting to
28976  # unix format.
28977  path="$BOOT_JDK"
28978  new_path=`$CYGPATH -u "$path"`
28979
28980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28983  # "foo.exe" is OK but "foo" is an error.
28984  #
28985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28986  # It is also a way to make sure we got the proper file name for the real test later on.
28987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28988  if test "x$test_shortpath" = x; then
28989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28991    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28992  fi
28993
28994  # Call helper function which possibly converts this using DOS-style short mode.
28995  # If so, the updated path is stored in $new_path.
28996
28997  input_path="$new_path"
28998  # Check if we need to convert this using DOS-style short mode. If the path
28999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29000  # take no chances and rewrite it.
29001  # Note: m4 eats our [], so we need to use [ and ] instead.
29002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29003  if test "x$has_forbidden_chars" != x; then
29004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29008      # Going to short mode and back again did indeed matter. Since short mode is
29009      # case insensitive, let's make it lowercase to improve readability.
29010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29011      # Now convert it back to Unix-style (cygpath)
29012      input_path=`$CYGPATH -u "$shortmode_path"`
29013      new_path="$input_path"
29014    fi
29015  fi
29016
29017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29018  if test "x$test_cygdrive_prefix" = x; then
29019    # As a simple fix, exclude /usr/bin since it's not a real path.
29020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29022      # a path prefixed by /cygdrive for fixpath to work.
29023      new_path="$CYGWIN_ROOT_PATH$input_path"
29024    fi
29025  fi
29026
29027
29028  if test "x$path" != "x$new_path"; then
29029    BOOT_JDK="$new_path"
29030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29032  fi
29033
29034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29035
29036  path="$BOOT_JDK"
29037  has_colon=`$ECHO $path | $GREP ^.:`
29038  new_path="$path"
29039  if test "x$has_colon" = x; then
29040    # Not in mixed or Windows style, start by that.
29041    new_path=`cmd //c echo $path`
29042  fi
29043
29044
29045  input_path="$new_path"
29046  # Check if we need to convert this using DOS-style short mode. If the path
29047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29048  # take no chances and rewrite it.
29049  # Note: m4 eats our [], so we need to use [ and ] instead.
29050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29051  if test "x$has_forbidden_chars" != x; then
29052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29054  fi
29055
29056
29057  windows_path="$new_path"
29058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29059    unix_path=`$CYGPATH -u "$windows_path"`
29060    new_path="$unix_path"
29061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29063    new_path="$unix_path"
29064  fi
29065
29066  if test "x$path" != "x$new_path"; then
29067    BOOT_JDK="$new_path"
29068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29070  fi
29071
29072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29074
29075    else
29076      # We're on a unix platform. Hooray! :)
29077      path="$BOOT_JDK"
29078      has_space=`$ECHO "$path" | $GREP " "`
29079      if test "x$has_space" != x; then
29080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29082        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29083      fi
29084
29085      # Use eval to expand a potential ~
29086      eval path="$path"
29087      if test ! -f "$path" && test ! -d "$path"; then
29088        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29089      fi
29090
29091      if test -d "$path"; then
29092        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29093      else
29094        dir="`$DIRNAME "$path"`"
29095        base="`$BASENAME "$path"`"
29096        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29097      fi
29098    fi
29099  fi
29100
29101            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29102$as_echo_n "checking for Boot JDK... " >&6; }
29103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29104$as_echo "$BOOT_JDK" >&6; }
29105            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29106$as_echo_n "checking Boot JDK version... " >&6; }
29107            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29109$as_echo "$BOOT_JDK_VERSION" >&6; }
29110          fi # end check jdk version
29111        fi # end check javac
29112      fi # end check java
29113    fi # end check boot jdk found
29114  fi
29115
29116    done
29117  fi
29118
29119
29120    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29121    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29122      # Do we have a bin/java?
29123      if test ! -x "$BOOT_JDK/bin/java"; then
29124        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29126        BOOT_JDK_FOUND=no
29127      else
29128        # Do we have a bin/javac?
29129        if test ! -x "$BOOT_JDK/bin/javac"; then
29130          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29132          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29133$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29134          BOOT_JDK_FOUND=no
29135        else
29136          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29137          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29138
29139          # Extra M4 quote needed to protect [] in grep expression.
29140          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29141          if test "x$FOUND_CORRECT_VERSION" = x; then
29142            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29144            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29145$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29146            BOOT_JDK_FOUND=no
29147          else
29148            # We're done! :-)
29149            BOOT_JDK_FOUND=yes
29150
29151  # Only process if variable expands to non-empty
29152
29153  if test "x$BOOT_JDK" != x; then
29154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29155
29156  # Input might be given as Windows format, start by converting to
29157  # unix format.
29158  path="$BOOT_JDK"
29159  new_path=`$CYGPATH -u "$path"`
29160
29161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29164  # "foo.exe" is OK but "foo" is an error.
29165  #
29166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29167  # It is also a way to make sure we got the proper file name for the real test later on.
29168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29169  if test "x$test_shortpath" = x; then
29170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29171$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29172    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29173  fi
29174
29175  # Call helper function which possibly converts this using DOS-style short mode.
29176  # If so, the updated path is stored in $new_path.
29177
29178  input_path="$new_path"
29179  # Check if we need to convert this using DOS-style short mode. If the path
29180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29181  # take no chances and rewrite it.
29182  # Note: m4 eats our [], so we need to use [ and ] instead.
29183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29184  if test "x$has_forbidden_chars" != x; then
29185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29189      # Going to short mode and back again did indeed matter. Since short mode is
29190      # case insensitive, let's make it lowercase to improve readability.
29191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29192      # Now convert it back to Unix-style (cygpath)
29193      input_path=`$CYGPATH -u "$shortmode_path"`
29194      new_path="$input_path"
29195    fi
29196  fi
29197
29198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29199  if test "x$test_cygdrive_prefix" = x; then
29200    # As a simple fix, exclude /usr/bin since it's not a real path.
29201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29203      # a path prefixed by /cygdrive for fixpath to work.
29204      new_path="$CYGWIN_ROOT_PATH$input_path"
29205    fi
29206  fi
29207
29208
29209  if test "x$path" != "x$new_path"; then
29210    BOOT_JDK="$new_path"
29211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29212$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29213  fi
29214
29215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29216
29217  path="$BOOT_JDK"
29218  has_colon=`$ECHO $path | $GREP ^.:`
29219  new_path="$path"
29220  if test "x$has_colon" = x; then
29221    # Not in mixed or Windows style, start by that.
29222    new_path=`cmd //c echo $path`
29223  fi
29224
29225
29226  input_path="$new_path"
29227  # Check if we need to convert this using DOS-style short mode. If the path
29228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29229  # take no chances and rewrite it.
29230  # Note: m4 eats our [], so we need to use [ and ] instead.
29231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29232  if test "x$has_forbidden_chars" != x; then
29233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29235  fi
29236
29237
29238  windows_path="$new_path"
29239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29240    unix_path=`$CYGPATH -u "$windows_path"`
29241    new_path="$unix_path"
29242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29244    new_path="$unix_path"
29245  fi
29246
29247  if test "x$path" != "x$new_path"; then
29248    BOOT_JDK="$new_path"
29249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29250$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29251  fi
29252
29253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29255
29256    else
29257      # We're on a unix platform. Hooray! :)
29258      path="$BOOT_JDK"
29259      has_space=`$ECHO "$path" | $GREP " "`
29260      if test "x$has_space" != x; then
29261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29262$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29264      fi
29265
29266      # Use eval to expand a potential ~
29267      eval path="$path"
29268      if test ! -f "$path" && test ! -d "$path"; then
29269        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29270      fi
29271
29272      if test -d "$path"; then
29273        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29274      else
29275        dir="`$DIRNAME "$path"`"
29276        base="`$BASENAME "$path"`"
29277        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29278      fi
29279    fi
29280  fi
29281
29282            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29283$as_echo_n "checking for Boot JDK... " >&6; }
29284            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29285$as_echo "$BOOT_JDK" >&6; }
29286            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29287$as_echo_n "checking Boot JDK version... " >&6; }
29288            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29290$as_echo "$BOOT_JDK_VERSION" >&6; }
29291          fi # end check jdk version
29292        fi # end check javac
29293      fi # end check java
29294    fi # end check boot jdk found
29295  fi
29296
29297  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29298
29299  if test "x$BOOT_JDK_FOUND" = xno; then
29300    # Now execute the test
29301
29302  BOOT_JDK_PREFIX="/usr/lib/jvm"
29303  BOOT_JDK_SUFFIX=""
29304  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29305  if test "x$ALL_JDKS_FOUND" != x; then
29306    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29307
29308  if test "x$BOOT_JDK_FOUND" = xno; then
29309    # Now execute the test
29310
29311        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29312        if test -d "$BOOT_JDK"; then
29313          BOOT_JDK_FOUND=maybe
29314          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29315$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29316        fi
29317
29318
29319    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29320    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29321      # Do we have a bin/java?
29322      if test ! -x "$BOOT_JDK/bin/java"; then
29323        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29325        BOOT_JDK_FOUND=no
29326      else
29327        # Do we have a bin/javac?
29328        if test ! -x "$BOOT_JDK/bin/javac"; then
29329          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29331          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29332$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29333          BOOT_JDK_FOUND=no
29334        else
29335          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29336          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29337
29338          # Extra M4 quote needed to protect [] in grep expression.
29339          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29340          if test "x$FOUND_CORRECT_VERSION" = x; then
29341            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29343            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29344$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29345            BOOT_JDK_FOUND=no
29346          else
29347            # We're done! :-)
29348            BOOT_JDK_FOUND=yes
29349
29350  # Only process if variable expands to non-empty
29351
29352  if test "x$BOOT_JDK" != x; then
29353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29354
29355  # Input might be given as Windows format, start by converting to
29356  # unix format.
29357  path="$BOOT_JDK"
29358  new_path=`$CYGPATH -u "$path"`
29359
29360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29363  # "foo.exe" is OK but "foo" is an error.
29364  #
29365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29366  # It is also a way to make sure we got the proper file name for the real test later on.
29367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29368  if test "x$test_shortpath" = x; then
29369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29371    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29372  fi
29373
29374  # Call helper function which possibly converts this using DOS-style short mode.
29375  # If so, the updated path is stored in $new_path.
29376
29377  input_path="$new_path"
29378  # Check if we need to convert this using DOS-style short mode. If the path
29379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29380  # take no chances and rewrite it.
29381  # Note: m4 eats our [], so we need to use [ and ] instead.
29382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29383  if test "x$has_forbidden_chars" != x; then
29384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29388      # Going to short mode and back again did indeed matter. Since short mode is
29389      # case insensitive, let's make it lowercase to improve readability.
29390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29391      # Now convert it back to Unix-style (cygpath)
29392      input_path=`$CYGPATH -u "$shortmode_path"`
29393      new_path="$input_path"
29394    fi
29395  fi
29396
29397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29398  if test "x$test_cygdrive_prefix" = x; then
29399    # As a simple fix, exclude /usr/bin since it's not a real path.
29400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29402      # a path prefixed by /cygdrive for fixpath to work.
29403      new_path="$CYGWIN_ROOT_PATH$input_path"
29404    fi
29405  fi
29406
29407
29408  if test "x$path" != "x$new_path"; then
29409    BOOT_JDK="$new_path"
29410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29412  fi
29413
29414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29415
29416  path="$BOOT_JDK"
29417  has_colon=`$ECHO $path | $GREP ^.:`
29418  new_path="$path"
29419  if test "x$has_colon" = x; then
29420    # Not in mixed or Windows style, start by that.
29421    new_path=`cmd //c echo $path`
29422  fi
29423
29424
29425  input_path="$new_path"
29426  # Check if we need to convert this using DOS-style short mode. If the path
29427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29428  # take no chances and rewrite it.
29429  # Note: m4 eats our [], so we need to use [ and ] instead.
29430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29431  if test "x$has_forbidden_chars" != x; then
29432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29434  fi
29435
29436
29437  windows_path="$new_path"
29438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29439    unix_path=`$CYGPATH -u "$windows_path"`
29440    new_path="$unix_path"
29441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29443    new_path="$unix_path"
29444  fi
29445
29446  if test "x$path" != "x$new_path"; then
29447    BOOT_JDK="$new_path"
29448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29450  fi
29451
29452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29454
29455    else
29456      # We're on a unix platform. Hooray! :)
29457      path="$BOOT_JDK"
29458      has_space=`$ECHO "$path" | $GREP " "`
29459      if test "x$has_space" != x; then
29460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29463      fi
29464
29465      # Use eval to expand a potential ~
29466      eval path="$path"
29467      if test ! -f "$path" && test ! -d "$path"; then
29468        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29469      fi
29470
29471      if test -d "$path"; then
29472        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29473      else
29474        dir="`$DIRNAME "$path"`"
29475        base="`$BASENAME "$path"`"
29476        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29477      fi
29478    fi
29479  fi
29480
29481            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29482$as_echo_n "checking for Boot JDK... " >&6; }
29483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29484$as_echo "$BOOT_JDK" >&6; }
29485            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29486$as_echo_n "checking Boot JDK version... " >&6; }
29487            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29489$as_echo "$BOOT_JDK_VERSION" >&6; }
29490          fi # end check jdk version
29491        fi # end check javac
29492      fi # end check java
29493    fi # end check boot jdk found
29494  fi
29495
29496    done
29497  fi
29498
29499
29500    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29501    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29502      # Do we have a bin/java?
29503      if test ! -x "$BOOT_JDK/bin/java"; then
29504        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29506        BOOT_JDK_FOUND=no
29507      else
29508        # Do we have a bin/javac?
29509        if test ! -x "$BOOT_JDK/bin/javac"; then
29510          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29512          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29513$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29514          BOOT_JDK_FOUND=no
29515        else
29516          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29517          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29518
29519          # Extra M4 quote needed to protect [] in grep expression.
29520          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29521          if test "x$FOUND_CORRECT_VERSION" = x; then
29522            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29524            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29525$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29526            BOOT_JDK_FOUND=no
29527          else
29528            # We're done! :-)
29529            BOOT_JDK_FOUND=yes
29530
29531  # Only process if variable expands to non-empty
29532
29533  if test "x$BOOT_JDK" != x; then
29534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29535
29536  # Input might be given as Windows format, start by converting to
29537  # unix format.
29538  path="$BOOT_JDK"
29539  new_path=`$CYGPATH -u "$path"`
29540
29541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29544  # "foo.exe" is OK but "foo" is an error.
29545  #
29546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29547  # It is also a way to make sure we got the proper file name for the real test later on.
29548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29549  if test "x$test_shortpath" = x; then
29550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29552    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29553  fi
29554
29555  # Call helper function which possibly converts this using DOS-style short mode.
29556  # If so, the updated path is stored in $new_path.
29557
29558  input_path="$new_path"
29559  # Check if we need to convert this using DOS-style short mode. If the path
29560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29561  # take no chances and rewrite it.
29562  # Note: m4 eats our [], so we need to use [ and ] instead.
29563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29564  if test "x$has_forbidden_chars" != x; then
29565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29569      # Going to short mode and back again did indeed matter. Since short mode is
29570      # case insensitive, let's make it lowercase to improve readability.
29571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29572      # Now convert it back to Unix-style (cygpath)
29573      input_path=`$CYGPATH -u "$shortmode_path"`
29574      new_path="$input_path"
29575    fi
29576  fi
29577
29578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29579  if test "x$test_cygdrive_prefix" = x; then
29580    # As a simple fix, exclude /usr/bin since it's not a real path.
29581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29583      # a path prefixed by /cygdrive for fixpath to work.
29584      new_path="$CYGWIN_ROOT_PATH$input_path"
29585    fi
29586  fi
29587
29588
29589  if test "x$path" != "x$new_path"; then
29590    BOOT_JDK="$new_path"
29591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29592$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29593  fi
29594
29595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29596
29597  path="$BOOT_JDK"
29598  has_colon=`$ECHO $path | $GREP ^.:`
29599  new_path="$path"
29600  if test "x$has_colon" = x; then
29601    # Not in mixed or Windows style, start by that.
29602    new_path=`cmd //c echo $path`
29603  fi
29604
29605
29606  input_path="$new_path"
29607  # Check if we need to convert this using DOS-style short mode. If the path
29608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29609  # take no chances and rewrite it.
29610  # Note: m4 eats our [], so we need to use [ and ] instead.
29611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29612  if test "x$has_forbidden_chars" != x; then
29613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29615  fi
29616
29617
29618  windows_path="$new_path"
29619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29620    unix_path=`$CYGPATH -u "$windows_path"`
29621    new_path="$unix_path"
29622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29624    new_path="$unix_path"
29625  fi
29626
29627  if test "x$path" != "x$new_path"; then
29628    BOOT_JDK="$new_path"
29629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29631  fi
29632
29633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29635
29636    else
29637      # We're on a unix platform. Hooray! :)
29638      path="$BOOT_JDK"
29639      has_space=`$ECHO "$path" | $GREP " "`
29640      if test "x$has_space" != x; then
29641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29643        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29644      fi
29645
29646      # Use eval to expand a potential ~
29647      eval path="$path"
29648      if test ! -f "$path" && test ! -d "$path"; then
29649        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29650      fi
29651
29652      if test -d "$path"; then
29653        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29654      else
29655        dir="`$DIRNAME "$path"`"
29656        base="`$BASENAME "$path"`"
29657        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29658      fi
29659    fi
29660  fi
29661
29662            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29663$as_echo_n "checking for Boot JDK... " >&6; }
29664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29665$as_echo "$BOOT_JDK" >&6; }
29666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29667$as_echo_n "checking Boot JDK version... " >&6; }
29668            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29670$as_echo "$BOOT_JDK_VERSION" >&6; }
29671          fi # end check jdk version
29672        fi # end check javac
29673      fi # end check java
29674    fi # end check boot jdk found
29675  fi
29676
29677  fi
29678
29679
29680    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29681    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29682      # Do we have a bin/java?
29683      if test ! -x "$BOOT_JDK/bin/java"; then
29684        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29686        BOOT_JDK_FOUND=no
29687      else
29688        # Do we have a bin/javac?
29689        if test ! -x "$BOOT_JDK/bin/javac"; then
29690          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29692          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29693$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29694          BOOT_JDK_FOUND=no
29695        else
29696          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29697          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29698
29699          # Extra M4 quote needed to protect [] in grep expression.
29700          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29701          if test "x$FOUND_CORRECT_VERSION" = x; then
29702            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29704            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29705$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29706            BOOT_JDK_FOUND=no
29707          else
29708            # We're done! :-)
29709            BOOT_JDK_FOUND=yes
29710
29711  # Only process if variable expands to non-empty
29712
29713  if test "x$BOOT_JDK" != x; then
29714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29715
29716  # Input might be given as Windows format, start by converting to
29717  # unix format.
29718  path="$BOOT_JDK"
29719  new_path=`$CYGPATH -u "$path"`
29720
29721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29724  # "foo.exe" is OK but "foo" is an error.
29725  #
29726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29727  # It is also a way to make sure we got the proper file name for the real test later on.
29728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29729  if test "x$test_shortpath" = x; then
29730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29732    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29733  fi
29734
29735  # Call helper function which possibly converts this using DOS-style short mode.
29736  # If so, the updated path is stored in $new_path.
29737
29738  input_path="$new_path"
29739  # Check if we need to convert this using DOS-style short mode. If the path
29740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29741  # take no chances and rewrite it.
29742  # Note: m4 eats our [], so we need to use [ and ] instead.
29743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29744  if test "x$has_forbidden_chars" != x; then
29745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29749      # Going to short mode and back again did indeed matter. Since short mode is
29750      # case insensitive, let's make it lowercase to improve readability.
29751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29752      # Now convert it back to Unix-style (cygpath)
29753      input_path=`$CYGPATH -u "$shortmode_path"`
29754      new_path="$input_path"
29755    fi
29756  fi
29757
29758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29759  if test "x$test_cygdrive_prefix" = x; then
29760    # As a simple fix, exclude /usr/bin since it's not a real path.
29761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29763      # a path prefixed by /cygdrive for fixpath to work.
29764      new_path="$CYGWIN_ROOT_PATH$input_path"
29765    fi
29766  fi
29767
29768
29769  if test "x$path" != "x$new_path"; then
29770    BOOT_JDK="$new_path"
29771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29773  fi
29774
29775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29776
29777  path="$BOOT_JDK"
29778  has_colon=`$ECHO $path | $GREP ^.:`
29779  new_path="$path"
29780  if test "x$has_colon" = x; then
29781    # Not in mixed or Windows style, start by that.
29782    new_path=`cmd //c echo $path`
29783  fi
29784
29785
29786  input_path="$new_path"
29787  # Check if we need to convert this using DOS-style short mode. If the path
29788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29789  # take no chances and rewrite it.
29790  # Note: m4 eats our [], so we need to use [ and ] instead.
29791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29792  if test "x$has_forbidden_chars" != x; then
29793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29795  fi
29796
29797
29798  windows_path="$new_path"
29799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29800    unix_path=`$CYGPATH -u "$windows_path"`
29801    new_path="$unix_path"
29802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29804    new_path="$unix_path"
29805  fi
29806
29807  if test "x$path" != "x$new_path"; then
29808    BOOT_JDK="$new_path"
29809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29811  fi
29812
29813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29815
29816    else
29817      # We're on a unix platform. Hooray! :)
29818      path="$BOOT_JDK"
29819      has_space=`$ECHO "$path" | $GREP " "`
29820      if test "x$has_space" != x; then
29821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29823        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29824      fi
29825
29826      # Use eval to expand a potential ~
29827      eval path="$path"
29828      if test ! -f "$path" && test ! -d "$path"; then
29829        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29830      fi
29831
29832      if test -d "$path"; then
29833        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29834      else
29835        dir="`$DIRNAME "$path"`"
29836        base="`$BASENAME "$path"`"
29837        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29838      fi
29839    fi
29840  fi
29841
29842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29843$as_echo_n "checking for Boot JDK... " >&6; }
29844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29845$as_echo "$BOOT_JDK" >&6; }
29846            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29847$as_echo_n "checking Boot JDK version... " >&6; }
29848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29850$as_echo "$BOOT_JDK_VERSION" >&6; }
29851          fi # end check jdk version
29852        fi # end check javac
29853      fi # end check java
29854    fi # end check boot jdk found
29855  fi
29856
29857
29858  # If we haven't found anything yet, we've truly lost. Give up.
29859  if test "x$BOOT_JDK_FOUND" = xno; then
29860
29861  # Print a helpful message on how to acquire the necessary build dependency.
29862  # openjdk is the help tag: freetype, cups, alsa etc
29863  MISSING_DEPENDENCY=openjdk
29864
29865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29866    cygwin_help $MISSING_DEPENDENCY
29867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29868    msys_help $MISSING_DEPENDENCY
29869  else
29870    PKGHANDLER_COMMAND=
29871
29872    case $PKGHANDLER in
29873      apt-get)
29874        apt_help     $MISSING_DEPENDENCY ;;
29875      yum)
29876        yum_help     $MISSING_DEPENDENCY ;;
29877      port)
29878        port_help    $MISSING_DEPENDENCY ;;
29879      pkgutil)
29880        pkgutil_help $MISSING_DEPENDENCY ;;
29881      pkgadd)
29882        pkgadd_help  $MISSING_DEPENDENCY ;;
29883    esac
29884
29885    if test "x$PKGHANDLER_COMMAND" != x; then
29886      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29887    fi
29888  fi
29889
29890    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29891$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29892    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29893$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29894    as_fn_error $? "Cannot continue" "$LINENO" 5
29895  fi
29896
29897
29898
29899  # Setup tools from the Boot JDK.
29900
29901  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29902
29903  # Publish this variable in the help.
29904
29905
29906  if [ -z "${JAVA+x}" ]; then
29907    # The variable is not set by user, try to locate tool using the code snippet
29908
29909      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29910$as_echo_n "checking for java in Boot JDK... " >&6; }
29911      JAVA=$BOOT_JDK/bin/java
29912      if test ! -x $JAVA; then
29913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29914$as_echo "not found" >&6; }
29915        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29916$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29917        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29918      fi
29919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29920$as_echo "ok" >&6; }
29921
29922
29923  else
29924    # The variable is set, but is it from the command line or the environment?
29925
29926    # Try to remove the string !JAVA! from our list.
29927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29929      # If it failed, the variable was not from the command line. Ignore it,
29930      # but warn the user (except for BASH, which is always set by the calling BASH).
29931      if test "xJAVA" != xBASH; then
29932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29933$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29934      fi
29935      # Try to locate tool using the code snippet
29936
29937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29938$as_echo_n "checking for java in Boot JDK... " >&6; }
29939      JAVA=$BOOT_JDK/bin/java
29940      if test ! -x $JAVA; then
29941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29942$as_echo "not found" >&6; }
29943        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29944$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29945        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29946      fi
29947      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29948$as_echo "ok" >&6; }
29949
29950
29951    else
29952      # If it succeeded, then it was overridden by the user. We will use it
29953      # for the tool.
29954
29955      # First remove it from the list of overridden variables, so we can test
29956      # for unknown variables in the end.
29957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29958
29959      # Check if we try to supply an empty value
29960      if test "x$JAVA" = x; then
29961        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29962$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29964$as_echo_n "checking for JAVA... " >&6; }
29965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29966$as_echo "disabled" >&6; }
29967      else
29968        # Check if the provided tool contains a complete path.
29969        tool_specified="$JAVA"
29970        tool_basename="${tool_specified##*/}"
29971        if test "x$tool_basename" = "x$tool_specified"; then
29972          # A command without a complete path is provided, search $PATH.
29973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29974$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29975          # Extract the first word of "$tool_basename", so it can be a program name with args.
29976set dummy $tool_basename; ac_word=$2
29977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29978$as_echo_n "checking for $ac_word... " >&6; }
29979if ${ac_cv_path_JAVA+:} false; then :
29980  $as_echo_n "(cached) " >&6
29981else
29982  case $JAVA in
29983  [\\/]* | ?:[\\/]*)
29984  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29985  ;;
29986  *)
29987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29988for as_dir in $PATH
29989do
29990  IFS=$as_save_IFS
29991  test -z "$as_dir" && as_dir=.
29992    for ac_exec_ext in '' $ac_executable_extensions; do
29993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29994    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29996    break 2
29997  fi
29998done
29999  done
30000IFS=$as_save_IFS
30001
30002  ;;
30003esac
30004fi
30005JAVA=$ac_cv_path_JAVA
30006if test -n "$JAVA"; then
30007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30008$as_echo "$JAVA" >&6; }
30009else
30010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30011$as_echo "no" >&6; }
30012fi
30013
30014
30015          if test "x$JAVA" = x; then
30016            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30017          fi
30018        else
30019          # Otherwise we believe it is a complete path. Use it as it is.
30020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30021$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30022          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30023$as_echo_n "checking for JAVA... " >&6; }
30024          if test ! -x "$tool_specified"; then
30025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30026$as_echo "not found" >&6; }
30027            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30028          fi
30029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30030$as_echo "$tool_specified" >&6; }
30031        fi
30032      fi
30033    fi
30034
30035  fi
30036
30037
30038
30039  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30040
30041  # Publish this variable in the help.
30042
30043
30044  if [ -z "${JAVAC+x}" ]; then
30045    # The variable is not set by user, try to locate tool using the code snippet
30046
30047      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30048$as_echo_n "checking for javac in Boot JDK... " >&6; }
30049      JAVAC=$BOOT_JDK/bin/javac
30050      if test ! -x $JAVAC; then
30051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30052$as_echo "not found" >&6; }
30053        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30054$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30055        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30056      fi
30057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30058$as_echo "ok" >&6; }
30059
30060
30061  else
30062    # The variable is set, but is it from the command line or the environment?
30063
30064    # Try to remove the string !JAVAC! from our list.
30065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30067      # If it failed, the variable was not from the command line. Ignore it,
30068      # but warn the user (except for BASH, which is always set by the calling BASH).
30069      if test "xJAVAC" != xBASH; then
30070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30071$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30072      fi
30073      # Try to locate tool using the code snippet
30074
30075      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30076$as_echo_n "checking for javac in Boot JDK... " >&6; }
30077      JAVAC=$BOOT_JDK/bin/javac
30078      if test ! -x $JAVAC; then
30079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30080$as_echo "not found" >&6; }
30081        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30082$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30083        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30084      fi
30085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30086$as_echo "ok" >&6; }
30087
30088
30089    else
30090      # If it succeeded, then it was overridden by the user. We will use it
30091      # for the tool.
30092
30093      # First remove it from the list of overridden variables, so we can test
30094      # for unknown variables in the end.
30095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30096
30097      # Check if we try to supply an empty value
30098      if test "x$JAVAC" = x; then
30099        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30100$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30102$as_echo_n "checking for JAVAC... " >&6; }
30103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30104$as_echo "disabled" >&6; }
30105      else
30106        # Check if the provided tool contains a complete path.
30107        tool_specified="$JAVAC"
30108        tool_basename="${tool_specified##*/}"
30109        if test "x$tool_basename" = "x$tool_specified"; then
30110          # A command without a complete path is provided, search $PATH.
30111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30112$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30113          # Extract the first word of "$tool_basename", so it can be a program name with args.
30114set dummy $tool_basename; ac_word=$2
30115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30116$as_echo_n "checking for $ac_word... " >&6; }
30117if ${ac_cv_path_JAVAC+:} false; then :
30118  $as_echo_n "(cached) " >&6
30119else
30120  case $JAVAC in
30121  [\\/]* | ?:[\\/]*)
30122  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30123  ;;
30124  *)
30125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30126for as_dir in $PATH
30127do
30128  IFS=$as_save_IFS
30129  test -z "$as_dir" && as_dir=.
30130    for ac_exec_ext in '' $ac_executable_extensions; do
30131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30132    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30134    break 2
30135  fi
30136done
30137  done
30138IFS=$as_save_IFS
30139
30140  ;;
30141esac
30142fi
30143JAVAC=$ac_cv_path_JAVAC
30144if test -n "$JAVAC"; then
30145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30146$as_echo "$JAVAC" >&6; }
30147else
30148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30149$as_echo "no" >&6; }
30150fi
30151
30152
30153          if test "x$JAVAC" = x; then
30154            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30155          fi
30156        else
30157          # Otherwise we believe it is a complete path. Use it as it is.
30158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30159$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30160          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30161$as_echo_n "checking for JAVAC... " >&6; }
30162          if test ! -x "$tool_specified"; then
30163            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30164$as_echo "not found" >&6; }
30165            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30166          fi
30167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30168$as_echo "$tool_specified" >&6; }
30169        fi
30170      fi
30171    fi
30172
30173  fi
30174
30175
30176
30177  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30178
30179  # Publish this variable in the help.
30180
30181
30182  if [ -z "${JAVAH+x}" ]; then
30183    # The variable is not set by user, try to locate tool using the code snippet
30184
30185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30186$as_echo_n "checking for javah in Boot JDK... " >&6; }
30187      JAVAH=$BOOT_JDK/bin/javah
30188      if test ! -x $JAVAH; then
30189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30190$as_echo "not found" >&6; }
30191        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30192$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30193        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30194      fi
30195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30196$as_echo "ok" >&6; }
30197
30198
30199  else
30200    # The variable is set, but is it from the command line or the environment?
30201
30202    # Try to remove the string !JAVAH! from our list.
30203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30205      # If it failed, the variable was not from the command line. Ignore it,
30206      # but warn the user (except for BASH, which is always set by the calling BASH).
30207      if test "xJAVAH" != xBASH; then
30208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30209$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30210      fi
30211      # Try to locate tool using the code snippet
30212
30213      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30214$as_echo_n "checking for javah in Boot JDK... " >&6; }
30215      JAVAH=$BOOT_JDK/bin/javah
30216      if test ! -x $JAVAH; then
30217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30218$as_echo "not found" >&6; }
30219        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30220$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30221        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30222      fi
30223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30224$as_echo "ok" >&6; }
30225
30226
30227    else
30228      # If it succeeded, then it was overridden by the user. We will use it
30229      # for the tool.
30230
30231      # First remove it from the list of overridden variables, so we can test
30232      # for unknown variables in the end.
30233      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30234
30235      # Check if we try to supply an empty value
30236      if test "x$JAVAH" = x; then
30237        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30238$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30240$as_echo_n "checking for JAVAH... " >&6; }
30241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30242$as_echo "disabled" >&6; }
30243      else
30244        # Check if the provided tool contains a complete path.
30245        tool_specified="$JAVAH"
30246        tool_basename="${tool_specified##*/}"
30247        if test "x$tool_basename" = "x$tool_specified"; then
30248          # A command without a complete path is provided, search $PATH.
30249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30250$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30251          # Extract the first word of "$tool_basename", so it can be a program name with args.
30252set dummy $tool_basename; ac_word=$2
30253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30254$as_echo_n "checking for $ac_word... " >&6; }
30255if ${ac_cv_path_JAVAH+:} false; then :
30256  $as_echo_n "(cached) " >&6
30257else
30258  case $JAVAH in
30259  [\\/]* | ?:[\\/]*)
30260  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30261  ;;
30262  *)
30263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30264for as_dir in $PATH
30265do
30266  IFS=$as_save_IFS
30267  test -z "$as_dir" && as_dir=.
30268    for ac_exec_ext in '' $ac_executable_extensions; do
30269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30270    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30272    break 2
30273  fi
30274done
30275  done
30276IFS=$as_save_IFS
30277
30278  ;;
30279esac
30280fi
30281JAVAH=$ac_cv_path_JAVAH
30282if test -n "$JAVAH"; then
30283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30284$as_echo "$JAVAH" >&6; }
30285else
30286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30287$as_echo "no" >&6; }
30288fi
30289
30290
30291          if test "x$JAVAH" = x; then
30292            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30293          fi
30294        else
30295          # Otherwise we believe it is a complete path. Use it as it is.
30296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30297$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30298          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30299$as_echo_n "checking for JAVAH... " >&6; }
30300          if test ! -x "$tool_specified"; then
30301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30302$as_echo "not found" >&6; }
30303            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30304          fi
30305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30306$as_echo "$tool_specified" >&6; }
30307        fi
30308      fi
30309    fi
30310
30311  fi
30312
30313
30314
30315  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30316
30317  # Publish this variable in the help.
30318
30319
30320  if [ -z "${JAR+x}" ]; then
30321    # The variable is not set by user, try to locate tool using the code snippet
30322
30323      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30324$as_echo_n "checking for jar in Boot JDK... " >&6; }
30325      JAR=$BOOT_JDK/bin/jar
30326      if test ! -x $JAR; then
30327        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30328$as_echo "not found" >&6; }
30329        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30330$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30331        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30332      fi
30333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30334$as_echo "ok" >&6; }
30335
30336
30337  else
30338    # The variable is set, but is it from the command line or the environment?
30339
30340    # Try to remove the string !JAR! from our list.
30341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30343      # If it failed, the variable was not from the command line. Ignore it,
30344      # but warn the user (except for BASH, which is always set by the calling BASH).
30345      if test "xJAR" != xBASH; then
30346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30347$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30348      fi
30349      # Try to locate tool using the code snippet
30350
30351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30352$as_echo_n "checking for jar in Boot JDK... " >&6; }
30353      JAR=$BOOT_JDK/bin/jar
30354      if test ! -x $JAR; then
30355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30356$as_echo "not found" >&6; }
30357        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30358$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30359        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30360      fi
30361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30362$as_echo "ok" >&6; }
30363
30364
30365    else
30366      # If it succeeded, then it was overridden by the user. We will use it
30367      # for the tool.
30368
30369      # First remove it from the list of overridden variables, so we can test
30370      # for unknown variables in the end.
30371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30372
30373      # Check if we try to supply an empty value
30374      if test "x$JAR" = x; then
30375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30376$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30378$as_echo_n "checking for JAR... " >&6; }
30379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30380$as_echo "disabled" >&6; }
30381      else
30382        # Check if the provided tool contains a complete path.
30383        tool_specified="$JAR"
30384        tool_basename="${tool_specified##*/}"
30385        if test "x$tool_basename" = "x$tool_specified"; then
30386          # A command without a complete path is provided, search $PATH.
30387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30388$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30389          # Extract the first word of "$tool_basename", so it can be a program name with args.
30390set dummy $tool_basename; ac_word=$2
30391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30392$as_echo_n "checking for $ac_word... " >&6; }
30393if ${ac_cv_path_JAR+:} false; then :
30394  $as_echo_n "(cached) " >&6
30395else
30396  case $JAR in
30397  [\\/]* | ?:[\\/]*)
30398  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30399  ;;
30400  *)
30401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30402for as_dir in $PATH
30403do
30404  IFS=$as_save_IFS
30405  test -z "$as_dir" && as_dir=.
30406    for ac_exec_ext in '' $ac_executable_extensions; do
30407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30408    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30410    break 2
30411  fi
30412done
30413  done
30414IFS=$as_save_IFS
30415
30416  ;;
30417esac
30418fi
30419JAR=$ac_cv_path_JAR
30420if test -n "$JAR"; then
30421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30422$as_echo "$JAR" >&6; }
30423else
30424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30425$as_echo "no" >&6; }
30426fi
30427
30428
30429          if test "x$JAR" = x; then
30430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30431          fi
30432        else
30433          # Otherwise we believe it is a complete path. Use it as it is.
30434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30435$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30437$as_echo_n "checking for JAR... " >&6; }
30438          if test ! -x "$tool_specified"; then
30439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30440$as_echo "not found" >&6; }
30441            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30442          fi
30443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30444$as_echo "$tool_specified" >&6; }
30445        fi
30446      fi
30447    fi
30448
30449  fi
30450
30451
30452
30453  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30454
30455  # Publish this variable in the help.
30456
30457
30458  if [ -z "${JARSIGNER+x}" ]; then
30459    # The variable is not set by user, try to locate tool using the code snippet
30460
30461      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30462$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30463      JARSIGNER=$BOOT_JDK/bin/jarsigner
30464      if test ! -x $JARSIGNER; then
30465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30466$as_echo "not found" >&6; }
30467        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30468$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30469        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30470      fi
30471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30472$as_echo "ok" >&6; }
30473
30474
30475  else
30476    # The variable is set, but is it from the command line or the environment?
30477
30478    # Try to remove the string !JARSIGNER! from our list.
30479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30481      # If it failed, the variable was not from the command line. Ignore it,
30482      # but warn the user (except for BASH, which is always set by the calling BASH).
30483      if test "xJARSIGNER" != xBASH; then
30484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30485$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30486      fi
30487      # Try to locate tool using the code snippet
30488
30489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30490$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30491      JARSIGNER=$BOOT_JDK/bin/jarsigner
30492      if test ! -x $JARSIGNER; then
30493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30494$as_echo "not found" >&6; }
30495        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30496$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30497        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30498      fi
30499      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30500$as_echo "ok" >&6; }
30501
30502
30503    else
30504      # If it succeeded, then it was overridden by the user. We will use it
30505      # for the tool.
30506
30507      # First remove it from the list of overridden variables, so we can test
30508      # for unknown variables in the end.
30509      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30510
30511      # Check if we try to supply an empty value
30512      if test "x$JARSIGNER" = x; then
30513        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30514$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30516$as_echo_n "checking for JARSIGNER... " >&6; }
30517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30518$as_echo "disabled" >&6; }
30519      else
30520        # Check if the provided tool contains a complete path.
30521        tool_specified="$JARSIGNER"
30522        tool_basename="${tool_specified##*/}"
30523        if test "x$tool_basename" = "x$tool_specified"; then
30524          # A command without a complete path is provided, search $PATH.
30525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30526$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30527          # Extract the first word of "$tool_basename", so it can be a program name with args.
30528set dummy $tool_basename; ac_word=$2
30529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30530$as_echo_n "checking for $ac_word... " >&6; }
30531if ${ac_cv_path_JARSIGNER+:} false; then :
30532  $as_echo_n "(cached) " >&6
30533else
30534  case $JARSIGNER in
30535  [\\/]* | ?:[\\/]*)
30536  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30537  ;;
30538  *)
30539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30540for as_dir in $PATH
30541do
30542  IFS=$as_save_IFS
30543  test -z "$as_dir" && as_dir=.
30544    for ac_exec_ext in '' $ac_executable_extensions; do
30545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30546    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30548    break 2
30549  fi
30550done
30551  done
30552IFS=$as_save_IFS
30553
30554  ;;
30555esac
30556fi
30557JARSIGNER=$ac_cv_path_JARSIGNER
30558if test -n "$JARSIGNER"; then
30559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30560$as_echo "$JARSIGNER" >&6; }
30561else
30562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30563$as_echo "no" >&6; }
30564fi
30565
30566
30567          if test "x$JARSIGNER" = x; then
30568            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30569          fi
30570        else
30571          # Otherwise we believe it is a complete path. Use it as it is.
30572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30573$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30574          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30575$as_echo_n "checking for JARSIGNER... " >&6; }
30576          if test ! -x "$tool_specified"; then
30577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30578$as_echo "not found" >&6; }
30579            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30580          fi
30581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30582$as_echo "$tool_specified" >&6; }
30583        fi
30584      fi
30585    fi
30586
30587  fi
30588
30589
30590
30591  # Finally, set some other options...
30592
30593  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30594  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30595
30596
30597
30598  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30599  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30600  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30601  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30602  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30603  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30604    dummy="$dummy --patch-module foo=bar"
30605    JVM_ARG_OK=true
30606  else
30607    $ECHO "Arg failed:" >&5
30608    $ECHO "$OUTPUT" >&5
30609    JVM_ARG_OK=false
30610  fi
30611
30612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30613$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30614  if test "x$JVM_ARG_OK" = "xtrue"; then
30615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30616$as_echo "yes" >&6; }
30617    BOOT_JDK_MODULAR="true"
30618  else
30619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30620$as_echo "no" >&6; }
30621    BOOT_JDK_MODULAR="false"
30622  fi
30623
30624
30625
30626
30627  # Check if the boot jdk is 32 or 64 bit
30628  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30629    BOOT_JDK_BITS="64"
30630  else
30631    BOOT_JDK_BITS="32"
30632  fi
30633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30634$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30636$as_echo "$BOOT_JDK_BITS" >&6; }
30637
30638
30639
30640
30641# Check whether --with-build-jdk was given.
30642if test "${with_build_jdk+set}" = set; then :
30643  withval=$with_build_jdk;
30644fi
30645
30646
30647  CREATE_BUILDJDK=false
30648  EXTERNAL_BUILDJDK=false
30649  BUILD_JDK_FOUND="no"
30650  if test "x$with_build_jdk" != "x"; then
30651
30652  if test "x$BUILD_JDK_FOUND" = xno; then
30653    # Execute the test
30654
30655       if test "x$with_build_jdk" != x; then
30656         BUILD_JDK=$with_build_jdk
30657         BUILD_JDK_FOUND=maybe
30658         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30659$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30660       fi
30661
30662    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30663    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30664      # Do we have a bin/java?
30665      if test ! -x "$BUILD_JDK/bin/java"; then
30666        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30667$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30668        BUILD_JDK_FOUND=no
30669      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30671$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30672        BUILD_JDK_FOUND=no
30673      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30674        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30675$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30676        BUILD_JDK_FOUND=no
30677      elif test ! -x "$BUILD_JDK/bin/javac"; then
30678        # Do we have a bin/javac?
30679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30680$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30682$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30683        BUILD_JDK_FOUND=no
30684      else
30685        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30686        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30687
30688        # Extra M4 quote needed to protect [] in grep expression.
30689        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30690        if test "x$FOUND_CORRECT_VERSION" = x; then
30691          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30692$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30693          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30694$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30695          BUILD_JDK_FOUND=no
30696        else
30697          # We're done!
30698          BUILD_JDK_FOUND=yes
30699
30700  # Only process if variable expands to non-empty
30701
30702  if test "x$BUILD_JDK" != x; then
30703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30704
30705  # Input might be given as Windows format, start by converting to
30706  # unix format.
30707  path="$BUILD_JDK"
30708  new_path=`$CYGPATH -u "$path"`
30709
30710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30713  # "foo.exe" is OK but "foo" is an error.
30714  #
30715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30716  # It is also a way to make sure we got the proper file name for the real test later on.
30717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30718  if test "x$test_shortpath" = x; then
30719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30720$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30721    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30722  fi
30723
30724  # Call helper function which possibly converts this using DOS-style short mode.
30725  # If so, the updated path is stored in $new_path.
30726
30727  input_path="$new_path"
30728  # Check if we need to convert this using DOS-style short mode. If the path
30729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30730  # take no chances and rewrite it.
30731  # Note: m4 eats our [], so we need to use [ and ] instead.
30732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30733  if test "x$has_forbidden_chars" != x; then
30734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30738      # Going to short mode and back again did indeed matter. Since short mode is
30739      # case insensitive, let's make it lowercase to improve readability.
30740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30741      # Now convert it back to Unix-style (cygpath)
30742      input_path=`$CYGPATH -u "$shortmode_path"`
30743      new_path="$input_path"
30744    fi
30745  fi
30746
30747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30748  if test "x$test_cygdrive_prefix" = x; then
30749    # As a simple fix, exclude /usr/bin since it's not a real path.
30750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30752      # a path prefixed by /cygdrive for fixpath to work.
30753      new_path="$CYGWIN_ROOT_PATH$input_path"
30754    fi
30755  fi
30756
30757
30758  if test "x$path" != "x$new_path"; then
30759    BUILD_JDK="$new_path"
30760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30761$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30762  fi
30763
30764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30765
30766  path="$BUILD_JDK"
30767  has_colon=`$ECHO $path | $GREP ^.:`
30768  new_path="$path"
30769  if test "x$has_colon" = x; then
30770    # Not in mixed or Windows style, start by that.
30771    new_path=`cmd //c echo $path`
30772  fi
30773
30774
30775  input_path="$new_path"
30776  # Check if we need to convert this using DOS-style short mode. If the path
30777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30778  # take no chances and rewrite it.
30779  # Note: m4 eats our [], so we need to use [ and ] instead.
30780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30781  if test "x$has_forbidden_chars" != x; then
30782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30784  fi
30785
30786
30787  windows_path="$new_path"
30788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30789    unix_path=`$CYGPATH -u "$windows_path"`
30790    new_path="$unix_path"
30791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30793    new_path="$unix_path"
30794  fi
30795
30796  if test "x$path" != "x$new_path"; then
30797    BUILD_JDK="$new_path"
30798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30799$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30800  fi
30801
30802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30804
30805    else
30806      # We're on a unix platform. Hooray! :)
30807      path="$BUILD_JDK"
30808      has_space=`$ECHO "$path" | $GREP " "`
30809      if test "x$has_space" != x; then
30810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30811$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30813      fi
30814
30815      # Use eval to expand a potential ~
30816      eval path="$path"
30817      if test ! -f "$path" && test ! -d "$path"; then
30818        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30819      fi
30820
30821      if test -d "$path"; then
30822        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30823      else
30824        dir="`$DIRNAME "$path"`"
30825        base="`$BASENAME "$path"`"
30826        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30827      fi
30828    fi
30829  fi
30830
30831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30832$as_echo_n "checking for Build JDK... " >&6; }
30833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30834$as_echo "$BUILD_JDK" >&6; }
30835          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30836$as_echo_n "checking Build JDK version... " >&6; }
30837          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30839$as_echo "$BUILD_JDK_VERSION" >&6; }
30840        fi # end check jdk version
30841      fi # end check java
30842    fi # end check build jdk found
30843  fi
30844
30845    EXTERNAL_BUILDJDK=true
30846  else
30847    if test "x$COMPILE_TYPE" = "xcross"; then
30848      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30849      BUILD_JDK_FOUND=yes
30850      CREATE_BUILDJDK=true
30851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30852$as_echo_n "checking for Build JDK... " >&6; }
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30854$as_echo "yes, will build it for the host platform" >&6; }
30855    else
30856      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30857      BUILD_JDK_FOUND=yes
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30859$as_echo_n "checking for Build JDK... " >&6; }
30860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30861$as_echo "yes, will use output dir" >&6; }
30862    fi
30863  fi
30864
30865  JMOD="$BUILD_JDK/bin/jmod"
30866  JLINK="$BUILD_JDK/bin/jlink"
30867
30868
30869
30870  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30872$as_echo_n "checking for Build JDK... " >&6; }
30873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30874$as_echo "no" >&6; }
30875    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30876  fi
30877
30878
30879
30880
30881
30882
30883###############################################################################
30884#
30885# Configure the sources to use. We can add or override individual directories.
30886#
30887###############################################################################
30888
30889
30890  # Where are the sources.
30891  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30892  CORBA_TOPDIR="$SRC_ROOT/corba"
30893  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30894  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30895  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30896  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30897  JDK_TOPDIR="$SRC_ROOT/jdk"
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907  # This feature is no longer supported.
30908
30909
30910
30911# Check whether --with-add-source-root was given.
30912if test "${with_add_source_root+set}" = set; then :
30913  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
30914$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30915fi
30916
30917
30918
30919
30920# Check whether --with-override-source-root was given.
30921if test "${with_override_source_root+set}" = set; then :
30922  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
30923$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30924fi
30925
30926
30927
30928
30929# Check whether --with-adds-and-overrides was given.
30930if test "${with_adds_and_overrides+set}" = set; then :
30931  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
30932$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30933fi
30934
30935
30936
30937
30938# Check whether --with-override-langtools was given.
30939if test "${with_override_langtools+set}" = set; then :
30940  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30941$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30942fi
30943
30944
30945
30946
30947# Check whether --with-override-corba was given.
30948if test "${with_override_corba+set}" = set; then :
30949  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30950$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30951fi
30952
30953
30954
30955
30956# Check whether --with-override-jaxp was given.
30957if test "${with_override_jaxp+set}" = set; then :
30958  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30959$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30960fi
30961
30962
30963
30964
30965# Check whether --with-override-jaxws was given.
30966if test "${with_override_jaxws+set}" = set; then :
30967  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30968$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30969fi
30970
30971
30972
30973
30974# Check whether --with-override-hotspot was given.
30975if test "${with_override_hotspot+set}" = set; then :
30976  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30977$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30978fi
30979
30980
30981
30982
30983# Check whether --with-override-nashorn was given.
30984if test "${with_override_nashorn+set}" = set; then :
30985  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30986$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30987fi
30988
30989
30990
30991
30992# Check whether --with-override-jdk was given.
30993if test "${with_override_jdk+set}" = set; then :
30994  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30995$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30996fi
30997
30998
30999
31000
31001  BUILD_OUTPUT="$OUTPUT_ROOT"
31002
31003
31004  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31005  BUILD_HOTSPOT=true
31006
31007
31008
31009# Check whether --with-import-hotspot was given.
31010if test "${with_import_hotspot+set}" = set; then :
31011  withval=$with_import_hotspot;
31012fi
31013
31014  if test "x$with_import_hotspot" != x; then
31015    CURDIR="$PWD"
31016    cd "$with_import_hotspot"
31017    HOTSPOT_DIST="`pwd`"
31018    cd "$CURDIR"
31019    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31020      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31021    fi
31022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31023$as_echo_n "checking if hotspot should be imported... " >&6; }
31024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31025$as_echo "yes from $HOTSPOT_DIST" >&6; }
31026    BUILD_HOTSPOT=false
31027  fi
31028
31029  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31030
31031
31032
31033
31034# Check whether --with-import-modules was given.
31035if test "${with_import_modules+set}" = set; then :
31036  withval=$with_import_modules;
31037fi
31038
31039
31040  if test "x$with_import_modules" != x \
31041      && test "x$with_import_modules" != "xno"; then
31042    if test -d "$with_import_modules"; then
31043      IMPORT_MODULES_TOPDIR="$with_import_modules"
31044
31045  # Only process if variable expands to non-empty
31046
31047  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31049
31050  # Input might be given as Windows format, start by converting to
31051  # unix format.
31052  path="$IMPORT_MODULES_TOPDIR"
31053  new_path=`$CYGPATH -u "$path"`
31054
31055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31058  # "foo.exe" is OK but "foo" is an error.
31059  #
31060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31061  # It is also a way to make sure we got the proper file name for the real test later on.
31062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31063  if test "x$test_shortpath" = x; then
31064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31065$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31066    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31067  fi
31068
31069  # Call helper function which possibly converts this using DOS-style short mode.
31070  # If so, the updated path is stored in $new_path.
31071
31072  input_path="$new_path"
31073  # Check if we need to convert this using DOS-style short mode. If the path
31074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31075  # take no chances and rewrite it.
31076  # Note: m4 eats our [], so we need to use [ and ] instead.
31077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31078  if test "x$has_forbidden_chars" != x; then
31079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31083      # Going to short mode and back again did indeed matter. Since short mode is
31084      # case insensitive, let's make it lowercase to improve readability.
31085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31086      # Now convert it back to Unix-style (cygpath)
31087      input_path=`$CYGPATH -u "$shortmode_path"`
31088      new_path="$input_path"
31089    fi
31090  fi
31091
31092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31093  if test "x$test_cygdrive_prefix" = x; then
31094    # As a simple fix, exclude /usr/bin since it's not a real path.
31095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31097      # a path prefixed by /cygdrive for fixpath to work.
31098      new_path="$CYGWIN_ROOT_PATH$input_path"
31099    fi
31100  fi
31101
31102
31103  if test "x$path" != "x$new_path"; then
31104    IMPORT_MODULES_TOPDIR="$new_path"
31105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31106$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31107  fi
31108
31109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31110
31111  path="$IMPORT_MODULES_TOPDIR"
31112  has_colon=`$ECHO $path | $GREP ^.:`
31113  new_path="$path"
31114  if test "x$has_colon" = x; then
31115    # Not in mixed or Windows style, start by that.
31116    new_path=`cmd //c echo $path`
31117  fi
31118
31119
31120  input_path="$new_path"
31121  # Check if we need to convert this using DOS-style short mode. If the path
31122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31123  # take no chances and rewrite it.
31124  # Note: m4 eats our [], so we need to use [ and ] instead.
31125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31126  if test "x$has_forbidden_chars" != x; then
31127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31129  fi
31130
31131
31132  windows_path="$new_path"
31133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31134    unix_path=`$CYGPATH -u "$windows_path"`
31135    new_path="$unix_path"
31136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31138    new_path="$unix_path"
31139  fi
31140
31141  if test "x$path" != "x$new_path"; then
31142    IMPORT_MODULES_TOPDIR="$new_path"
31143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31144$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31145  fi
31146
31147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31149
31150    else
31151      # We're on a unix platform. Hooray! :)
31152      path="$IMPORT_MODULES_TOPDIR"
31153      has_space=`$ECHO "$path" | $GREP " "`
31154      if test "x$has_space" != x; then
31155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31156$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31157        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31158      fi
31159
31160      # Use eval to expand a potential ~
31161      eval path="$path"
31162      if test ! -f "$path" && test ! -d "$path"; then
31163        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31164      fi
31165
31166      if test -d "$path"; then
31167        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31168      else
31169        dir="`$DIRNAME "$path"`"
31170        base="`$BASENAME "$path"`"
31171        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31172      fi
31173    fi
31174  fi
31175
31176    elif test -e "$with_import_modules"; then
31177      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31178      $RM -rf "$IMPORT_MODULES_TOPDIR"
31179      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31180      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31181        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31182      fi
31183    else
31184      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31185    fi
31186  fi
31187
31188  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31189    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31190  fi
31191  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31192    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31193  fi
31194  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31195    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31196  fi
31197  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31198    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31199  fi
31200  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31201    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31202  fi
31203  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31204    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31205  fi
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215###############################################################################
31216#
31217# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31218# native code.
31219#
31220###############################################################################
31221
31222# See if we are doing a complete static build or not
31223
31224  # Check whether --enable-static-build was given.
31225if test "${enable_static_build+set}" = set; then :
31226  enableval=$enable_static_build;
31227fi
31228
31229  STATIC_BUILD=false
31230  if test "x$enable_static_build" = "xyes"; then
31231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31232$as_echo_n "checking if static build is enabled... " >&6; }
31233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31234$as_echo "yes" >&6; }
31235    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31236      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31237    fi
31238    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31239    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31240    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31241    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31242    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31243    STATIC_BUILD=true
31244  elif test "x$enable_static_build" = "xno"; then
31245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31246$as_echo_n "checking if static build is enabled... " >&6; }
31247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31248$as_echo "no" >&6; }
31249  elif test "x$enable_static_build" != "x"; then
31250    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31251  fi
31252
31253
31254
31255
31256# First determine the toolchain type (compiler family)
31257
31258
31259# Check whether --with-toolchain-type was given.
31260if test "${with_toolchain_type+set}" = set; then :
31261  withval=$with_toolchain_type;
31262fi
31263
31264
31265  # Use indirect variable referencing
31266  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31267  VALID_TOOLCHAINS=${!toolchain_var_name}
31268
31269  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31270    if test -n "$XCODEBUILD"; then
31271      # On Mac OS X, default toolchain to clang after Xcode 5
31272      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31273      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31274      if test $? -ne 0; then
31275        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31276      fi
31277      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31278          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31279          $CUT -f 1 -d .`
31280      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31281$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31282      if test $XCODE_MAJOR_VERSION -ge 5; then
31283          DEFAULT_TOOLCHAIN="clang"
31284      else
31285          DEFAULT_TOOLCHAIN="gcc"
31286      fi
31287    else
31288      # If Xcode is not installed, but the command line tools are
31289      # then we can't run xcodebuild. On these systems we should
31290      # default to clang
31291      DEFAULT_TOOLCHAIN="clang"
31292    fi
31293  else
31294    # First toolchain type in the list is the default
31295    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31296  fi
31297
31298  if test "x$with_toolchain_type" = xlist; then
31299    # List all toolchains
31300    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31301$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31302    for toolchain in $VALID_TOOLCHAINS; do
31303      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31304      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31305      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31306    done
31307
31308    exit 0
31309  elif test "x$with_toolchain_type" != x; then
31310    # User override; check that it is valid
31311    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31312      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31313$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31314      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31315$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31316      as_fn_error $? "Cannot continue." "$LINENO" 5
31317    fi
31318    TOOLCHAIN_TYPE=$with_toolchain_type
31319  else
31320    # No flag given, use default
31321    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31322  fi
31323
31324
31325  TOOLCHAIN_CC_BINARY_clang="clang"
31326  TOOLCHAIN_CC_BINARY_gcc="gcc"
31327  TOOLCHAIN_CC_BINARY_microsoft="cl"
31328  TOOLCHAIN_CC_BINARY_solstudio="cc"
31329  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31330
31331  TOOLCHAIN_CXX_BINARY_clang="clang++"
31332  TOOLCHAIN_CXX_BINARY_gcc="g++"
31333  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31334  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31335  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31336
31337  # Use indirect variable referencing
31338  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31339  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31340  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31341  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31342  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31343  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31344  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31345  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31346
31347
31348  # Define filename patterns
31349  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31350    LIBRARY_PREFIX=
31351    SHARED_LIBRARY_SUFFIX='.dll'
31352    STATIC_LIBRARY_SUFFIX='.lib'
31353    SHARED_LIBRARY='$1.dll'
31354    STATIC_LIBRARY='$1.lib'
31355    OBJ_SUFFIX='.obj'
31356    EXE_SUFFIX='.exe'
31357  else
31358    LIBRARY_PREFIX=lib
31359    SHARED_LIBRARY_SUFFIX='.so'
31360    STATIC_LIBRARY_SUFFIX='.a'
31361    SHARED_LIBRARY='lib$1.so'
31362    STATIC_LIBRARY='lib$1.a'
31363    OBJ_SUFFIX='.o'
31364    EXE_SUFFIX=''
31365    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31366      # For full static builds, we're overloading the SHARED_LIBRARY
31367      # variables in order to limit the amount of changes required.
31368      # It would be better to remove SHARED and just use LIBRARY and
31369      # LIBRARY_SUFFIX for libraries that can be built either
31370      # shared or static and use STATIC_* for libraries that are
31371      # always built statically.
31372      if test "x$STATIC_BUILD" = xtrue; then
31373        SHARED_LIBRARY='lib$1.a'
31374        SHARED_LIBRARY_SUFFIX='.a'
31375      else
31376        SHARED_LIBRARY='lib$1.dylib'
31377        SHARED_LIBRARY_SUFFIX='.dylib'
31378      fi
31379    fi
31380  fi
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31392    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31393$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31394  else
31395    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31396$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31397  fi
31398
31399
31400# User supplied flags should be used when configure detects compilers
31401
31402  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31404$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31405  fi
31406
31407  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31408    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31409$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31410  fi
31411
31412  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31414$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31415  fi
31416
31417
31418# Check whether --with-extra-cflags was given.
31419if test "${with_extra_cflags+set}" = set; then :
31420  withval=$with_extra_cflags;
31421fi
31422
31423
31424
31425# Check whether --with-extra-cxxflags was given.
31426if test "${with_extra_cxxflags+set}" = set; then :
31427  withval=$with_extra_cxxflags;
31428fi
31429
31430
31431
31432# Check whether --with-extra-ldflags was given.
31433if test "${with_extra_ldflags+set}" = set; then :
31434  withval=$with_extra_ldflags;
31435fi
31436
31437
31438  EXTRA_CFLAGS="$with_extra_cflags"
31439  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31440  EXTRA_LDFLAGS="$with_extra_ldflags"
31441
31442  # Hotspot needs these set in their legacy form
31443  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31444  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31445  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455  # The global CFLAGS and LDLAGS variables are used by configure tests and
31456  # should include the extra parameters
31457  CFLAGS="$EXTRA_CFLAGS"
31458  CXXFLAGS="$EXTRA_CXXFLAGS"
31459  LDFLAGS="$EXTRA_LDFLAGS"
31460  CPPFLAGS=""
31461
31462# The sysroot cflags are needed for configure to be able to run the compilers
31463
31464  if test "x$SYSROOT" != "x"; then
31465    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31466      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31467        # Solaris Studio does not have a concept of sysroot. Instead we must
31468        # make sure the default include and lib dirs are appended to each
31469        # compile and link command line. Must also add -I-xbuiltin to enable
31470        # inlining of system functions and intrinsics.
31471        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31472        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31473            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31474      fi
31475    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31476      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31477      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31478    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31479      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31480      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31481    fi
31482    # Propagate the sysroot args to hotspot
31483    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31484    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31485    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31486    # The global CFLAGS and LDFLAGS variables need these for configure to function
31487    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31488    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31489    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31490    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31491  fi
31492
31493  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31494    # We also need -iframework<path>/System/Library/Frameworks
31495    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31496    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31497    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31498    # set this here so it doesn't have to be peppered throughout the forest
31499    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31500    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31501  fi
31502
31503
31504
31505
31506
31507# Then detect the actual binaries needed
31508
31509  # FIXME: Is this needed?
31510  ac_ext=cpp
31511ac_cpp='$CXXCPP $CPPFLAGS'
31512ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31513ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31514ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31515
31516
31517  # Store the CFLAGS etc passed to the configure script.
31518  ORG_CFLAGS="$CFLAGS"
31519  ORG_CXXFLAGS="$CXXFLAGS"
31520
31521  # autoconf magic only relies on PATH, so update it if tools dir is specified
31522  OLD_PATH="$PATH"
31523
31524  # On Windows, we need to detect the visual studio installation first.
31525  # This will change the PATH, but we need to keep that new PATH even
31526  # after toolchain detection is done, since the compiler (on x86) uses
31527  # it for DLL resolution in runtime.
31528  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31529      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31530
31531  # Store path to cygwin link.exe to help excluding it when searching for
31532  # VS linker. This must be done before changing the PATH when looking for VS.
31533  # Extract the first word of "link", so it can be a program name with args.
31534set dummy link; ac_word=$2
31535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31536$as_echo_n "checking for $ac_word... " >&6; }
31537if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31538  $as_echo_n "(cached) " >&6
31539else
31540  case $CYGWIN_LINK in
31541  [\\/]* | ?:[\\/]*)
31542  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31543  ;;
31544  *)
31545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31546for as_dir in $PATH
31547do
31548  IFS=$as_save_IFS
31549  test -z "$as_dir" && as_dir=.
31550    for ac_exec_ext in '' $ac_executable_extensions; do
31551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31552    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31554    break 2
31555  fi
31556done
31557  done
31558IFS=$as_save_IFS
31559
31560  ;;
31561esac
31562fi
31563CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31564if test -n "$CYGWIN_LINK"; then
31565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31566$as_echo "$CYGWIN_LINK" >&6; }
31567else
31568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31569$as_echo "no" >&6; }
31570fi
31571
31572
31573  if test "x$CYGWIN_LINK" != x; then
31574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31575$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31576    "$CYGWIN_LINK" --version > /dev/null
31577    if test $? -eq 0 ; then
31578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31579$as_echo "yes" >&6; }
31580    else
31581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31582$as_echo "no" >&6; }
31583      # This might be the VS linker. Don't exclude it later on.
31584      CYGWIN_LINK=""
31585    fi
31586  fi
31587
31588  # First-hand choice is to locate and run the vsvars bat file.
31589
31590
31591# Check whether --with-toolchain-version was given.
31592if test "${with_toolchain_version+set}" = set; then :
31593  withval=$with_toolchain_version;
31594fi
31595
31596
31597  if test "x$with_toolchain_version" = xlist; then
31598    # List all toolchains
31599    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31600$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31601    for version in $VALID_VS_VERSIONS; do
31602      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31603      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31604    done
31605
31606    exit 0
31607  elif test "x$DEVKIT_VS_VERSION" != x; then
31608    VS_VERSION=$DEVKIT_VS_VERSION
31609    TOOLCHAIN_VERSION=$VS_VERSION
31610    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31611    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31612    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31613    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31614    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31615    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31616
31617    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31618    # can still be exported as INCLUDE for compiler invocations without
31619    # SYSROOT_CFLAGS
31620    OLDIFS="$IFS"
31621    IFS=";"
31622    for i in $DEVKIT_VS_INCLUDE; do
31623      ipath=$i
31624
31625  unix_path="$ipath"
31626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31627    windows_path=`$CYGPATH -m "$unix_path"`
31628    ipath="$windows_path"
31629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31630    windows_path=`cmd //c echo $unix_path`
31631    ipath="$windows_path"
31632  fi
31633
31634      VS_INCLUDE="$VS_INCLUDE;$ipath"
31635    done
31636    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31637    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31638    for i in $DEVKIT_VS_LIB; do
31639      libpath=$i
31640
31641  unix_path="$libpath"
31642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31643    windows_path=`$CYGPATH -m "$unix_path"`
31644    libpath="$windows_path"
31645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31646    windows_path=`cmd //c echo $unix_path`
31647    libpath="$windows_path"
31648  fi
31649
31650      VS_LIB="$VS_LIB;$libpath"
31651    done
31652    IFS="$OLDIFS"
31653
31654    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31655$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31656
31657  elif test "x$with_toolchain_version" != x; then
31658    # User override; check that it is valid
31659    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31660      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31661$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31662      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31663$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31664      as_fn_error $? "Cannot continue." "$LINENO" 5
31665    fi
31666    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31667  else
31668    # No flag given, use default
31669    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31670  fi
31671
31672  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31673
31674  VS_VERSION="$VS_VERSION"
31675  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31676  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31677  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31678  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31679
31680  # When using --with-tools-dir, assume it points to the correct and default
31681  # version of Visual Studio or that --with-toolchain-version was also set.
31682  if test "x$with_tools_dir" != x; then
31683
31684  if test "x$VS_ENV_CMD" = x; then
31685    VS_VERSION="${VS_VERSION}"
31686    VS_BASE="$with_tools_dir/../.."
31687    METHOD="--with-tools-dir"
31688
31689    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31690      VCVARSFILE="vc/bin/vcvars32.bat"
31691    else
31692      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31693    fi
31694
31695
31696  windows_path="$VS_BASE"
31697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31698    unix_path=`$CYGPATH -u "$windows_path"`
31699    VS_BASE="$unix_path"
31700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31702    VS_BASE="$unix_path"
31703  fi
31704
31705    if test -d "$VS_BASE"; then
31706      if test -f "$VS_BASE/$VCVARSFILE"; then
31707        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31708$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31709        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31710        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31711        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31712        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31713      else
31714        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31715$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31716        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31717$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31718      fi
31719    fi
31720  fi
31721
31722
31723  if test "x$VS_ENV_CMD" = x; then
31724    VS_VERSION="${VS_VERSION}"
31725    VS_BASE="$with_tools_dir/../../.."
31726    METHOD="--with-tools-dir"
31727
31728    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31729      VCVARSFILE="vc/bin/vcvars32.bat"
31730    else
31731      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31732    fi
31733
31734
31735  windows_path="$VS_BASE"
31736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31737    unix_path=`$CYGPATH -u "$windows_path"`
31738    VS_BASE="$unix_path"
31739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31741    VS_BASE="$unix_path"
31742  fi
31743
31744    if test -d "$VS_BASE"; then
31745      if test -f "$VS_BASE/$VCVARSFILE"; then
31746        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31747$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31748        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31749        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31750        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31751        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31752      else
31753        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31754$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31755        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31756$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31757      fi
31758    fi
31759  fi
31760
31761    if test "x$VS_ENV_CMD" = x; then
31762      # Having specified an argument which is incorrect will produce an instant failure;
31763      # we should not go on looking
31764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31765$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31766      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31767$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31768      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31769$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31770      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31771    fi
31772  fi
31773
31774  VS_ENV_CMD=""
31775  VS_ENV_ARGS=""
31776
31777  if test "x$VS_COMNTOOLS" != x; then
31778
31779  if test "x$VS_ENV_CMD" = x; then
31780    VS_VERSION="${VS_VERSION}"
31781    VS_BASE="$VS_COMNTOOLS/../.."
31782    METHOD="$VS_COMNTOOLS_VAR variable"
31783
31784    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31785      VCVARSFILE="vc/bin/vcvars32.bat"
31786    else
31787      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31788    fi
31789
31790
31791  windows_path="$VS_BASE"
31792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31793    unix_path=`$CYGPATH -u "$windows_path"`
31794    VS_BASE="$unix_path"
31795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31797    VS_BASE="$unix_path"
31798  fi
31799
31800    if test -d "$VS_BASE"; then
31801      if test -f "$VS_BASE/$VCVARSFILE"; then
31802        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31803$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31804        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31805        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31806        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31807        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31808      else
31809        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31810$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31811        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31812$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31813      fi
31814    fi
31815  fi
31816
31817  fi
31818  if test "x$PROGRAMFILES" != x; then
31819
31820  if test "x$VS_ENV_CMD" = x; then
31821    VS_VERSION="${VS_VERSION}"
31822    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31823    METHOD="well-known name"
31824
31825    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31826      VCVARSFILE="vc/bin/vcvars32.bat"
31827    else
31828      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31829    fi
31830
31831
31832  windows_path="$VS_BASE"
31833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31834    unix_path=`$CYGPATH -u "$windows_path"`
31835    VS_BASE="$unix_path"
31836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31838    VS_BASE="$unix_path"
31839  fi
31840
31841    if test -d "$VS_BASE"; then
31842      if test -f "$VS_BASE/$VCVARSFILE"; then
31843        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31844$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31845        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31846        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31847        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31848        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31849      else
31850        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31851$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31852        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31853$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31854      fi
31855    fi
31856  fi
31857
31858  fi
31859  # Work around the insanely named ProgramFiles(x86) env variable
31860  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31861  if test "x$PROGRAMFILES_X86" != x; then
31862
31863  if test "x$VS_ENV_CMD" = x; then
31864    VS_VERSION="${VS_VERSION}"
31865    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31866    METHOD="well-known name"
31867
31868    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31869      VCVARSFILE="vc/bin/vcvars32.bat"
31870    else
31871      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31872    fi
31873
31874
31875  windows_path="$VS_BASE"
31876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31877    unix_path=`$CYGPATH -u "$windows_path"`
31878    VS_BASE="$unix_path"
31879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31881    VS_BASE="$unix_path"
31882  fi
31883
31884    if test -d "$VS_BASE"; then
31885      if test -f "$VS_BASE/$VCVARSFILE"; then
31886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31887$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31888        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31889        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31890        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31891        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31892      else
31893        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31894$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31895        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31896$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31897      fi
31898    fi
31899  fi
31900
31901  fi
31902
31903  if test "x$VS_ENV_CMD" = x; then
31904    VS_VERSION="${VS_VERSION}"
31905    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31906    METHOD="well-known name"
31907
31908    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31909      VCVARSFILE="vc/bin/vcvars32.bat"
31910    else
31911      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31912    fi
31913
31914
31915  windows_path="$VS_BASE"
31916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31917    unix_path=`$CYGPATH -u "$windows_path"`
31918    VS_BASE="$unix_path"
31919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31921    VS_BASE="$unix_path"
31922  fi
31923
31924    if test -d "$VS_BASE"; then
31925      if test -f "$VS_BASE/$VCVARSFILE"; then
31926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31927$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31928        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31929        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31930        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31931        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31932      else
31933        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31934$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31935        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31936$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31937      fi
31938    fi
31939  fi
31940
31941
31942  if test "x$VS_ENV_CMD" = x; then
31943    VS_VERSION="${VS_VERSION}"
31944    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31945    METHOD="well-known name"
31946
31947    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31948      VCVARSFILE="vc/bin/vcvars32.bat"
31949    else
31950      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31951    fi
31952
31953
31954  windows_path="$VS_BASE"
31955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31956    unix_path=`$CYGPATH -u "$windows_path"`
31957    VS_BASE="$unix_path"
31958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31960    VS_BASE="$unix_path"
31961  fi
31962
31963    if test -d "$VS_BASE"; then
31964      if test -f "$VS_BASE/$VCVARSFILE"; then
31965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31966$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31967        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31968        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31969        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31970        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31971      else
31972        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31973$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31974        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31975$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31976      fi
31977    fi
31978  fi
31979
31980
31981  if test "x$SDK_INSTALL_DIR" != x; then
31982    if test "x$ProgramW6432" != x; then
31983
31984  if test "x$VS_ENV_CMD" = x; then
31985    VS_VERSION="${VS_VERSION}"
31986    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31987    METHOD="well-known name"
31988
31989  windows_path="$WIN_SDK_BASE"
31990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31991    unix_path=`$CYGPATH -u "$windows_path"`
31992    WIN_SDK_BASE="$unix_path"
31993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31995    WIN_SDK_BASE="$unix_path"
31996  fi
31997
31998    if test -d "$WIN_SDK_BASE"; then
31999      # There have been cases of partial or broken SDK installations. A missing
32000      # lib dir is not going to work.
32001      if test ! -d "$WIN_SDK_BASE/lib"; then
32002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32003$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32004        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32005$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32006      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32008$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32009        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32010        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32011          VS_ENV_ARGS="/x86"
32012        else
32013          VS_ENV_ARGS="/x64"
32014        fi
32015        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32016        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32017        # TODO: improve detection for other versions of SDK
32018        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32019      else
32020        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32021$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32023$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32024      fi
32025    fi
32026  fi
32027
32028    fi
32029    if test "x$PROGRAMW6432" != x; then
32030
32031  if test "x$VS_ENV_CMD" = x; then
32032    VS_VERSION="${VS_VERSION}"
32033    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32034    METHOD="well-known name"
32035
32036  windows_path="$WIN_SDK_BASE"
32037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32038    unix_path=`$CYGPATH -u "$windows_path"`
32039    WIN_SDK_BASE="$unix_path"
32040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32042    WIN_SDK_BASE="$unix_path"
32043  fi
32044
32045    if test -d "$WIN_SDK_BASE"; then
32046      # There have been cases of partial or broken SDK installations. A missing
32047      # lib dir is not going to work.
32048      if test ! -d "$WIN_SDK_BASE/lib"; then
32049        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32050$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32051        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32052$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32053      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32054        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32055$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32056        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32057        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32058          VS_ENV_ARGS="/x86"
32059        else
32060          VS_ENV_ARGS="/x64"
32061        fi
32062        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32063        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32064        # TODO: improve detection for other versions of SDK
32065        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32066      else
32067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32068$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32069        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32070$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32071      fi
32072    fi
32073  fi
32074
32075    fi
32076    if test "x$PROGRAMFILES" != x; then
32077
32078  if test "x$VS_ENV_CMD" = x; then
32079    VS_VERSION="${VS_VERSION}"
32080    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32081    METHOD="well-known name"
32082
32083  windows_path="$WIN_SDK_BASE"
32084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32085    unix_path=`$CYGPATH -u "$windows_path"`
32086    WIN_SDK_BASE="$unix_path"
32087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32089    WIN_SDK_BASE="$unix_path"
32090  fi
32091
32092    if test -d "$WIN_SDK_BASE"; then
32093      # There have been cases of partial or broken SDK installations. A missing
32094      # lib dir is not going to work.
32095      if test ! -d "$WIN_SDK_BASE/lib"; then
32096        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32097$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32098        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32099$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32100      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32101        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32102$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32103        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32104        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32105          VS_ENV_ARGS="/x86"
32106        else
32107          VS_ENV_ARGS="/x64"
32108        fi
32109        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32110        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32111        # TODO: improve detection for other versions of SDK
32112        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32113      else
32114        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32115$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32116        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32117$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32118      fi
32119    fi
32120  fi
32121
32122    fi
32123
32124  if test "x$VS_ENV_CMD" = x; then
32125    VS_VERSION="${VS_VERSION}"
32126    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32127    METHOD="well-known name"
32128
32129  windows_path="$WIN_SDK_BASE"
32130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32131    unix_path=`$CYGPATH -u "$windows_path"`
32132    WIN_SDK_BASE="$unix_path"
32133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32135    WIN_SDK_BASE="$unix_path"
32136  fi
32137
32138    if test -d "$WIN_SDK_BASE"; then
32139      # There have been cases of partial or broken SDK installations. A missing
32140      # lib dir is not going to work.
32141      if test ! -d "$WIN_SDK_BASE/lib"; then
32142        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32143$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32144        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32145$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32146      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32147        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32148$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32149        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32150        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32151          VS_ENV_ARGS="/x86"
32152        else
32153          VS_ENV_ARGS="/x64"
32154        fi
32155        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32156        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32157        # TODO: improve detection for other versions of SDK
32158        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32159      else
32160        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32161$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32162        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32163$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32164      fi
32165    fi
32166  fi
32167
32168
32169  if test "x$VS_ENV_CMD" = x; then
32170    VS_VERSION="${VS_VERSION}"
32171    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32172    METHOD="well-known name"
32173
32174  windows_path="$WIN_SDK_BASE"
32175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32176    unix_path=`$CYGPATH -u "$windows_path"`
32177    WIN_SDK_BASE="$unix_path"
32178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32180    WIN_SDK_BASE="$unix_path"
32181  fi
32182
32183    if test -d "$WIN_SDK_BASE"; then
32184      # There have been cases of partial or broken SDK installations. A missing
32185      # lib dir is not going to work.
32186      if test ! -d "$WIN_SDK_BASE/lib"; then
32187        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32188$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32189        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32190$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32191      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32192        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32193$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32194        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32195        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32196          VS_ENV_ARGS="/x86"
32197        else
32198          VS_ENV_ARGS="/x64"
32199        fi
32200        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32201        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32202        # TODO: improve detection for other versions of SDK
32203        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32204      else
32205        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32206$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32207        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32208$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32209      fi
32210    fi
32211  fi
32212
32213  fi
32214
32215    if test "x$VS_ENV_CMD" != x; then
32216      TOOLCHAIN_VERSION=$VS_VERSION
32217      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32218      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32219      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32220      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32221      # The rest of the variables are already evaled while probing
32222      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32223$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32224      break
32225    fi
32226  done
32227
32228
32229  # If we have a devkit, skip all of the below.
32230  if test "x$DEVKIT_VS_VERSION" = x; then
32231    if test "x$VS_ENV_CMD" != x; then
32232      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32233
32234  # Only process if variable expands to non-empty
32235
32236  if test "x$VS_ENV_CMD" != x; then
32237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32238
32239  # First separate the path from the arguments. This will split at the first
32240  # space.
32241  complete="$VS_ENV_CMD"
32242  path="${complete%% *}"
32243  tmp="$complete EOL"
32244  arguments="${tmp#* }"
32245
32246  # Input might be given as Windows format, start by converting to
32247  # unix format.
32248  new_path=`$CYGPATH -u "$path"`
32249
32250  # Now try to locate executable using which
32251  new_path=`$WHICH "$new_path" 2> /dev/null`
32252  # bat and cmd files are not always considered executable in cygwin causing which
32253  # to not find them
32254  if test "x$new_path" = x \
32255      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32256      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32257    new_path=`$CYGPATH -u "$path"`
32258  fi
32259  if test "x$new_path" = x; then
32260    # Oops. Which didn't find the executable.
32261    # The splitting of arguments from the executable at a space might have been incorrect,
32262    # since paths with space are more likely in Windows. Give it another try with the whole
32263    # argument.
32264    path="$complete"
32265    arguments="EOL"
32266    new_path=`$CYGPATH -u "$path"`
32267    new_path=`$WHICH "$new_path" 2> /dev/null`
32268    # bat and cmd files are not always considered executable in cygwin causing which
32269    # to not find them
32270    if test "x$new_path" = x \
32271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32273      new_path=`$CYGPATH -u "$path"`
32274    fi
32275    if test "x$new_path" = x; then
32276      # It's still not found. Now this is an unrecoverable error.
32277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32278$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32279      has_space=`$ECHO "$complete" | $GREP " "`
32280      if test "x$has_space" != x; then
32281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32283      fi
32284      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32285    fi
32286  fi
32287
32288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32291  # "foo.exe" is OK but "foo" is an error.
32292  #
32293  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32294  # It is also a way to make sure we got the proper file name for the real test later on.
32295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32296  if test "x$test_shortpath" = x; then
32297    # Short path failed, file does not exist as specified.
32298    # Try adding .exe or .cmd
32299    if test -f "${new_path}.exe"; then
32300      input_to_shortpath="${new_path}.exe"
32301    elif test -f "${new_path}.cmd"; then
32302      input_to_shortpath="${new_path}.cmd"
32303    else
32304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32305$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32308      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32309    fi
32310  else
32311    input_to_shortpath="$new_path"
32312  fi
32313
32314  # Call helper function which possibly converts this using DOS-style short mode.
32315  # If so, the updated path is stored in $new_path.
32316  new_path="$input_to_shortpath"
32317
32318  input_path="$input_to_shortpath"
32319  # Check if we need to convert this using DOS-style short mode. If the path
32320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32321  # take no chances and rewrite it.
32322  # Note: m4 eats our [], so we need to use [ and ] instead.
32323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32324  if test "x$has_forbidden_chars" != x; then
32325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32329      # Going to short mode and back again did indeed matter. Since short mode is
32330      # case insensitive, let's make it lowercase to improve readability.
32331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32332      # Now convert it back to Unix-style (cygpath)
32333      input_path=`$CYGPATH -u "$shortmode_path"`
32334      new_path="$input_path"
32335    fi
32336  fi
32337
32338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32339  if test "x$test_cygdrive_prefix" = x; then
32340    # As a simple fix, exclude /usr/bin since it's not a real path.
32341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32343      # a path prefixed by /cygdrive for fixpath to work.
32344      new_path="$CYGWIN_ROOT_PATH$input_path"
32345    fi
32346  fi
32347
32348  # remove trailing .exe if any
32349  new_path="${new_path/%.exe/}"
32350
32351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32352
32353  # First separate the path from the arguments. This will split at the first
32354  # space.
32355  complete="$VS_ENV_CMD"
32356  path="${complete%% *}"
32357  tmp="$complete EOL"
32358  arguments="${tmp#* }"
32359
32360  # Input might be given as Windows format, start by converting to
32361  # unix format.
32362  new_path="$path"
32363
32364  windows_path="$new_path"
32365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32366    unix_path=`$CYGPATH -u "$windows_path"`
32367    new_path="$unix_path"
32368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32370    new_path="$unix_path"
32371  fi
32372
32373
32374  # Now try to locate executable using which
32375  new_path=`$WHICH "$new_path" 2> /dev/null`
32376
32377  if test "x$new_path" = x; then
32378    # Oops. Which didn't find the executable.
32379    # The splitting of arguments from the executable at a space might have been incorrect,
32380    # since paths with space are more likely in Windows. Give it another try with the whole
32381    # argument.
32382    path="$complete"
32383    arguments="EOL"
32384    new_path="$path"
32385
32386  windows_path="$new_path"
32387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32388    unix_path=`$CYGPATH -u "$windows_path"`
32389    new_path="$unix_path"
32390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32392    new_path="$unix_path"
32393  fi
32394
32395
32396    new_path=`$WHICH "$new_path" 2> /dev/null`
32397    # bat and cmd files are not always considered executable in MSYS causing which
32398    # to not find them
32399    if test "x$new_path" = x \
32400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32402      new_path="$path"
32403
32404  windows_path="$new_path"
32405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32406    unix_path=`$CYGPATH -u "$windows_path"`
32407    new_path="$unix_path"
32408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32410    new_path="$unix_path"
32411  fi
32412
32413    fi
32414
32415    if test "x$new_path" = x; then
32416      # It's still not found. Now this is an unrecoverable error.
32417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32418$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32419      has_space=`$ECHO "$complete" | $GREP " "`
32420      if test "x$has_space" != x; then
32421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32423      fi
32424      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32425    fi
32426  fi
32427
32428  # Now new_path has a complete unix path to the binary
32429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32430    # Keep paths in /bin as-is, but remove trailing .exe if any
32431    new_path="${new_path/%.exe/}"
32432    # Do not save /bin paths to all_fixpath_prefixes!
32433  else
32434    # Not in mixed or Windows style, start by that.
32435    new_path=`cmd //c echo $new_path`
32436
32437  input_path="$new_path"
32438  # Check if we need to convert this using DOS-style short mode. If the path
32439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32440  # take no chances and rewrite it.
32441  # Note: m4 eats our [], so we need to use [ and ] instead.
32442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32443  if test "x$has_forbidden_chars" != x; then
32444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32446  fi
32447
32448    # Output is in $new_path
32449
32450  windows_path="$new_path"
32451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32452    unix_path=`$CYGPATH -u "$windows_path"`
32453    new_path="$unix_path"
32454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32456    new_path="$unix_path"
32457  fi
32458
32459    # remove trailing .exe if any
32460    new_path="${new_path/%.exe/}"
32461
32462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32464  fi
32465
32466    else
32467      # We're on a unix platform. Hooray! :)
32468      # First separate the path from the arguments. This will split at the first
32469      # space.
32470      complete="$VS_ENV_CMD"
32471      path="${complete%% *}"
32472      tmp="$complete EOL"
32473      arguments="${tmp#* }"
32474
32475      # Cannot rely on the command "which" here since it doesn't always work.
32476      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32477      if test -z "$is_absolute_path"; then
32478        # Path to executable is not absolute. Find it.
32479        IFS_save="$IFS"
32480        IFS=:
32481        for p in $PATH; do
32482          if test -f "$p/$path" && test -x "$p/$path"; then
32483            new_path="$p/$path"
32484            break
32485          fi
32486        done
32487        IFS="$IFS_save"
32488      else
32489        # This is an absolute path, we can use it without further modifications.
32490        new_path="$path"
32491      fi
32492
32493      if test "x$new_path" = x; then
32494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32495$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32496        has_space=`$ECHO "$complete" | $GREP " "`
32497        if test "x$has_space" != x; then
32498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32500        fi
32501        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32502      fi
32503    fi
32504
32505    # Now join together the path and the arguments once again
32506    if test "x$arguments" != xEOL; then
32507      new_complete="$new_path ${arguments% *}"
32508    else
32509      new_complete="$new_path"
32510    fi
32511
32512    if test "x$complete" != "x$new_complete"; then
32513      VS_ENV_CMD="$new_complete"
32514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32515$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32516    fi
32517  fi
32518
32519
32520      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32521      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32522$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32523
32524      # We need to create a couple of temporary files.
32525      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32526      $MKDIR -p $VS_ENV_TMP_DIR
32527
32528      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32529      # Instead create a shell script which will set the relevant variables when run.
32530      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32531
32532  unix_path="$WINPATH_VS_ENV_CMD"
32533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32534    windows_path=`$CYGPATH -m "$unix_path"`
32535    WINPATH_VS_ENV_CMD="$windows_path"
32536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32537    windows_path=`cmd //c echo $unix_path`
32538    WINPATH_VS_ENV_CMD="$windows_path"
32539  fi
32540
32541      WINPATH_BASH="$BASH"
32542
32543  unix_path="$WINPATH_BASH"
32544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32545    windows_path=`$CYGPATH -m "$unix_path"`
32546    WINPATH_BASH="$windows_path"
32547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32548    windows_path=`cmd //c echo $unix_path`
32549    WINPATH_BASH="$windows_path"
32550  fi
32551
32552
32553      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32554      # script (executable by bash) that will setup the important variables.
32555      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32556      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32557      # This will end up something like:
32558      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32559      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32560      # These will end up something like:
32561      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32562      # The trailing space for everyone except PATH is no typo, but is needed due
32563      # to trailing \ in the Windows paths. These will be stripped later.
32564      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32565          >> $EXTRACT_VC_ENV_BAT_FILE
32566      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32567          >> $EXTRACT_VC_ENV_BAT_FILE
32568      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32569          >> $EXTRACT_VC_ENV_BAT_FILE
32570      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32571          >> $EXTRACT_VC_ENV_BAT_FILE
32572      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32573          >> $EXTRACT_VC_ENV_BAT_FILE
32574      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32575          >> $EXTRACT_VC_ENV_BAT_FILE
32576
32577      # Now execute the newly created bat file.
32578      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32579      # Change directory so we don't need to mess with Windows paths in redirects.
32580      cd $VS_ENV_TMP_DIR
32581      cmd /c extract-vs-env.bat | $CAT
32582      cd $CURDIR
32583
32584      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32585        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32586$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32587        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32588$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32589        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32590$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32591        as_fn_error $? "Cannot continue" "$LINENO" 5
32592      fi
32593
32594      # Now set all paths and other env variables. This will allow the rest of
32595      # the configure script to find and run the compiler in the proper way.
32596      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32597$as_echo "$as_me: Setting extracted environment variables" >&6;}
32598      . $VS_ENV_TMP_DIR/set-vs-env.sh
32599      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32600      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32601    else
32602      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32603      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32604$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32605    fi
32606  fi
32607
32608  # At this point, we should have correct variables in the environment, or we can't continue.
32609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32610$as_echo_n "checking for Visual Studio variables... " >&6; }
32611
32612  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32613      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32614    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32616$as_echo "present but broken" >&6; }
32617      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32618    else
32619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32620$as_echo "ok" >&6; }
32621      # Remove any trailing "\" ";" and " " from the variables.
32622      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32623      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32624      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32625      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32626      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32627      # Remove any paths containing # (typically F#) as that messes up make. This
32628      # is needed if visual studio was installed with F# support.
32629      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32630
32631
32632
32633
32634
32635      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32636      OLDIFS="$IFS"
32637      IFS=";"
32638      for i in $VS_INCLUDE; do
32639        ipath=$i
32640        # Only process non-empty elements
32641        if test "x$ipath" != x; then
32642          IFS="$OLDIFS"
32643          # Check that directory exists before calling fixup_path
32644          testpath=$ipath
32645
32646  windows_path="$testpath"
32647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32648    unix_path=`$CYGPATH -u "$windows_path"`
32649    testpath="$unix_path"
32650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32652    testpath="$unix_path"
32653  fi
32654
32655          if test -d "$testpath"; then
32656
32657  # Only process if variable expands to non-empty
32658
32659  if test "x$ipath" != x; then
32660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32661
32662  # Input might be given as Windows format, start by converting to
32663  # unix format.
32664  path="$ipath"
32665  new_path=`$CYGPATH -u "$path"`
32666
32667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32670  # "foo.exe" is OK but "foo" is an error.
32671  #
32672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32673  # It is also a way to make sure we got the proper file name for the real test later on.
32674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32675  if test "x$test_shortpath" = x; then
32676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32677$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32678    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32679  fi
32680
32681  # Call helper function which possibly converts this using DOS-style short mode.
32682  # If so, the updated path is stored in $new_path.
32683
32684  input_path="$new_path"
32685  # Check if we need to convert this using DOS-style short mode. If the path
32686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32687  # take no chances and rewrite it.
32688  # Note: m4 eats our [], so we need to use [ and ] instead.
32689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32690  if test "x$has_forbidden_chars" != x; then
32691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32695      # Going to short mode and back again did indeed matter. Since short mode is
32696      # case insensitive, let's make it lowercase to improve readability.
32697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32698      # Now convert it back to Unix-style (cygpath)
32699      input_path=`$CYGPATH -u "$shortmode_path"`
32700      new_path="$input_path"
32701    fi
32702  fi
32703
32704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32705  if test "x$test_cygdrive_prefix" = x; then
32706    # As a simple fix, exclude /usr/bin since it's not a real path.
32707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32709      # a path prefixed by /cygdrive for fixpath to work.
32710      new_path="$CYGWIN_ROOT_PATH$input_path"
32711    fi
32712  fi
32713
32714
32715  if test "x$path" != "x$new_path"; then
32716    ipath="$new_path"
32717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32718$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32719  fi
32720
32721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32722
32723  path="$ipath"
32724  has_colon=`$ECHO $path | $GREP ^.:`
32725  new_path="$path"
32726  if test "x$has_colon" = x; then
32727    # Not in mixed or Windows style, start by that.
32728    new_path=`cmd //c echo $path`
32729  fi
32730
32731
32732  input_path="$new_path"
32733  # Check if we need to convert this using DOS-style short mode. If the path
32734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32735  # take no chances and rewrite it.
32736  # Note: m4 eats our [], so we need to use [ and ] instead.
32737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32738  if test "x$has_forbidden_chars" != x; then
32739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32741  fi
32742
32743
32744  windows_path="$new_path"
32745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32746    unix_path=`$CYGPATH -u "$windows_path"`
32747    new_path="$unix_path"
32748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32750    new_path="$unix_path"
32751  fi
32752
32753  if test "x$path" != "x$new_path"; then
32754    ipath="$new_path"
32755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32756$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32757  fi
32758
32759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32761
32762    else
32763      # We're on a unix platform. Hooray! :)
32764      path="$ipath"
32765      has_space=`$ECHO "$path" | $GREP " "`
32766      if test "x$has_space" != x; then
32767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32768$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32769        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32770      fi
32771
32772      # Use eval to expand a potential ~
32773      eval path="$path"
32774      if test ! -f "$path" && test ! -d "$path"; then
32775        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32776      fi
32777
32778      if test -d "$path"; then
32779        ipath="`cd "$path"; $THEPWDCMD -L`"
32780      else
32781        dir="`$DIRNAME "$path"`"
32782        base="`$BASENAME "$path"`"
32783        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32784      fi
32785    fi
32786  fi
32787
32788            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32789          fi
32790          IFS=";"
32791        fi
32792      done
32793      # Convert VS_LIB into SYSROOT_LDFLAGS
32794      for i in $VS_LIB; do
32795        libpath=$i
32796        # Only process non-empty elements
32797        if test "x$libpath" != x; then
32798          IFS="$OLDIFS"
32799          # Check that directory exists before calling fixup_path
32800          testpath=$libpath
32801
32802  windows_path="$testpath"
32803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32804    unix_path=`$CYGPATH -u "$windows_path"`
32805    testpath="$unix_path"
32806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32808    testpath="$unix_path"
32809  fi
32810
32811          if test -d "$testpath"; then
32812
32813  # Only process if variable expands to non-empty
32814
32815  if test "x$libpath" != x; then
32816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32817
32818  # Input might be given as Windows format, start by converting to
32819  # unix format.
32820  path="$libpath"
32821  new_path=`$CYGPATH -u "$path"`
32822
32823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32826  # "foo.exe" is OK but "foo" is an error.
32827  #
32828  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32829  # It is also a way to make sure we got the proper file name for the real test later on.
32830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32831  if test "x$test_shortpath" = x; then
32832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32833$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32834    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32835  fi
32836
32837  # Call helper function which possibly converts this using DOS-style short mode.
32838  # If so, the updated path is stored in $new_path.
32839
32840  input_path="$new_path"
32841  # Check if we need to convert this using DOS-style short mode. If the path
32842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32843  # take no chances and rewrite it.
32844  # Note: m4 eats our [], so we need to use [ and ] instead.
32845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32846  if test "x$has_forbidden_chars" != x; then
32847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32851      # Going to short mode and back again did indeed matter. Since short mode is
32852      # case insensitive, let's make it lowercase to improve readability.
32853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32854      # Now convert it back to Unix-style (cygpath)
32855      input_path=`$CYGPATH -u "$shortmode_path"`
32856      new_path="$input_path"
32857    fi
32858  fi
32859
32860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32861  if test "x$test_cygdrive_prefix" = x; then
32862    # As a simple fix, exclude /usr/bin since it's not a real path.
32863    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32865      # a path prefixed by /cygdrive for fixpath to work.
32866      new_path="$CYGWIN_ROOT_PATH$input_path"
32867    fi
32868  fi
32869
32870
32871  if test "x$path" != "x$new_path"; then
32872    libpath="$new_path"
32873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32874$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32875  fi
32876
32877    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32878
32879  path="$libpath"
32880  has_colon=`$ECHO $path | $GREP ^.:`
32881  new_path="$path"
32882  if test "x$has_colon" = x; then
32883    # Not in mixed or Windows style, start by that.
32884    new_path=`cmd //c echo $path`
32885  fi
32886
32887
32888  input_path="$new_path"
32889  # Check if we need to convert this using DOS-style short mode. If the path
32890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32891  # take no chances and rewrite it.
32892  # Note: m4 eats our [], so we need to use [ and ] instead.
32893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32894  if test "x$has_forbidden_chars" != x; then
32895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32897  fi
32898
32899
32900  windows_path="$new_path"
32901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32902    unix_path=`$CYGPATH -u "$windows_path"`
32903    new_path="$unix_path"
32904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32906    new_path="$unix_path"
32907  fi
32908
32909  if test "x$path" != "x$new_path"; then
32910    libpath="$new_path"
32911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32912$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32913  fi
32914
32915  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32916  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32917
32918    else
32919      # We're on a unix platform. Hooray! :)
32920      path="$libpath"
32921      has_space=`$ECHO "$path" | $GREP " "`
32922      if test "x$has_space" != x; then
32923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32924$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32925        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32926      fi
32927
32928      # Use eval to expand a potential ~
32929      eval path="$path"
32930      if test ! -f "$path" && test ! -d "$path"; then
32931        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32932      fi
32933
32934      if test -d "$path"; then
32935        libpath="`cd "$path"; $THEPWDCMD -L`"
32936      else
32937        dir="`$DIRNAME "$path"`"
32938        base="`$BASENAME "$path"`"
32939        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32940      fi
32941    fi
32942  fi
32943
32944            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32945          fi
32946          IFS=";"
32947        fi
32948      done
32949      IFS="$OLDIFS"
32950    fi
32951  else
32952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32953$as_echo "not found" >&6; }
32954
32955    if test "x$VS_ENV_CMD" = x; then
32956      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32957$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32958      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32959$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32960    else
32961      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32962$as_echo "$as_me: Running the extraction script failed." >&6;}
32963    fi
32964    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32965$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32966    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32967$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32968    as_fn_error $? "Cannot continue" "$LINENO" 5
32969  fi
32970
32971    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32972    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32973    PATH="$VS_PATH"
32974    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32975    export INCLUDE="$VS_INCLUDE"
32976    export LIB="$VS_LIB"
32977  else
32978    if test "x$XCODE_VERSION_OUTPUT" != x; then
32979      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32980      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32981      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32982    else
32983      # Currently we do not define this for other toolchains. This might change as the need arise.
32984      TOOLCHAIN_VERSION=
32985    fi
32986  fi
32987
32988
32989  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32990  # override all other locations.
32991  if test "x$TOOLCHAIN_PATH" != x; then
32992    PATH=$TOOLCHAIN_PATH:$PATH
32993  fi
32994
32995
32996  #
32997  # Setup the compilers (CC and CXX)
32998  #
32999
33000  COMPILER_NAME=C
33001  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33002
33003  if test "x$CC" != x; then
33004    # User has supplied compiler name already, always let that override.
33005    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33006$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33007    if test "x`basename $CC`" = "x$CC"; then
33008      # A command without a complete path is provided, search $PATH.
33009
33010      for ac_prog in $CC
33011do
33012  # Extract the first word of "$ac_prog", so it can be a program name with args.
33013set dummy $ac_prog; ac_word=$2
33014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33015$as_echo_n "checking for $ac_word... " >&6; }
33016if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33017  $as_echo_n "(cached) " >&6
33018else
33019  case $POTENTIAL_CC in
33020  [\\/]* | ?:[\\/]*)
33021  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33022  ;;
33023  *)
33024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33025for as_dir in $PATH
33026do
33027  IFS=$as_save_IFS
33028  test -z "$as_dir" && as_dir=.
33029    for ac_exec_ext in '' $ac_executable_extensions; do
33030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33031    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33033    break 2
33034  fi
33035done
33036  done
33037IFS=$as_save_IFS
33038
33039  ;;
33040esac
33041fi
33042POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33043if test -n "$POTENTIAL_CC"; then
33044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33045$as_echo "$POTENTIAL_CC" >&6; }
33046else
33047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33048$as_echo "no" >&6; }
33049fi
33050
33051
33052  test -n "$POTENTIAL_CC" && break
33053done
33054
33055      if test "x$POTENTIAL_CC" != x; then
33056        CC=$POTENTIAL_CC
33057      else
33058        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33059      fi
33060    else
33061      # Otherwise it might already be a complete path
33062      if test ! -x "$CC"; then
33063        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33064      fi
33065    fi
33066  else
33067    # No user supplied value. Locate compiler ourselves.
33068
33069    # If we are cross compiling, assume cross compilation tools follows the
33070    # cross compilation standard where they are prefixed with the autoconf
33071    # standard name for the target. For example the binary
33072    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33073    # If we are not cross compiling, then the default compiler name will be
33074    # used.
33075
33076    CC=
33077    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33078    # before checking the rest of the PATH.
33079    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33080    # step, this should not be necessary.
33081    if test -n "$TOOLCHAIN_PATH"; then
33082      PATH_save="$PATH"
33083      PATH="$TOOLCHAIN_PATH"
33084      for ac_prog in $SEARCH_LIST
33085do
33086  # Extract the first word of "$ac_prog", so it can be a program name with args.
33087set dummy $ac_prog; ac_word=$2
33088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33089$as_echo_n "checking for $ac_word... " >&6; }
33090if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33091  $as_echo_n "(cached) " >&6
33092else
33093  case $TOOLCHAIN_PATH_CC in
33094  [\\/]* | ?:[\\/]*)
33095  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33096  ;;
33097  *)
33098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33099for as_dir in $PATH
33100do
33101  IFS=$as_save_IFS
33102  test -z "$as_dir" && as_dir=.
33103    for ac_exec_ext in '' $ac_executable_extensions; do
33104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33105    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33107    break 2
33108  fi
33109done
33110  done
33111IFS=$as_save_IFS
33112
33113  ;;
33114esac
33115fi
33116TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33117if test -n "$TOOLCHAIN_PATH_CC"; then
33118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33119$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33120else
33121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33122$as_echo "no" >&6; }
33123fi
33124
33125
33126  test -n "$TOOLCHAIN_PATH_CC" && break
33127done
33128
33129      CC=$TOOLCHAIN_PATH_CC
33130      PATH="$PATH_save"
33131    fi
33132
33133    # AC_PATH_PROGS can't be run multiple times with the same variable,
33134    # so create a new name for this run.
33135    if test "x$CC" = x; then
33136      for ac_prog in $SEARCH_LIST
33137do
33138  # Extract the first word of "$ac_prog", so it can be a program name with args.
33139set dummy $ac_prog; ac_word=$2
33140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33141$as_echo_n "checking for $ac_word... " >&6; }
33142if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33143  $as_echo_n "(cached) " >&6
33144else
33145  case $POTENTIAL_CC in
33146  [\\/]* | ?:[\\/]*)
33147  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33148  ;;
33149  *)
33150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33151for as_dir in $PATH
33152do
33153  IFS=$as_save_IFS
33154  test -z "$as_dir" && as_dir=.
33155    for ac_exec_ext in '' $ac_executable_extensions; do
33156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33157    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33159    break 2
33160  fi
33161done
33162  done
33163IFS=$as_save_IFS
33164
33165  ;;
33166esac
33167fi
33168POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33169if test -n "$POTENTIAL_CC"; then
33170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33171$as_echo "$POTENTIAL_CC" >&6; }
33172else
33173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33174$as_echo "no" >&6; }
33175fi
33176
33177
33178  test -n "$POTENTIAL_CC" && break
33179done
33180
33181      CC=$POTENTIAL_CC
33182    fi
33183
33184    if test "x$CC" = x; then
33185
33186  # Print a helpful message on how to acquire the necessary build dependency.
33187  # devkit is the help tag: freetype, cups, alsa etc
33188  MISSING_DEPENDENCY=devkit
33189
33190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33191    cygwin_help $MISSING_DEPENDENCY
33192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33193    msys_help $MISSING_DEPENDENCY
33194  else
33195    PKGHANDLER_COMMAND=
33196
33197    case $PKGHANDLER in
33198      apt-get)
33199        apt_help     $MISSING_DEPENDENCY ;;
33200      yum)
33201        yum_help     $MISSING_DEPENDENCY ;;
33202      port)
33203        port_help    $MISSING_DEPENDENCY ;;
33204      pkgutil)
33205        pkgutil_help $MISSING_DEPENDENCY ;;
33206      pkgadd)
33207        pkgadd_help  $MISSING_DEPENDENCY ;;
33208    esac
33209
33210    if test "x$PKGHANDLER_COMMAND" != x; then
33211      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33212    fi
33213  fi
33214
33215      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33216    fi
33217  fi
33218
33219  # Now we have a compiler binary in CC. Make sure it's okay.
33220
33221  # Only process if variable expands to non-empty
33222
33223  if test "x$CC" != x; then
33224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33225
33226  # First separate the path from the arguments. This will split at the first
33227  # space.
33228  complete="$CC"
33229  path="${complete%% *}"
33230  tmp="$complete EOL"
33231  arguments="${tmp#* }"
33232
33233  # Input might be given as Windows format, start by converting to
33234  # unix format.
33235  new_path=`$CYGPATH -u "$path"`
33236
33237  # Now try to locate executable using which
33238  new_path=`$WHICH "$new_path" 2> /dev/null`
33239  # bat and cmd files are not always considered executable in cygwin causing which
33240  # to not find them
33241  if test "x$new_path" = x \
33242      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33243      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33244    new_path=`$CYGPATH -u "$path"`
33245  fi
33246  if test "x$new_path" = x; then
33247    # Oops. Which didn't find the executable.
33248    # The splitting of arguments from the executable at a space might have been incorrect,
33249    # since paths with space are more likely in Windows. Give it another try with the whole
33250    # argument.
33251    path="$complete"
33252    arguments="EOL"
33253    new_path=`$CYGPATH -u "$path"`
33254    new_path=`$WHICH "$new_path" 2> /dev/null`
33255    # bat and cmd files are not always considered executable in cygwin causing which
33256    # to not find them
33257    if test "x$new_path" = x \
33258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33260      new_path=`$CYGPATH -u "$path"`
33261    fi
33262    if test "x$new_path" = x; then
33263      # It's still not found. Now this is an unrecoverable error.
33264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33265$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33266      has_space=`$ECHO "$complete" | $GREP " "`
33267      if test "x$has_space" != x; then
33268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33270      fi
33271      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33272    fi
33273  fi
33274
33275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33278  # "foo.exe" is OK but "foo" is an error.
33279  #
33280  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33281  # It is also a way to make sure we got the proper file name for the real test later on.
33282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33283  if test "x$test_shortpath" = x; then
33284    # Short path failed, file does not exist as specified.
33285    # Try adding .exe or .cmd
33286    if test -f "${new_path}.exe"; then
33287      input_to_shortpath="${new_path}.exe"
33288    elif test -f "${new_path}.cmd"; then
33289      input_to_shortpath="${new_path}.cmd"
33290    else
33291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33292$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33293      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33294$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33295      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33296    fi
33297  else
33298    input_to_shortpath="$new_path"
33299  fi
33300
33301  # Call helper function which possibly converts this using DOS-style short mode.
33302  # If so, the updated path is stored in $new_path.
33303  new_path="$input_to_shortpath"
33304
33305  input_path="$input_to_shortpath"
33306  # Check if we need to convert this using DOS-style short mode. If the path
33307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33308  # take no chances and rewrite it.
33309  # Note: m4 eats our [], so we need to use [ and ] instead.
33310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33311  if test "x$has_forbidden_chars" != x; then
33312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33316      # Going to short mode and back again did indeed matter. Since short mode is
33317      # case insensitive, let's make it lowercase to improve readability.
33318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33319      # Now convert it back to Unix-style (cygpath)
33320      input_path=`$CYGPATH -u "$shortmode_path"`
33321      new_path="$input_path"
33322    fi
33323  fi
33324
33325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33326  if test "x$test_cygdrive_prefix" = x; then
33327    # As a simple fix, exclude /usr/bin since it's not a real path.
33328    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33330      # a path prefixed by /cygdrive for fixpath to work.
33331      new_path="$CYGWIN_ROOT_PATH$input_path"
33332    fi
33333  fi
33334
33335  # remove trailing .exe if any
33336  new_path="${new_path/%.exe/}"
33337
33338    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33339
33340  # First separate the path from the arguments. This will split at the first
33341  # space.
33342  complete="$CC"
33343  path="${complete%% *}"
33344  tmp="$complete EOL"
33345  arguments="${tmp#* }"
33346
33347  # Input might be given as Windows format, start by converting to
33348  # unix format.
33349  new_path="$path"
33350
33351  windows_path="$new_path"
33352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33353    unix_path=`$CYGPATH -u "$windows_path"`
33354    new_path="$unix_path"
33355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33357    new_path="$unix_path"
33358  fi
33359
33360
33361  # Now try to locate executable using which
33362  new_path=`$WHICH "$new_path" 2> /dev/null`
33363
33364  if test "x$new_path" = x; then
33365    # Oops. Which didn't find the executable.
33366    # The splitting of arguments from the executable at a space might have been incorrect,
33367    # since paths with space are more likely in Windows. Give it another try with the whole
33368    # argument.
33369    path="$complete"
33370    arguments="EOL"
33371    new_path="$path"
33372
33373  windows_path="$new_path"
33374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33375    unix_path=`$CYGPATH -u "$windows_path"`
33376    new_path="$unix_path"
33377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33379    new_path="$unix_path"
33380  fi
33381
33382
33383    new_path=`$WHICH "$new_path" 2> /dev/null`
33384    # bat and cmd files are not always considered executable in MSYS causing which
33385    # to not find them
33386    if test "x$new_path" = x \
33387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33389      new_path="$path"
33390
33391  windows_path="$new_path"
33392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33393    unix_path=`$CYGPATH -u "$windows_path"`
33394    new_path="$unix_path"
33395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33397    new_path="$unix_path"
33398  fi
33399
33400    fi
33401
33402    if test "x$new_path" = x; then
33403      # It's still not found. Now this is an unrecoverable error.
33404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33405$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33406      has_space=`$ECHO "$complete" | $GREP " "`
33407      if test "x$has_space" != x; then
33408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33410      fi
33411      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33412    fi
33413  fi
33414
33415  # Now new_path has a complete unix path to the binary
33416  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33417    # Keep paths in /bin as-is, but remove trailing .exe if any
33418    new_path="${new_path/%.exe/}"
33419    # Do not save /bin paths to all_fixpath_prefixes!
33420  else
33421    # Not in mixed or Windows style, start by that.
33422    new_path=`cmd //c echo $new_path`
33423
33424  input_path="$new_path"
33425  # Check if we need to convert this using DOS-style short mode. If the path
33426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33427  # take no chances and rewrite it.
33428  # Note: m4 eats our [], so we need to use [ and ] instead.
33429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33430  if test "x$has_forbidden_chars" != x; then
33431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33433  fi
33434
33435    # Output is in $new_path
33436
33437  windows_path="$new_path"
33438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33439    unix_path=`$CYGPATH -u "$windows_path"`
33440    new_path="$unix_path"
33441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33443    new_path="$unix_path"
33444  fi
33445
33446    # remove trailing .exe if any
33447    new_path="${new_path/%.exe/}"
33448
33449    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33450    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33451  fi
33452
33453    else
33454      # We're on a unix platform. Hooray! :)
33455      # First separate the path from the arguments. This will split at the first
33456      # space.
33457      complete="$CC"
33458      path="${complete%% *}"
33459      tmp="$complete EOL"
33460      arguments="${tmp#* }"
33461
33462      # Cannot rely on the command "which" here since it doesn't always work.
33463      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33464      if test -z "$is_absolute_path"; then
33465        # Path to executable is not absolute. Find it.
33466        IFS_save="$IFS"
33467        IFS=:
33468        for p in $PATH; do
33469          if test -f "$p/$path" && test -x "$p/$path"; then
33470            new_path="$p/$path"
33471            break
33472          fi
33473        done
33474        IFS="$IFS_save"
33475      else
33476        # This is an absolute path, we can use it without further modifications.
33477        new_path="$path"
33478      fi
33479
33480      if test "x$new_path" = x; then
33481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33482$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33483        has_space=`$ECHO "$complete" | $GREP " "`
33484        if test "x$has_space" != x; then
33485          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33486$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33487        fi
33488        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33489      fi
33490    fi
33491
33492    # Now join together the path and the arguments once again
33493    if test "x$arguments" != xEOL; then
33494      new_complete="$new_path ${arguments% *}"
33495    else
33496      new_complete="$new_path"
33497    fi
33498
33499    if test "x$complete" != "x$new_complete"; then
33500      CC="$new_complete"
33501      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33502$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33503    fi
33504  fi
33505
33506  TEST_COMPILER="$CC"
33507
33508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33509$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33510  SYMLINK_ORIGINAL="$TEST_COMPILER"
33511
33512  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33513    # Follow a chain of symbolic links. Use readlink
33514    # where it exists, else fall back to horribly
33515    # complicated shell code.
33516    if test "x$READLINK_TESTED" != yes; then
33517      # On MacOSX there is a readlink tool with a different
33518      # purpose than the GNU readlink tool. Check the found readlink.
33519      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33520      if test "x$ISGNU" = x; then
33521        # A readlink that we do not know how to use.
33522        # Are there other non-GNU readlinks out there?
33523        READLINK_TESTED=yes
33524        READLINK=
33525      fi
33526    fi
33527
33528    if test "x$READLINK" != x; then
33529      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33530    else
33531      # Save the current directory for restoring afterwards
33532      STARTDIR=$PWD
33533      COUNTER=0
33534      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33535      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33536      cd $sym_link_dir
33537      # Use -P flag to resolve symlinks in directories.
33538      cd `$THEPWDCMD -P`
33539      sym_link_dir=`$THEPWDCMD -P`
33540      # Resolve file symlinks
33541      while test $COUNTER -lt 20; do
33542        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33543        if test "x$ISLINK" == x; then
33544          # This is not a symbolic link! We are done!
33545          break
33546        fi
33547        # Again resolve directory symlinks since the target of the just found
33548        # link could be in a different directory
33549        cd `$DIRNAME $ISLINK`
33550        sym_link_dir=`$THEPWDCMD -P`
33551        sym_link_file=`$BASENAME $ISLINK`
33552        let COUNTER=COUNTER+1
33553      done
33554      cd $STARTDIR
33555      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33556    fi
33557  fi
33558
33559  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33561$as_echo "no symlink" >&6; }
33562  else
33563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33564$as_echo "$SYMLINK_ORIGINAL" >&6; }
33565
33566    # We can't handle ccache by gcc wrappers, since we need to know if we're
33567    # using ccache. Instead ccache usage must be controlled by a configure option.
33568    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33569    if test "x$COMPILER_BASENAME" = "xccache"; then
33570      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33571$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33572      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33573    fi
33574  fi
33575
33576
33577  COMPILER=$CC
33578  COMPILER_NAME=$COMPILER_NAME
33579
33580  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33581    # cc -V output typically looks like
33582    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33583    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33584    # Check that this is likely to be the Solaris Studio cc.
33585    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33586    if test $? -ne 0; then
33587      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33588      { $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
33589$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33590      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33591$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33592      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33593$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33594      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33595    fi
33596    # Remove usage instructions (if present), and
33597    # collapse compiler output into a single line
33598    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33599        $SED -e 's/ *[Uu]sage:.*//'`
33600    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33601        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33602  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33603    # xlc -qversion output typically looks like
33604    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33605    #     Version: 11.01.0000.0015
33606    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33607    # Check that this is likely to be the IBM XL C compiler.
33608    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33609    if test $? -ne 0; then
33610      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33611      { $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
33612$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33613      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33614$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33615      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33616$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33617      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33618    fi
33619    # Collapse compiler output into a single line
33620    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33621    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33622        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33623  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33624    # There is no specific version flag, but all output starts with a version string.
33625    # First line typically looks something like:
33626    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33627    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33628    # Check that this is likely to be Microsoft CL.EXE.
33629    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33630    if test $? -ne 0; then
33631      { $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
33632$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33633      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33634$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33635      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33636    fi
33637    # Collapse compiler output into a single line
33638    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33639    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33640        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33641  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33642    # gcc --version output typically looks like
33643    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33644    #     Copyright (C) 2013 Free Software Foundation, Inc.
33645    #     This is free software; see the source for copying conditions.  There is NO
33646    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33647    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33648    # Check that this is likely to be GCC.
33649    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33650    if test $? -ne 0; then
33651      { $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
33652$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33653      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33654$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33655      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33656    fi
33657    # Remove Copyright and legalese from version string, and
33658    # collapse into a single line
33659    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33660        $SED -e 's/ *Copyright .*//'`
33661    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33662        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33663  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33664    # clang --version output typically looks like
33665    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33666    #    clang version 3.3 (tags/RELEASE_33/final)
33667    # or
33668    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33669    #    Target: x86_64-pc-linux-gnu
33670    #    Thread model: posix
33671    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33672    # Check that this is likely to be clang
33673    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33674    if test $? -ne 0; then
33675      { $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
33676$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33677      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33678$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33679      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33680    fi
33681    # Collapse compiler output into a single line
33682    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33683    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33684        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33685  else
33686      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33687  fi
33688  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33689  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33690  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33691  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33692
33693  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33694$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33695
33696
33697  # Now that we have resolved CC ourself, let autoconf have its go at it
33698  ac_ext=c
33699ac_cpp='$CPP $CPPFLAGS'
33700ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33701ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33702ac_compiler_gnu=$ac_cv_c_compiler_gnu
33703if test -n "$ac_tool_prefix"; then
33704  for ac_prog in $CC
33705  do
33706    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33707set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33709$as_echo_n "checking for $ac_word... " >&6; }
33710if ${ac_cv_prog_CC+:} false; then :
33711  $as_echo_n "(cached) " >&6
33712else
33713  if test -n "$CC"; then
33714  ac_cv_prog_CC="$CC" # Let the user override the test.
33715else
33716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33717for as_dir in $PATH
33718do
33719  IFS=$as_save_IFS
33720  test -z "$as_dir" && as_dir=.
33721    for ac_exec_ext in '' $ac_executable_extensions; do
33722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33723    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33725    break 2
33726  fi
33727done
33728  done
33729IFS=$as_save_IFS
33730
33731fi
33732fi
33733CC=$ac_cv_prog_CC
33734if test -n "$CC"; then
33735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33736$as_echo "$CC" >&6; }
33737else
33738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33739$as_echo "no" >&6; }
33740fi
33741
33742
33743    test -n "$CC" && break
33744  done
33745fi
33746if test -z "$CC"; then
33747  ac_ct_CC=$CC
33748  for ac_prog in $CC
33749do
33750  # Extract the first word of "$ac_prog", so it can be a program name with args.
33751set dummy $ac_prog; ac_word=$2
33752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33753$as_echo_n "checking for $ac_word... " >&6; }
33754if ${ac_cv_prog_ac_ct_CC+:} false; then :
33755  $as_echo_n "(cached) " >&6
33756else
33757  if test -n "$ac_ct_CC"; then
33758  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33759else
33760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33761for as_dir in $PATH
33762do
33763  IFS=$as_save_IFS
33764  test -z "$as_dir" && as_dir=.
33765    for ac_exec_ext in '' $ac_executable_extensions; do
33766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33767    ac_cv_prog_ac_ct_CC="$ac_prog"
33768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33769    break 2
33770  fi
33771done
33772  done
33773IFS=$as_save_IFS
33774
33775fi
33776fi
33777ac_ct_CC=$ac_cv_prog_ac_ct_CC
33778if test -n "$ac_ct_CC"; then
33779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33780$as_echo "$ac_ct_CC" >&6; }
33781else
33782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33783$as_echo "no" >&6; }
33784fi
33785
33786
33787  test -n "$ac_ct_CC" && break
33788done
33789
33790  if test "x$ac_ct_CC" = x; then
33791    CC=""
33792  else
33793    case $cross_compiling:$ac_tool_warned in
33794yes:)
33795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33797ac_tool_warned=yes ;;
33798esac
33799    CC=$ac_ct_CC
33800  fi
33801fi
33802
33803
33804test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33806as_fn_error $? "no acceptable C compiler found in \$PATH
33807See \`config.log' for more details" "$LINENO" 5; }
33808
33809# Provide some information about the compiler.
33810$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33811set X $ac_compile
33812ac_compiler=$2
33813for ac_option in --version -v -V -qversion; do
33814  { { ac_try="$ac_compiler $ac_option >&5"
33815case "(($ac_try" in
33816  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33817  *) ac_try_echo=$ac_try;;
33818esac
33819eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33820$as_echo "$ac_try_echo"; } >&5
33821  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33822  ac_status=$?
33823  if test -s conftest.err; then
33824    sed '10a\
33825... rest of stderr output deleted ...
33826         10q' conftest.err >conftest.er1
33827    cat conftest.er1 >&5
33828  fi
33829  rm -f conftest.er1 conftest.err
33830  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33831  test $ac_status = 0; }
33832done
33833
33834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33835/* end confdefs.h.  */
33836
33837int
33838main ()
33839{
33840
33841  ;
33842  return 0;
33843}
33844_ACEOF
33845ac_clean_files_save=$ac_clean_files
33846ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33847# Try to create an executable without -o first, disregard a.out.
33848# It will help us diagnose broken compilers, and finding out an intuition
33849# of exeext.
33850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33851$as_echo_n "checking whether the C compiler works... " >&6; }
33852ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33853
33854# The possible output files:
33855ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33856
33857ac_rmfiles=
33858for ac_file in $ac_files
33859do
33860  case $ac_file in
33861    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33862    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33863  esac
33864done
33865rm -f $ac_rmfiles
33866
33867if { { ac_try="$ac_link_default"
33868case "(($ac_try" in
33869  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33870  *) ac_try_echo=$ac_try;;
33871esac
33872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33873$as_echo "$ac_try_echo"; } >&5
33874  (eval "$ac_link_default") 2>&5
33875  ac_status=$?
33876  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33877  test $ac_status = 0; }; then :
33878  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33879# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33880# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33881# so that the user can short-circuit this test for compilers unknown to
33882# Autoconf.
33883for ac_file in $ac_files ''
33884do
33885  test -f "$ac_file" || continue
33886  case $ac_file in
33887    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33888	;;
33889    [ab].out )
33890	# We found the default executable, but exeext='' is most
33891	# certainly right.
33892	break;;
33893    *.* )
33894	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33895	then :; else
33896	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33897	fi
33898	# We set ac_cv_exeext here because the later test for it is not
33899	# safe: cross compilers may not add the suffix if given an `-o'
33900	# argument, so we may need to know it at that point already.
33901	# Even if this section looks crufty: it has the advantage of
33902	# actually working.
33903	break;;
33904    * )
33905	break;;
33906  esac
33907done
33908test "$ac_cv_exeext" = no && ac_cv_exeext=
33909
33910else
33911  ac_file=''
33912fi
33913if test -z "$ac_file"; then :
33914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33915$as_echo "no" >&6; }
33916$as_echo "$as_me: failed program was:" >&5
33917sed 's/^/| /' conftest.$ac_ext >&5
33918
33919{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33921as_fn_error 77 "C compiler cannot create executables
33922See \`config.log' for more details" "$LINENO" 5; }
33923else
33924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33925$as_echo "yes" >&6; }
33926fi
33927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33928$as_echo_n "checking for C compiler default output file name... " >&6; }
33929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33930$as_echo "$ac_file" >&6; }
33931ac_exeext=$ac_cv_exeext
33932
33933rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33934ac_clean_files=$ac_clean_files_save
33935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33936$as_echo_n "checking for suffix of executables... " >&6; }
33937if { { ac_try="$ac_link"
33938case "(($ac_try" in
33939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33940  *) ac_try_echo=$ac_try;;
33941esac
33942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33943$as_echo "$ac_try_echo"; } >&5
33944  (eval "$ac_link") 2>&5
33945  ac_status=$?
33946  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33947  test $ac_status = 0; }; then :
33948  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33949# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33950# work properly (i.e., refer to `conftest.exe'), while it won't with
33951# `rm'.
33952for ac_file in conftest.exe conftest conftest.*; do
33953  test -f "$ac_file" || continue
33954  case $ac_file in
33955    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33956    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33957	  break;;
33958    * ) break;;
33959  esac
33960done
33961else
33962  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33964as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33965See \`config.log' for more details" "$LINENO" 5; }
33966fi
33967rm -f conftest conftest$ac_cv_exeext
33968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33969$as_echo "$ac_cv_exeext" >&6; }
33970
33971rm -f conftest.$ac_ext
33972EXEEXT=$ac_cv_exeext
33973ac_exeext=$EXEEXT
33974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33975/* end confdefs.h.  */
33976#include <stdio.h>
33977int
33978main ()
33979{
33980FILE *f = fopen ("conftest.out", "w");
33981 return ferror (f) || fclose (f) != 0;
33982
33983  ;
33984  return 0;
33985}
33986_ACEOF
33987ac_clean_files="$ac_clean_files conftest.out"
33988# Check that the compiler produces executables we can run.  If not, either
33989# the compiler is broken, or we cross compile.
33990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33991$as_echo_n "checking whether we are cross compiling... " >&6; }
33992if test "$cross_compiling" != yes; then
33993  { { ac_try="$ac_link"
33994case "(($ac_try" in
33995  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33996  *) ac_try_echo=$ac_try;;
33997esac
33998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33999$as_echo "$ac_try_echo"; } >&5
34000  (eval "$ac_link") 2>&5
34001  ac_status=$?
34002  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34003  test $ac_status = 0; }
34004  if { ac_try='./conftest$ac_cv_exeext'
34005  { { case "(($ac_try" in
34006  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34007  *) ac_try_echo=$ac_try;;
34008esac
34009eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34010$as_echo "$ac_try_echo"; } >&5
34011  (eval "$ac_try") 2>&5
34012  ac_status=$?
34013  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34014  test $ac_status = 0; }; }; then
34015    cross_compiling=no
34016  else
34017    if test "$cross_compiling" = maybe; then
34018	cross_compiling=yes
34019    else
34020	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34022as_fn_error $? "cannot run C compiled programs.
34023If you meant to cross compile, use \`--host'.
34024See \`config.log' for more details" "$LINENO" 5; }
34025    fi
34026  fi
34027fi
34028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34029$as_echo "$cross_compiling" >&6; }
34030
34031rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34032ac_clean_files=$ac_clean_files_save
34033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34034$as_echo_n "checking for suffix of object files... " >&6; }
34035if ${ac_cv_objext+:} false; then :
34036  $as_echo_n "(cached) " >&6
34037else
34038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34039/* end confdefs.h.  */
34040
34041int
34042main ()
34043{
34044
34045  ;
34046  return 0;
34047}
34048_ACEOF
34049rm -f conftest.o conftest.obj
34050if { { ac_try="$ac_compile"
34051case "(($ac_try" in
34052  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34053  *) ac_try_echo=$ac_try;;
34054esac
34055eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34056$as_echo "$ac_try_echo"; } >&5
34057  (eval "$ac_compile") 2>&5
34058  ac_status=$?
34059  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34060  test $ac_status = 0; }; then :
34061  for ac_file in conftest.o conftest.obj conftest.*; do
34062  test -f "$ac_file" || continue;
34063  case $ac_file in
34064    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34065    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34066       break;;
34067  esac
34068done
34069else
34070  $as_echo "$as_me: failed program was:" >&5
34071sed 's/^/| /' conftest.$ac_ext >&5
34072
34073{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34075as_fn_error $? "cannot compute suffix of object files: cannot compile
34076See \`config.log' for more details" "$LINENO" 5; }
34077fi
34078rm -f conftest.$ac_cv_objext conftest.$ac_ext
34079fi
34080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34081$as_echo "$ac_cv_objext" >&6; }
34082OBJEXT=$ac_cv_objext
34083ac_objext=$OBJEXT
34084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34085$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34086if ${ac_cv_c_compiler_gnu+:} false; then :
34087  $as_echo_n "(cached) " >&6
34088else
34089  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34090/* end confdefs.h.  */
34091
34092int
34093main ()
34094{
34095#ifndef __GNUC__
34096       choke me
34097#endif
34098
34099  ;
34100  return 0;
34101}
34102_ACEOF
34103if ac_fn_c_try_compile "$LINENO"; then :
34104  ac_compiler_gnu=yes
34105else
34106  ac_compiler_gnu=no
34107fi
34108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34109ac_cv_c_compiler_gnu=$ac_compiler_gnu
34110
34111fi
34112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34113$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34114if test $ac_compiler_gnu = yes; then
34115  GCC=yes
34116else
34117  GCC=
34118fi
34119ac_test_CFLAGS=${CFLAGS+set}
34120ac_save_CFLAGS=$CFLAGS
34121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34122$as_echo_n "checking whether $CC accepts -g... " >&6; }
34123if ${ac_cv_prog_cc_g+:} false; then :
34124  $as_echo_n "(cached) " >&6
34125else
34126  ac_save_c_werror_flag=$ac_c_werror_flag
34127   ac_c_werror_flag=yes
34128   ac_cv_prog_cc_g=no
34129   CFLAGS="-g"
34130   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34131/* end confdefs.h.  */
34132
34133int
34134main ()
34135{
34136
34137  ;
34138  return 0;
34139}
34140_ACEOF
34141if ac_fn_c_try_compile "$LINENO"; then :
34142  ac_cv_prog_cc_g=yes
34143else
34144  CFLAGS=""
34145      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34146/* end confdefs.h.  */
34147
34148int
34149main ()
34150{
34151
34152  ;
34153  return 0;
34154}
34155_ACEOF
34156if ac_fn_c_try_compile "$LINENO"; then :
34157
34158else
34159  ac_c_werror_flag=$ac_save_c_werror_flag
34160	 CFLAGS="-g"
34161	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34162/* end confdefs.h.  */
34163
34164int
34165main ()
34166{
34167
34168  ;
34169  return 0;
34170}
34171_ACEOF
34172if ac_fn_c_try_compile "$LINENO"; then :
34173  ac_cv_prog_cc_g=yes
34174fi
34175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34176fi
34177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34178fi
34179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34180   ac_c_werror_flag=$ac_save_c_werror_flag
34181fi
34182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34183$as_echo "$ac_cv_prog_cc_g" >&6; }
34184if test "$ac_test_CFLAGS" = set; then
34185  CFLAGS=$ac_save_CFLAGS
34186elif test $ac_cv_prog_cc_g = yes; then
34187  if test "$GCC" = yes; then
34188    CFLAGS="-g -O2"
34189  else
34190    CFLAGS="-g"
34191  fi
34192else
34193  if test "$GCC" = yes; then
34194    CFLAGS="-O2"
34195  else
34196    CFLAGS=
34197  fi
34198fi
34199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34200$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34201if ${ac_cv_prog_cc_c89+:} false; then :
34202  $as_echo_n "(cached) " >&6
34203else
34204  ac_cv_prog_cc_c89=no
34205ac_save_CC=$CC
34206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34207/* end confdefs.h.  */
34208#include <stdarg.h>
34209#include <stdio.h>
34210struct stat;
34211/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34212struct buf { int x; };
34213FILE * (*rcsopen) (struct buf *, struct stat *, int);
34214static char *e (p, i)
34215     char **p;
34216     int i;
34217{
34218  return p[i];
34219}
34220static char *f (char * (*g) (char **, int), char **p, ...)
34221{
34222  char *s;
34223  va_list v;
34224  va_start (v,p);
34225  s = g (p, va_arg (v,int));
34226  va_end (v);
34227  return s;
34228}
34229
34230/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34231   function prototypes and stuff, but not '\xHH' hex character constants.
34232   These don't provoke an error unfortunately, instead are silently treated
34233   as 'x'.  The following induces an error, until -std is added to get
34234   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34235   array size at least.  It's necessary to write '\x00'==0 to get something
34236   that's true only with -std.  */
34237int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34238
34239/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34240   inside strings and character constants.  */
34241#define FOO(x) 'x'
34242int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34243
34244int test (int i, double x);
34245struct s1 {int (*f) (int a);};
34246struct s2 {int (*f) (double a);};
34247int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34248int argc;
34249char **argv;
34250int
34251main ()
34252{
34253return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34254  ;
34255  return 0;
34256}
34257_ACEOF
34258for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34259	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34260do
34261  CC="$ac_save_CC $ac_arg"
34262  if ac_fn_c_try_compile "$LINENO"; then :
34263  ac_cv_prog_cc_c89=$ac_arg
34264fi
34265rm -f core conftest.err conftest.$ac_objext
34266  test "x$ac_cv_prog_cc_c89" != "xno" && break
34267done
34268rm -f conftest.$ac_ext
34269CC=$ac_save_CC
34270
34271fi
34272# AC_CACHE_VAL
34273case "x$ac_cv_prog_cc_c89" in
34274  x)
34275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34276$as_echo "none needed" >&6; } ;;
34277  xno)
34278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34279$as_echo "unsupported" >&6; } ;;
34280  *)
34281    CC="$CC $ac_cv_prog_cc_c89"
34282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34283$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34284esac
34285if test "x$ac_cv_prog_cc_c89" != xno; then :
34286
34287fi
34288
34289ac_ext=cpp
34290ac_cpp='$CXXCPP $CPPFLAGS'
34291ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34292ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34293ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34294
34295
34296
34297  COMPILER_NAME=C++
34298  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34299
34300  if test "x$CXX" != x; then
34301    # User has supplied compiler name already, always let that override.
34302    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34303$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34304    if test "x`basename $CXX`" = "x$CXX"; then
34305      # A command without a complete path is provided, search $PATH.
34306
34307      for ac_prog in $CXX
34308do
34309  # Extract the first word of "$ac_prog", so it can be a program name with args.
34310set dummy $ac_prog; ac_word=$2
34311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34312$as_echo_n "checking for $ac_word... " >&6; }
34313if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34314  $as_echo_n "(cached) " >&6
34315else
34316  case $POTENTIAL_CXX in
34317  [\\/]* | ?:[\\/]*)
34318  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34319  ;;
34320  *)
34321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34322for as_dir in $PATH
34323do
34324  IFS=$as_save_IFS
34325  test -z "$as_dir" && as_dir=.
34326    for ac_exec_ext in '' $ac_executable_extensions; do
34327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34328    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34330    break 2
34331  fi
34332done
34333  done
34334IFS=$as_save_IFS
34335
34336  ;;
34337esac
34338fi
34339POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34340if test -n "$POTENTIAL_CXX"; then
34341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34342$as_echo "$POTENTIAL_CXX" >&6; }
34343else
34344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34345$as_echo "no" >&6; }
34346fi
34347
34348
34349  test -n "$POTENTIAL_CXX" && break
34350done
34351
34352      if test "x$POTENTIAL_CXX" != x; then
34353        CXX=$POTENTIAL_CXX
34354      else
34355        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34356      fi
34357    else
34358      # Otherwise it might already be a complete path
34359      if test ! -x "$CXX"; then
34360        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34361      fi
34362    fi
34363  else
34364    # No user supplied value. Locate compiler ourselves.
34365
34366    # If we are cross compiling, assume cross compilation tools follows the
34367    # cross compilation standard where they are prefixed with the autoconf
34368    # standard name for the target. For example the binary
34369    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34370    # If we are not cross compiling, then the default compiler name will be
34371    # used.
34372
34373    CXX=
34374    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34375    # before checking the rest of the PATH.
34376    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34377    # step, this should not be necessary.
34378    if test -n "$TOOLCHAIN_PATH"; then
34379      PATH_save="$PATH"
34380      PATH="$TOOLCHAIN_PATH"
34381      for ac_prog in $SEARCH_LIST
34382do
34383  # Extract the first word of "$ac_prog", so it can be a program name with args.
34384set dummy $ac_prog; ac_word=$2
34385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34386$as_echo_n "checking for $ac_word... " >&6; }
34387if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34388  $as_echo_n "(cached) " >&6
34389else
34390  case $TOOLCHAIN_PATH_CXX in
34391  [\\/]* | ?:[\\/]*)
34392  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34393  ;;
34394  *)
34395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34396for as_dir in $PATH
34397do
34398  IFS=$as_save_IFS
34399  test -z "$as_dir" && as_dir=.
34400    for ac_exec_ext in '' $ac_executable_extensions; do
34401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34402    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34404    break 2
34405  fi
34406done
34407  done
34408IFS=$as_save_IFS
34409
34410  ;;
34411esac
34412fi
34413TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34414if test -n "$TOOLCHAIN_PATH_CXX"; then
34415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34416$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34417else
34418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34419$as_echo "no" >&6; }
34420fi
34421
34422
34423  test -n "$TOOLCHAIN_PATH_CXX" && break
34424done
34425
34426      CXX=$TOOLCHAIN_PATH_CXX
34427      PATH="$PATH_save"
34428    fi
34429
34430    # AC_PATH_PROGS can't be run multiple times with the same variable,
34431    # so create a new name for this run.
34432    if test "x$CXX" = x; then
34433      for ac_prog in $SEARCH_LIST
34434do
34435  # Extract the first word of "$ac_prog", so it can be a program name with args.
34436set dummy $ac_prog; ac_word=$2
34437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34438$as_echo_n "checking for $ac_word... " >&6; }
34439if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34440  $as_echo_n "(cached) " >&6
34441else
34442  case $POTENTIAL_CXX in
34443  [\\/]* | ?:[\\/]*)
34444  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34445  ;;
34446  *)
34447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34448for as_dir in $PATH
34449do
34450  IFS=$as_save_IFS
34451  test -z "$as_dir" && as_dir=.
34452    for ac_exec_ext in '' $ac_executable_extensions; do
34453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34454    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34456    break 2
34457  fi
34458done
34459  done
34460IFS=$as_save_IFS
34461
34462  ;;
34463esac
34464fi
34465POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34466if test -n "$POTENTIAL_CXX"; then
34467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34468$as_echo "$POTENTIAL_CXX" >&6; }
34469else
34470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34471$as_echo "no" >&6; }
34472fi
34473
34474
34475  test -n "$POTENTIAL_CXX" && break
34476done
34477
34478      CXX=$POTENTIAL_CXX
34479    fi
34480
34481    if test "x$CXX" = x; then
34482
34483  # Print a helpful message on how to acquire the necessary build dependency.
34484  # devkit is the help tag: freetype, cups, alsa etc
34485  MISSING_DEPENDENCY=devkit
34486
34487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34488    cygwin_help $MISSING_DEPENDENCY
34489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34490    msys_help $MISSING_DEPENDENCY
34491  else
34492    PKGHANDLER_COMMAND=
34493
34494    case $PKGHANDLER in
34495      apt-get)
34496        apt_help     $MISSING_DEPENDENCY ;;
34497      yum)
34498        yum_help     $MISSING_DEPENDENCY ;;
34499      port)
34500        port_help    $MISSING_DEPENDENCY ;;
34501      pkgutil)
34502        pkgutil_help $MISSING_DEPENDENCY ;;
34503      pkgadd)
34504        pkgadd_help  $MISSING_DEPENDENCY ;;
34505    esac
34506
34507    if test "x$PKGHANDLER_COMMAND" != x; then
34508      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34509    fi
34510  fi
34511
34512      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34513    fi
34514  fi
34515
34516  # Now we have a compiler binary in CXX. Make sure it's okay.
34517
34518  # Only process if variable expands to non-empty
34519
34520  if test "x$CXX" != x; then
34521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34522
34523  # First separate the path from the arguments. This will split at the first
34524  # space.
34525  complete="$CXX"
34526  path="${complete%% *}"
34527  tmp="$complete EOL"
34528  arguments="${tmp#* }"
34529
34530  # Input might be given as Windows format, start by converting to
34531  # unix format.
34532  new_path=`$CYGPATH -u "$path"`
34533
34534  # Now try to locate executable using which
34535  new_path=`$WHICH "$new_path" 2> /dev/null`
34536  # bat and cmd files are not always considered executable in cygwin causing which
34537  # to not find them
34538  if test "x$new_path" = x \
34539      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34540      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34541    new_path=`$CYGPATH -u "$path"`
34542  fi
34543  if test "x$new_path" = x; then
34544    # Oops. Which didn't find the executable.
34545    # The splitting of arguments from the executable at a space might have been incorrect,
34546    # since paths with space are more likely in Windows. Give it another try with the whole
34547    # argument.
34548    path="$complete"
34549    arguments="EOL"
34550    new_path=`$CYGPATH -u "$path"`
34551    new_path=`$WHICH "$new_path" 2> /dev/null`
34552    # bat and cmd files are not always considered executable in cygwin causing which
34553    # to not find them
34554    if test "x$new_path" = x \
34555        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34556        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34557      new_path=`$CYGPATH -u "$path"`
34558    fi
34559    if test "x$new_path" = x; then
34560      # It's still not found. Now this is an unrecoverable error.
34561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34562$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34563      has_space=`$ECHO "$complete" | $GREP " "`
34564      if test "x$has_space" != x; then
34565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34567      fi
34568      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34569    fi
34570  fi
34571
34572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34575  # "foo.exe" is OK but "foo" is an error.
34576  #
34577  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34578  # It is also a way to make sure we got the proper file name for the real test later on.
34579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34580  if test "x$test_shortpath" = x; then
34581    # Short path failed, file does not exist as specified.
34582    # Try adding .exe or .cmd
34583    if test -f "${new_path}.exe"; then
34584      input_to_shortpath="${new_path}.exe"
34585    elif test -f "${new_path}.cmd"; then
34586      input_to_shortpath="${new_path}.cmd"
34587    else
34588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34589$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34590      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34591$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34592      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34593    fi
34594  else
34595    input_to_shortpath="$new_path"
34596  fi
34597
34598  # Call helper function which possibly converts this using DOS-style short mode.
34599  # If so, the updated path is stored in $new_path.
34600  new_path="$input_to_shortpath"
34601
34602  input_path="$input_to_shortpath"
34603  # Check if we need to convert this using DOS-style short mode. If the path
34604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34605  # take no chances and rewrite it.
34606  # Note: m4 eats our [], so we need to use [ and ] instead.
34607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34608  if test "x$has_forbidden_chars" != x; then
34609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34613      # Going to short mode and back again did indeed matter. Since short mode is
34614      # case insensitive, let's make it lowercase to improve readability.
34615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34616      # Now convert it back to Unix-style (cygpath)
34617      input_path=`$CYGPATH -u "$shortmode_path"`
34618      new_path="$input_path"
34619    fi
34620  fi
34621
34622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34623  if test "x$test_cygdrive_prefix" = x; then
34624    # As a simple fix, exclude /usr/bin since it's not a real path.
34625    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34627      # a path prefixed by /cygdrive for fixpath to work.
34628      new_path="$CYGWIN_ROOT_PATH$input_path"
34629    fi
34630  fi
34631
34632  # remove trailing .exe if any
34633  new_path="${new_path/%.exe/}"
34634
34635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34636
34637  # First separate the path from the arguments. This will split at the first
34638  # space.
34639  complete="$CXX"
34640  path="${complete%% *}"
34641  tmp="$complete EOL"
34642  arguments="${tmp#* }"
34643
34644  # Input might be given as Windows format, start by converting to
34645  # unix format.
34646  new_path="$path"
34647
34648  windows_path="$new_path"
34649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34650    unix_path=`$CYGPATH -u "$windows_path"`
34651    new_path="$unix_path"
34652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34654    new_path="$unix_path"
34655  fi
34656
34657
34658  # Now try to locate executable using which
34659  new_path=`$WHICH "$new_path" 2> /dev/null`
34660
34661  if test "x$new_path" = x; then
34662    # Oops. Which didn't find the executable.
34663    # The splitting of arguments from the executable at a space might have been incorrect,
34664    # since paths with space are more likely in Windows. Give it another try with the whole
34665    # argument.
34666    path="$complete"
34667    arguments="EOL"
34668    new_path="$path"
34669
34670  windows_path="$new_path"
34671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34672    unix_path=`$CYGPATH -u "$windows_path"`
34673    new_path="$unix_path"
34674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34676    new_path="$unix_path"
34677  fi
34678
34679
34680    new_path=`$WHICH "$new_path" 2> /dev/null`
34681    # bat and cmd files are not always considered executable in MSYS causing which
34682    # to not find them
34683    if test "x$new_path" = x \
34684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34686      new_path="$path"
34687
34688  windows_path="$new_path"
34689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34690    unix_path=`$CYGPATH -u "$windows_path"`
34691    new_path="$unix_path"
34692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34694    new_path="$unix_path"
34695  fi
34696
34697    fi
34698
34699    if test "x$new_path" = x; then
34700      # It's still not found. Now this is an unrecoverable error.
34701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34702$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34703      has_space=`$ECHO "$complete" | $GREP " "`
34704      if test "x$has_space" != x; then
34705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34707      fi
34708      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34709    fi
34710  fi
34711
34712  # Now new_path has a complete unix path to the binary
34713  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34714    # Keep paths in /bin as-is, but remove trailing .exe if any
34715    new_path="${new_path/%.exe/}"
34716    # Do not save /bin paths to all_fixpath_prefixes!
34717  else
34718    # Not in mixed or Windows style, start by that.
34719    new_path=`cmd //c echo $new_path`
34720
34721  input_path="$new_path"
34722  # Check if we need to convert this using DOS-style short mode. If the path
34723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34724  # take no chances and rewrite it.
34725  # Note: m4 eats our [], so we need to use [ and ] instead.
34726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34727  if test "x$has_forbidden_chars" != x; then
34728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34730  fi
34731
34732    # Output is in $new_path
34733
34734  windows_path="$new_path"
34735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34736    unix_path=`$CYGPATH -u "$windows_path"`
34737    new_path="$unix_path"
34738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34740    new_path="$unix_path"
34741  fi
34742
34743    # remove trailing .exe if any
34744    new_path="${new_path/%.exe/}"
34745
34746    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34747    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34748  fi
34749
34750    else
34751      # We're on a unix platform. Hooray! :)
34752      # First separate the path from the arguments. This will split at the first
34753      # space.
34754      complete="$CXX"
34755      path="${complete%% *}"
34756      tmp="$complete EOL"
34757      arguments="${tmp#* }"
34758
34759      # Cannot rely on the command "which" here since it doesn't always work.
34760      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34761      if test -z "$is_absolute_path"; then
34762        # Path to executable is not absolute. Find it.
34763        IFS_save="$IFS"
34764        IFS=:
34765        for p in $PATH; do
34766          if test -f "$p/$path" && test -x "$p/$path"; then
34767            new_path="$p/$path"
34768            break
34769          fi
34770        done
34771        IFS="$IFS_save"
34772      else
34773        # This is an absolute path, we can use it without further modifications.
34774        new_path="$path"
34775      fi
34776
34777      if test "x$new_path" = x; then
34778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34779$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34780        has_space=`$ECHO "$complete" | $GREP " "`
34781        if test "x$has_space" != x; then
34782          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34783$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34784        fi
34785        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34786      fi
34787    fi
34788
34789    # Now join together the path and the arguments once again
34790    if test "x$arguments" != xEOL; then
34791      new_complete="$new_path ${arguments% *}"
34792    else
34793      new_complete="$new_path"
34794    fi
34795
34796    if test "x$complete" != "x$new_complete"; then
34797      CXX="$new_complete"
34798      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34799$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34800    fi
34801  fi
34802
34803  TEST_COMPILER="$CXX"
34804
34805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34806$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34807  SYMLINK_ORIGINAL="$TEST_COMPILER"
34808
34809  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34810    # Follow a chain of symbolic links. Use readlink
34811    # where it exists, else fall back to horribly
34812    # complicated shell code.
34813    if test "x$READLINK_TESTED" != yes; then
34814      # On MacOSX there is a readlink tool with a different
34815      # purpose than the GNU readlink tool. Check the found readlink.
34816      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34817      if test "x$ISGNU" = x; then
34818        # A readlink that we do not know how to use.
34819        # Are there other non-GNU readlinks out there?
34820        READLINK_TESTED=yes
34821        READLINK=
34822      fi
34823    fi
34824
34825    if test "x$READLINK" != x; then
34826      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34827    else
34828      # Save the current directory for restoring afterwards
34829      STARTDIR=$PWD
34830      COUNTER=0
34831      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34832      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34833      cd $sym_link_dir
34834      # Use -P flag to resolve symlinks in directories.
34835      cd `$THEPWDCMD -P`
34836      sym_link_dir=`$THEPWDCMD -P`
34837      # Resolve file symlinks
34838      while test $COUNTER -lt 20; do
34839        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34840        if test "x$ISLINK" == x; then
34841          # This is not a symbolic link! We are done!
34842          break
34843        fi
34844        # Again resolve directory symlinks since the target of the just found
34845        # link could be in a different directory
34846        cd `$DIRNAME $ISLINK`
34847        sym_link_dir=`$THEPWDCMD -P`
34848        sym_link_file=`$BASENAME $ISLINK`
34849        let COUNTER=COUNTER+1
34850      done
34851      cd $STARTDIR
34852      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34853    fi
34854  fi
34855
34856  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34858$as_echo "no symlink" >&6; }
34859  else
34860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34861$as_echo "$SYMLINK_ORIGINAL" >&6; }
34862
34863    # We can't handle ccache by gcc wrappers, since we need to know if we're
34864    # using ccache. Instead ccache usage must be controlled by a configure option.
34865    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34866    if test "x$COMPILER_BASENAME" = "xccache"; then
34867      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34868$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34869      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34870    fi
34871  fi
34872
34873
34874  COMPILER=$CXX
34875  COMPILER_NAME=$COMPILER_NAME
34876
34877  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34878    # cc -V output typically looks like
34879    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34880    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34881    # Check that this is likely to be the Solaris Studio cc.
34882    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34883    if test $? -ne 0; then
34884      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34885      { $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
34886$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34887      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34888$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34889      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34890$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34891      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34892    fi
34893    # Remove usage instructions (if present), and
34894    # collapse compiler output into a single line
34895    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34896        $SED -e 's/ *[Uu]sage:.*//'`
34897    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34898        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34899  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34900    # xlc -qversion output typically looks like
34901    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34902    #     Version: 11.01.0000.0015
34903    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34904    # Check that this is likely to be the IBM XL C compiler.
34905    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34906    if test $? -ne 0; then
34907      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34908      { $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
34909$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34910      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34911$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34912      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34913$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34914      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34915    fi
34916    # Collapse compiler output into a single line
34917    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34918    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34919        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34920  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34921    # There is no specific version flag, but all output starts with a version string.
34922    # First line typically looks something like:
34923    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34924    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34925    # Check that this is likely to be Microsoft CL.EXE.
34926    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34927    if test $? -ne 0; then
34928      { $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
34929$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34930      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34931$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34932      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34933    fi
34934    # Collapse compiler output into a single line
34935    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34936    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34937        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34938  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34939    # gcc --version output typically looks like
34940    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34941    #     Copyright (C) 2013 Free Software Foundation, Inc.
34942    #     This is free software; see the source for copying conditions.  There is NO
34943    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34944    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34945    # Check that this is likely to be GCC.
34946    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34947    if test $? -ne 0; then
34948      { $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
34949$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34950      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34951$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34952      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34953    fi
34954    # Remove Copyright and legalese from version string, and
34955    # collapse into a single line
34956    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34957        $SED -e 's/ *Copyright .*//'`
34958    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34959        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34960  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34961    # clang --version output typically looks like
34962    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34963    #    clang version 3.3 (tags/RELEASE_33/final)
34964    # or
34965    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34966    #    Target: x86_64-pc-linux-gnu
34967    #    Thread model: posix
34968    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34969    # Check that this is likely to be clang
34970    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34971    if test $? -ne 0; then
34972      { $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
34973$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34974      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34975$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34976      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34977    fi
34978    # Collapse compiler output into a single line
34979    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34980    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34981        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34982  else
34983      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34984  fi
34985  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34986  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34987  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34988  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34989
34990  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34991$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34992
34993
34994  # Now that we have resolved CXX ourself, let autoconf have its go at it
34995  ac_ext=cpp
34996ac_cpp='$CXXCPP $CPPFLAGS'
34997ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34998ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34999ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35000if test -z "$CXX"; then
35001  if test -n "$CCC"; then
35002    CXX=$CCC
35003  else
35004    if test -n "$ac_tool_prefix"; then
35005  for ac_prog in $CXX
35006  do
35007    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35008set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35010$as_echo_n "checking for $ac_word... " >&6; }
35011if ${ac_cv_prog_CXX+:} false; then :
35012  $as_echo_n "(cached) " >&6
35013else
35014  if test -n "$CXX"; then
35015  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35016else
35017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35018for as_dir in $PATH
35019do
35020  IFS=$as_save_IFS
35021  test -z "$as_dir" && as_dir=.
35022    for ac_exec_ext in '' $ac_executable_extensions; do
35023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35024    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35026    break 2
35027  fi
35028done
35029  done
35030IFS=$as_save_IFS
35031
35032fi
35033fi
35034CXX=$ac_cv_prog_CXX
35035if test -n "$CXX"; then
35036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35037$as_echo "$CXX" >&6; }
35038else
35039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35040$as_echo "no" >&6; }
35041fi
35042
35043
35044    test -n "$CXX" && break
35045  done
35046fi
35047if test -z "$CXX"; then
35048  ac_ct_CXX=$CXX
35049  for ac_prog in $CXX
35050do
35051  # Extract the first word of "$ac_prog", so it can be a program name with args.
35052set dummy $ac_prog; ac_word=$2
35053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35054$as_echo_n "checking for $ac_word... " >&6; }
35055if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35056  $as_echo_n "(cached) " >&6
35057else
35058  if test -n "$ac_ct_CXX"; then
35059  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35060else
35061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35062for as_dir in $PATH
35063do
35064  IFS=$as_save_IFS
35065  test -z "$as_dir" && as_dir=.
35066    for ac_exec_ext in '' $ac_executable_extensions; do
35067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35068    ac_cv_prog_ac_ct_CXX="$ac_prog"
35069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35070    break 2
35071  fi
35072done
35073  done
35074IFS=$as_save_IFS
35075
35076fi
35077fi
35078ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35079if test -n "$ac_ct_CXX"; then
35080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35081$as_echo "$ac_ct_CXX" >&6; }
35082else
35083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35084$as_echo "no" >&6; }
35085fi
35086
35087
35088  test -n "$ac_ct_CXX" && break
35089done
35090
35091  if test "x$ac_ct_CXX" = x; then
35092    CXX="g++"
35093  else
35094    case $cross_compiling:$ac_tool_warned in
35095yes:)
35096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35098ac_tool_warned=yes ;;
35099esac
35100    CXX=$ac_ct_CXX
35101  fi
35102fi
35103
35104  fi
35105fi
35106# Provide some information about the compiler.
35107$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35108set X $ac_compile
35109ac_compiler=$2
35110for ac_option in --version -v -V -qversion; do
35111  { { ac_try="$ac_compiler $ac_option >&5"
35112case "(($ac_try" in
35113  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35114  *) ac_try_echo=$ac_try;;
35115esac
35116eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35117$as_echo "$ac_try_echo"; } >&5
35118  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35119  ac_status=$?
35120  if test -s conftest.err; then
35121    sed '10a\
35122... rest of stderr output deleted ...
35123         10q' conftest.err >conftest.er1
35124    cat conftest.er1 >&5
35125  fi
35126  rm -f conftest.er1 conftest.err
35127  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35128  test $ac_status = 0; }
35129done
35130
35131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35132$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35133if ${ac_cv_cxx_compiler_gnu+:} false; then :
35134  $as_echo_n "(cached) " >&6
35135else
35136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35137/* end confdefs.h.  */
35138
35139int
35140main ()
35141{
35142#ifndef __GNUC__
35143       choke me
35144#endif
35145
35146  ;
35147  return 0;
35148}
35149_ACEOF
35150if ac_fn_cxx_try_compile "$LINENO"; then :
35151  ac_compiler_gnu=yes
35152else
35153  ac_compiler_gnu=no
35154fi
35155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35156ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35157
35158fi
35159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35160$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35161if test $ac_compiler_gnu = yes; then
35162  GXX=yes
35163else
35164  GXX=
35165fi
35166ac_test_CXXFLAGS=${CXXFLAGS+set}
35167ac_save_CXXFLAGS=$CXXFLAGS
35168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35169$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35170if ${ac_cv_prog_cxx_g+:} false; then :
35171  $as_echo_n "(cached) " >&6
35172else
35173  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35174   ac_cxx_werror_flag=yes
35175   ac_cv_prog_cxx_g=no
35176   CXXFLAGS="-g"
35177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35178/* end confdefs.h.  */
35179
35180int
35181main ()
35182{
35183
35184  ;
35185  return 0;
35186}
35187_ACEOF
35188if ac_fn_cxx_try_compile "$LINENO"; then :
35189  ac_cv_prog_cxx_g=yes
35190else
35191  CXXFLAGS=""
35192      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35193/* end confdefs.h.  */
35194
35195int
35196main ()
35197{
35198
35199  ;
35200  return 0;
35201}
35202_ACEOF
35203if ac_fn_cxx_try_compile "$LINENO"; then :
35204
35205else
35206  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35207	 CXXFLAGS="-g"
35208	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35209/* end confdefs.h.  */
35210
35211int
35212main ()
35213{
35214
35215  ;
35216  return 0;
35217}
35218_ACEOF
35219if ac_fn_cxx_try_compile "$LINENO"; then :
35220  ac_cv_prog_cxx_g=yes
35221fi
35222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35223fi
35224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35225fi
35226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35227   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35228fi
35229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35230$as_echo "$ac_cv_prog_cxx_g" >&6; }
35231if test "$ac_test_CXXFLAGS" = set; then
35232  CXXFLAGS=$ac_save_CXXFLAGS
35233elif test $ac_cv_prog_cxx_g = yes; then
35234  if test "$GXX" = yes; then
35235    CXXFLAGS="-g -O2"
35236  else
35237    CXXFLAGS="-g"
35238  fi
35239else
35240  if test "$GXX" = yes; then
35241    CXXFLAGS="-O2"
35242  else
35243    CXXFLAGS=
35244  fi
35245fi
35246ac_ext=cpp
35247ac_cpp='$CXXCPP $CPPFLAGS'
35248ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35249ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35250ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35251
35252
35253  # This is the compiler version number on the form X.Y[.Z]
35254
35255
35256
35257
35258  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35259    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35260$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35261    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35262$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35263  fi
35264
35265  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35266  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35267    { $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
35268$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;}
35269  fi
35270
35271  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35272    { $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
35273$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35274  fi
35275
35276  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35277
35278
35279  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329    # Execute function body
35330
35331  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35332  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35333
35334  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35335    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35336  fi
35337
35338  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35339    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35340  fi
35341
35342  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35343  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35344
35345  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35346    :
35347
35348  else
35349    :
35350
35351          { $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
35352$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35353
35354
35355  fi
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370  fi
35371
35372  #
35373  # Setup the preprocessor (CPP and CXXCPP)
35374  #
35375  ac_ext=c
35376ac_cpp='$CPP $CPPFLAGS'
35377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35379ac_compiler_gnu=$ac_cv_c_compiler_gnu
35380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35381$as_echo_n "checking how to run the C preprocessor... " >&6; }
35382# On Suns, sometimes $CPP names a directory.
35383if test -n "$CPP" && test -d "$CPP"; then
35384  CPP=
35385fi
35386if test -z "$CPP"; then
35387  if ${ac_cv_prog_CPP+:} false; then :
35388  $as_echo_n "(cached) " >&6
35389else
35390      # Double quotes because CPP needs to be expanded
35391    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35392    do
35393      ac_preproc_ok=false
35394for ac_c_preproc_warn_flag in '' yes
35395do
35396  # Use a header file that comes with gcc, so configuring glibc
35397  # with a fresh cross-compiler works.
35398  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35399  # <limits.h> exists even on freestanding compilers.
35400  # On the NeXT, cc -E runs the code through the compiler's parser,
35401  # not just through cpp. "Syntax error" is here to catch this case.
35402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35403/* end confdefs.h.  */
35404#ifdef __STDC__
35405# include <limits.h>
35406#else
35407# include <assert.h>
35408#endif
35409		     Syntax error
35410_ACEOF
35411if ac_fn_c_try_cpp "$LINENO"; then :
35412
35413else
35414  # Broken: fails on valid input.
35415continue
35416fi
35417rm -f conftest.err conftest.i conftest.$ac_ext
35418
35419  # OK, works on sane cases.  Now check whether nonexistent headers
35420  # can be detected and how.
35421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35422/* end confdefs.h.  */
35423#include <ac_nonexistent.h>
35424_ACEOF
35425if ac_fn_c_try_cpp "$LINENO"; then :
35426  # Broken: success on invalid input.
35427continue
35428else
35429  # Passes both tests.
35430ac_preproc_ok=:
35431break
35432fi
35433rm -f conftest.err conftest.i conftest.$ac_ext
35434
35435done
35436# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35437rm -f conftest.i conftest.err conftest.$ac_ext
35438if $ac_preproc_ok; then :
35439  break
35440fi
35441
35442    done
35443    ac_cv_prog_CPP=$CPP
35444
35445fi
35446  CPP=$ac_cv_prog_CPP
35447else
35448  ac_cv_prog_CPP=$CPP
35449fi
35450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35451$as_echo "$CPP" >&6; }
35452ac_preproc_ok=false
35453for ac_c_preproc_warn_flag in '' yes
35454do
35455  # Use a header file that comes with gcc, so configuring glibc
35456  # with a fresh cross-compiler works.
35457  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35458  # <limits.h> exists even on freestanding compilers.
35459  # On the NeXT, cc -E runs the code through the compiler's parser,
35460  # not just through cpp. "Syntax error" is here to catch this case.
35461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35462/* end confdefs.h.  */
35463#ifdef __STDC__
35464# include <limits.h>
35465#else
35466# include <assert.h>
35467#endif
35468		     Syntax error
35469_ACEOF
35470if ac_fn_c_try_cpp "$LINENO"; then :
35471
35472else
35473  # Broken: fails on valid input.
35474continue
35475fi
35476rm -f conftest.err conftest.i conftest.$ac_ext
35477
35478  # OK, works on sane cases.  Now check whether nonexistent headers
35479  # can be detected and how.
35480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35481/* end confdefs.h.  */
35482#include <ac_nonexistent.h>
35483_ACEOF
35484if ac_fn_c_try_cpp "$LINENO"; then :
35485  # Broken: success on invalid input.
35486continue
35487else
35488  # Passes both tests.
35489ac_preproc_ok=:
35490break
35491fi
35492rm -f conftest.err conftest.i conftest.$ac_ext
35493
35494done
35495# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35496rm -f conftest.i conftest.err conftest.$ac_ext
35497if $ac_preproc_ok; then :
35498
35499else
35500  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35501$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35502as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35503See \`config.log' for more details" "$LINENO" 5; }
35504fi
35505
35506ac_ext=cpp
35507ac_cpp='$CXXCPP $CPPFLAGS'
35508ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35509ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35510ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35511
35512
35513  # Only process if variable expands to non-empty
35514
35515  if test "x$CPP" != x; then
35516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35517
35518  # First separate the path from the arguments. This will split at the first
35519  # space.
35520  complete="$CPP"
35521  path="${complete%% *}"
35522  tmp="$complete EOL"
35523  arguments="${tmp#* }"
35524
35525  # Input might be given as Windows format, start by converting to
35526  # unix format.
35527  new_path=`$CYGPATH -u "$path"`
35528
35529  # Now try to locate executable using which
35530  new_path=`$WHICH "$new_path" 2> /dev/null`
35531  # bat and cmd files are not always considered executable in cygwin causing which
35532  # to not find them
35533  if test "x$new_path" = x \
35534      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35535      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35536    new_path=`$CYGPATH -u "$path"`
35537  fi
35538  if test "x$new_path" = x; then
35539    # Oops. Which didn't find the executable.
35540    # The splitting of arguments from the executable at a space might have been incorrect,
35541    # since paths with space are more likely in Windows. Give it another try with the whole
35542    # argument.
35543    path="$complete"
35544    arguments="EOL"
35545    new_path=`$CYGPATH -u "$path"`
35546    new_path=`$WHICH "$new_path" 2> /dev/null`
35547    # bat and cmd files are not always considered executable in cygwin causing which
35548    # to not find them
35549    if test "x$new_path" = x \
35550        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35551        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35552      new_path=`$CYGPATH -u "$path"`
35553    fi
35554    if test "x$new_path" = x; then
35555      # It's still not found. Now this is an unrecoverable error.
35556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35557$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35558      has_space=`$ECHO "$complete" | $GREP " "`
35559      if test "x$has_space" != x; then
35560        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35561$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35562      fi
35563      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35564    fi
35565  fi
35566
35567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35570  # "foo.exe" is OK but "foo" is an error.
35571  #
35572  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35573  # It is also a way to make sure we got the proper file name for the real test later on.
35574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35575  if test "x$test_shortpath" = x; then
35576    # Short path failed, file does not exist as specified.
35577    # Try adding .exe or .cmd
35578    if test -f "${new_path}.exe"; then
35579      input_to_shortpath="${new_path}.exe"
35580    elif test -f "${new_path}.cmd"; then
35581      input_to_shortpath="${new_path}.cmd"
35582    else
35583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35584$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35585      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35586$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35587      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35588    fi
35589  else
35590    input_to_shortpath="$new_path"
35591  fi
35592
35593  # Call helper function which possibly converts this using DOS-style short mode.
35594  # If so, the updated path is stored in $new_path.
35595  new_path="$input_to_shortpath"
35596
35597  input_path="$input_to_shortpath"
35598  # Check if we need to convert this using DOS-style short mode. If the path
35599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35600  # take no chances and rewrite it.
35601  # Note: m4 eats our [], so we need to use [ and ] instead.
35602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35603  if test "x$has_forbidden_chars" != x; then
35604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35605    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35606    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35607    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35608      # Going to short mode and back again did indeed matter. Since short mode is
35609      # case insensitive, let's make it lowercase to improve readability.
35610      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35611      # Now convert it back to Unix-style (cygpath)
35612      input_path=`$CYGPATH -u "$shortmode_path"`
35613      new_path="$input_path"
35614    fi
35615  fi
35616
35617  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35618  if test "x$test_cygdrive_prefix" = x; then
35619    # As a simple fix, exclude /usr/bin since it's not a real path.
35620    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35621      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35622      # a path prefixed by /cygdrive for fixpath to work.
35623      new_path="$CYGWIN_ROOT_PATH$input_path"
35624    fi
35625  fi
35626
35627  # remove trailing .exe if any
35628  new_path="${new_path/%.exe/}"
35629
35630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35631
35632  # First separate the path from the arguments. This will split at the first
35633  # space.
35634  complete="$CPP"
35635  path="${complete%% *}"
35636  tmp="$complete EOL"
35637  arguments="${tmp#* }"
35638
35639  # Input might be given as Windows format, start by converting to
35640  # unix format.
35641  new_path="$path"
35642
35643  windows_path="$new_path"
35644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35645    unix_path=`$CYGPATH -u "$windows_path"`
35646    new_path="$unix_path"
35647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35649    new_path="$unix_path"
35650  fi
35651
35652
35653  # Now try to locate executable using which
35654  new_path=`$WHICH "$new_path" 2> /dev/null`
35655
35656  if test "x$new_path" = x; then
35657    # Oops. Which didn't find the executable.
35658    # The splitting of arguments from the executable at a space might have been incorrect,
35659    # since paths with space are more likely in Windows. Give it another try with the whole
35660    # argument.
35661    path="$complete"
35662    arguments="EOL"
35663    new_path="$path"
35664
35665  windows_path="$new_path"
35666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35667    unix_path=`$CYGPATH -u "$windows_path"`
35668    new_path="$unix_path"
35669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35671    new_path="$unix_path"
35672  fi
35673
35674
35675    new_path=`$WHICH "$new_path" 2> /dev/null`
35676    # bat and cmd files are not always considered executable in MSYS causing which
35677    # to not find them
35678    if test "x$new_path" = x \
35679        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35680        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35681      new_path="$path"
35682
35683  windows_path="$new_path"
35684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35685    unix_path=`$CYGPATH -u "$windows_path"`
35686    new_path="$unix_path"
35687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35689    new_path="$unix_path"
35690  fi
35691
35692    fi
35693
35694    if test "x$new_path" = x; then
35695      # It's still not found. Now this is an unrecoverable error.
35696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35697$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35698      has_space=`$ECHO "$complete" | $GREP " "`
35699      if test "x$has_space" != x; then
35700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35702      fi
35703      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35704    fi
35705  fi
35706
35707  # Now new_path has a complete unix path to the binary
35708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35709    # Keep paths in /bin as-is, but remove trailing .exe if any
35710    new_path="${new_path/%.exe/}"
35711    # Do not save /bin paths to all_fixpath_prefixes!
35712  else
35713    # Not in mixed or Windows style, start by that.
35714    new_path=`cmd //c echo $new_path`
35715
35716  input_path="$new_path"
35717  # Check if we need to convert this using DOS-style short mode. If the path
35718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35719  # take no chances and rewrite it.
35720  # Note: m4 eats our [], so we need to use [ and ] instead.
35721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35722  if test "x$has_forbidden_chars" != x; then
35723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35725  fi
35726
35727    # Output is in $new_path
35728
35729  windows_path="$new_path"
35730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35731    unix_path=`$CYGPATH -u "$windows_path"`
35732    new_path="$unix_path"
35733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35735    new_path="$unix_path"
35736  fi
35737
35738    # remove trailing .exe if any
35739    new_path="${new_path/%.exe/}"
35740
35741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35743  fi
35744
35745    else
35746      # We're on a unix platform. Hooray! :)
35747      # First separate the path from the arguments. This will split at the first
35748      # space.
35749      complete="$CPP"
35750      path="${complete%% *}"
35751      tmp="$complete EOL"
35752      arguments="${tmp#* }"
35753
35754      # Cannot rely on the command "which" here since it doesn't always work.
35755      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35756      if test -z "$is_absolute_path"; then
35757        # Path to executable is not absolute. Find it.
35758        IFS_save="$IFS"
35759        IFS=:
35760        for p in $PATH; do
35761          if test -f "$p/$path" && test -x "$p/$path"; then
35762            new_path="$p/$path"
35763            break
35764          fi
35765        done
35766        IFS="$IFS_save"
35767      else
35768        # This is an absolute path, we can use it without further modifications.
35769        new_path="$path"
35770      fi
35771
35772      if test "x$new_path" = x; then
35773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35774$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35775        has_space=`$ECHO "$complete" | $GREP " "`
35776        if test "x$has_space" != x; then
35777          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35778$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35779        fi
35780        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35781      fi
35782    fi
35783
35784    # Now join together the path and the arguments once again
35785    if test "x$arguments" != xEOL; then
35786      new_complete="$new_path ${arguments% *}"
35787    else
35788      new_complete="$new_path"
35789    fi
35790
35791    if test "x$complete" != "x$new_complete"; then
35792      CPP="$new_complete"
35793      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35794$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35795    fi
35796  fi
35797
35798  ac_ext=cpp
35799ac_cpp='$CXXCPP $CPPFLAGS'
35800ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35801ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35802ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35804$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35805if test -z "$CXXCPP"; then
35806  if ${ac_cv_prog_CXXCPP+:} false; then :
35807  $as_echo_n "(cached) " >&6
35808else
35809      # Double quotes because CXXCPP needs to be expanded
35810    for CXXCPP in "$CXX -E" "/lib/cpp"
35811    do
35812      ac_preproc_ok=false
35813for ac_cxx_preproc_warn_flag in '' yes
35814do
35815  # Use a header file that comes with gcc, so configuring glibc
35816  # with a fresh cross-compiler works.
35817  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35818  # <limits.h> exists even on freestanding compilers.
35819  # On the NeXT, cc -E runs the code through the compiler's parser,
35820  # not just through cpp. "Syntax error" is here to catch this case.
35821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35822/* end confdefs.h.  */
35823#ifdef __STDC__
35824# include <limits.h>
35825#else
35826# include <assert.h>
35827#endif
35828		     Syntax error
35829_ACEOF
35830if ac_fn_cxx_try_cpp "$LINENO"; then :
35831
35832else
35833  # Broken: fails on valid input.
35834continue
35835fi
35836rm -f conftest.err conftest.i conftest.$ac_ext
35837
35838  # OK, works on sane cases.  Now check whether nonexistent headers
35839  # can be detected and how.
35840  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35841/* end confdefs.h.  */
35842#include <ac_nonexistent.h>
35843_ACEOF
35844if ac_fn_cxx_try_cpp "$LINENO"; then :
35845  # Broken: success on invalid input.
35846continue
35847else
35848  # Passes both tests.
35849ac_preproc_ok=:
35850break
35851fi
35852rm -f conftest.err conftest.i conftest.$ac_ext
35853
35854done
35855# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35856rm -f conftest.i conftest.err conftest.$ac_ext
35857if $ac_preproc_ok; then :
35858  break
35859fi
35860
35861    done
35862    ac_cv_prog_CXXCPP=$CXXCPP
35863
35864fi
35865  CXXCPP=$ac_cv_prog_CXXCPP
35866else
35867  ac_cv_prog_CXXCPP=$CXXCPP
35868fi
35869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35870$as_echo "$CXXCPP" >&6; }
35871ac_preproc_ok=false
35872for ac_cxx_preproc_warn_flag in '' yes
35873do
35874  # Use a header file that comes with gcc, so configuring glibc
35875  # with a fresh cross-compiler works.
35876  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35877  # <limits.h> exists even on freestanding compilers.
35878  # On the NeXT, cc -E runs the code through the compiler's parser,
35879  # not just through cpp. "Syntax error" is here to catch this case.
35880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35881/* end confdefs.h.  */
35882#ifdef __STDC__
35883# include <limits.h>
35884#else
35885# include <assert.h>
35886#endif
35887		     Syntax error
35888_ACEOF
35889if ac_fn_cxx_try_cpp "$LINENO"; then :
35890
35891else
35892  # Broken: fails on valid input.
35893continue
35894fi
35895rm -f conftest.err conftest.i conftest.$ac_ext
35896
35897  # OK, works on sane cases.  Now check whether nonexistent headers
35898  # can be detected and how.
35899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35900/* end confdefs.h.  */
35901#include <ac_nonexistent.h>
35902_ACEOF
35903if ac_fn_cxx_try_cpp "$LINENO"; then :
35904  # Broken: success on invalid input.
35905continue
35906else
35907  # Passes both tests.
35908ac_preproc_ok=:
35909break
35910fi
35911rm -f conftest.err conftest.i conftest.$ac_ext
35912
35913done
35914# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35915rm -f conftest.i conftest.err conftest.$ac_ext
35916if $ac_preproc_ok; then :
35917
35918else
35919  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35921as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35922See \`config.log' for more details" "$LINENO" 5; }
35923fi
35924
35925ac_ext=cpp
35926ac_cpp='$CXXCPP $CPPFLAGS'
35927ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35928ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35929ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35930
35931
35932  # Only process if variable expands to non-empty
35933
35934  if test "x$CXXCPP" != x; then
35935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35936
35937  # First separate the path from the arguments. This will split at the first
35938  # space.
35939  complete="$CXXCPP"
35940  path="${complete%% *}"
35941  tmp="$complete EOL"
35942  arguments="${tmp#* }"
35943
35944  # Input might be given as Windows format, start by converting to
35945  # unix format.
35946  new_path=`$CYGPATH -u "$path"`
35947
35948  # Now try to locate executable using which
35949  new_path=`$WHICH "$new_path" 2> /dev/null`
35950  # bat and cmd files are not always considered executable in cygwin causing which
35951  # to not find them
35952  if test "x$new_path" = x \
35953      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35954      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35955    new_path=`$CYGPATH -u "$path"`
35956  fi
35957  if test "x$new_path" = x; then
35958    # Oops. Which didn't find the executable.
35959    # The splitting of arguments from the executable at a space might have been incorrect,
35960    # since paths with space are more likely in Windows. Give it another try with the whole
35961    # argument.
35962    path="$complete"
35963    arguments="EOL"
35964    new_path=`$CYGPATH -u "$path"`
35965    new_path=`$WHICH "$new_path" 2> /dev/null`
35966    # bat and cmd files are not always considered executable in cygwin causing which
35967    # to not find them
35968    if test "x$new_path" = x \
35969        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35970        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35971      new_path=`$CYGPATH -u "$path"`
35972    fi
35973    if test "x$new_path" = x; then
35974      # It's still not found. Now this is an unrecoverable error.
35975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35976$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35977      has_space=`$ECHO "$complete" | $GREP " "`
35978      if test "x$has_space" != x; then
35979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35981      fi
35982      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35983    fi
35984  fi
35985
35986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35989  # "foo.exe" is OK but "foo" is an error.
35990  #
35991  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35992  # It is also a way to make sure we got the proper file name for the real test later on.
35993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35994  if test "x$test_shortpath" = x; then
35995    # Short path failed, file does not exist as specified.
35996    # Try adding .exe or .cmd
35997    if test -f "${new_path}.exe"; then
35998      input_to_shortpath="${new_path}.exe"
35999    elif test -f "${new_path}.cmd"; then
36000      input_to_shortpath="${new_path}.cmd"
36001    else
36002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36003$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36004      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36005$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36006      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36007    fi
36008  else
36009    input_to_shortpath="$new_path"
36010  fi
36011
36012  # Call helper function which possibly converts this using DOS-style short mode.
36013  # If so, the updated path is stored in $new_path.
36014  new_path="$input_to_shortpath"
36015
36016  input_path="$input_to_shortpath"
36017  # Check if we need to convert this using DOS-style short mode. If the path
36018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36019  # take no chances and rewrite it.
36020  # Note: m4 eats our [], so we need to use [ and ] instead.
36021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36022  if test "x$has_forbidden_chars" != x; then
36023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36027      # Going to short mode and back again did indeed matter. Since short mode is
36028      # case insensitive, let's make it lowercase to improve readability.
36029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36030      # Now convert it back to Unix-style (cygpath)
36031      input_path=`$CYGPATH -u "$shortmode_path"`
36032      new_path="$input_path"
36033    fi
36034  fi
36035
36036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36037  if test "x$test_cygdrive_prefix" = x; then
36038    # As a simple fix, exclude /usr/bin since it's not a real path.
36039    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36041      # a path prefixed by /cygdrive for fixpath to work.
36042      new_path="$CYGWIN_ROOT_PATH$input_path"
36043    fi
36044  fi
36045
36046  # remove trailing .exe if any
36047  new_path="${new_path/%.exe/}"
36048
36049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36050
36051  # First separate the path from the arguments. This will split at the first
36052  # space.
36053  complete="$CXXCPP"
36054  path="${complete%% *}"
36055  tmp="$complete EOL"
36056  arguments="${tmp#* }"
36057
36058  # Input might be given as Windows format, start by converting to
36059  # unix format.
36060  new_path="$path"
36061
36062  windows_path="$new_path"
36063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36064    unix_path=`$CYGPATH -u "$windows_path"`
36065    new_path="$unix_path"
36066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36068    new_path="$unix_path"
36069  fi
36070
36071
36072  # Now try to locate executable using which
36073  new_path=`$WHICH "$new_path" 2> /dev/null`
36074
36075  if test "x$new_path" = x; then
36076    # Oops. Which didn't find the executable.
36077    # The splitting of arguments from the executable at a space might have been incorrect,
36078    # since paths with space are more likely in Windows. Give it another try with the whole
36079    # argument.
36080    path="$complete"
36081    arguments="EOL"
36082    new_path="$path"
36083
36084  windows_path="$new_path"
36085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36086    unix_path=`$CYGPATH -u "$windows_path"`
36087    new_path="$unix_path"
36088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36090    new_path="$unix_path"
36091  fi
36092
36093
36094    new_path=`$WHICH "$new_path" 2> /dev/null`
36095    # bat and cmd files are not always considered executable in MSYS causing which
36096    # to not find them
36097    if test "x$new_path" = x \
36098        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36099        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36100      new_path="$path"
36101
36102  windows_path="$new_path"
36103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36104    unix_path=`$CYGPATH -u "$windows_path"`
36105    new_path="$unix_path"
36106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36108    new_path="$unix_path"
36109  fi
36110
36111    fi
36112
36113    if test "x$new_path" = x; then
36114      # It's still not found. Now this is an unrecoverable error.
36115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36116$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36117      has_space=`$ECHO "$complete" | $GREP " "`
36118      if test "x$has_space" != x; then
36119        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36120$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36121      fi
36122      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36123    fi
36124  fi
36125
36126  # Now new_path has a complete unix path to the binary
36127  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36128    # Keep paths in /bin as-is, but remove trailing .exe if any
36129    new_path="${new_path/%.exe/}"
36130    # Do not save /bin paths to all_fixpath_prefixes!
36131  else
36132    # Not in mixed or Windows style, start by that.
36133    new_path=`cmd //c echo $new_path`
36134
36135  input_path="$new_path"
36136  # Check if we need to convert this using DOS-style short mode. If the path
36137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36138  # take no chances and rewrite it.
36139  # Note: m4 eats our [], so we need to use [ and ] instead.
36140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36141  if test "x$has_forbidden_chars" != x; then
36142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36144  fi
36145
36146    # Output is in $new_path
36147
36148  windows_path="$new_path"
36149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36150    unix_path=`$CYGPATH -u "$windows_path"`
36151    new_path="$unix_path"
36152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36154    new_path="$unix_path"
36155  fi
36156
36157    # remove trailing .exe if any
36158    new_path="${new_path/%.exe/}"
36159
36160    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36161    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36162  fi
36163
36164    else
36165      # We're on a unix platform. Hooray! :)
36166      # First separate the path from the arguments. This will split at the first
36167      # space.
36168      complete="$CXXCPP"
36169      path="${complete%% *}"
36170      tmp="$complete EOL"
36171      arguments="${tmp#* }"
36172
36173      # Cannot rely on the command "which" here since it doesn't always work.
36174      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36175      if test -z "$is_absolute_path"; then
36176        # Path to executable is not absolute. Find it.
36177        IFS_save="$IFS"
36178        IFS=:
36179        for p in $PATH; do
36180          if test -f "$p/$path" && test -x "$p/$path"; then
36181            new_path="$p/$path"
36182            break
36183          fi
36184        done
36185        IFS="$IFS_save"
36186      else
36187        # This is an absolute path, we can use it without further modifications.
36188        new_path="$path"
36189      fi
36190
36191      if test "x$new_path" = x; then
36192        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36193$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36194        has_space=`$ECHO "$complete" | $GREP " "`
36195        if test "x$has_space" != x; then
36196          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36197$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36198        fi
36199        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36200      fi
36201    fi
36202
36203    # Now join together the path and the arguments once again
36204    if test "x$arguments" != xEOL; then
36205      new_complete="$new_path ${arguments% *}"
36206    else
36207      new_complete="$new_path"
36208    fi
36209
36210    if test "x$complete" != "x$new_complete"; then
36211      CXXCPP="$new_complete"
36212      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36213$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36214    fi
36215  fi
36216
36217
36218  #
36219  # Setup the linker (LD)
36220  #
36221  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36222    # In the Microsoft toolchain we have a separate LD command "link".
36223    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36224    # a cygwin program for something completely different.
36225    # Extract the first word of "link", so it can be a program name with args.
36226set dummy link; ac_word=$2
36227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36228$as_echo_n "checking for $ac_word... " >&6; }
36229if ${ac_cv_prog_LD+:} false; then :
36230  $as_echo_n "(cached) " >&6
36231else
36232  if test -n "$LD"; then
36233  ac_cv_prog_LD="$LD" # Let the user override the test.
36234else
36235  ac_prog_rejected=no
36236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36237for as_dir in $PATH
36238do
36239  IFS=$as_save_IFS
36240  test -z "$as_dir" && as_dir=.
36241    for ac_exec_ext in '' $ac_executable_extensions; do
36242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36243    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36244       ac_prog_rejected=yes
36245       continue
36246     fi
36247    ac_cv_prog_LD="link"
36248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36249    break 2
36250  fi
36251done
36252  done
36253IFS=$as_save_IFS
36254
36255if test $ac_prog_rejected = yes; then
36256  # We found a bogon in the path, so make sure we never use it.
36257  set dummy $ac_cv_prog_LD
36258  shift
36259  if test $# != 0; then
36260    # We chose a different compiler from the bogus one.
36261    # However, it has the same basename, so the bogon will be chosen
36262    # first if we set LD to just the basename; use the full file name.
36263    shift
36264    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36265  fi
36266fi
36267fi
36268fi
36269LD=$ac_cv_prog_LD
36270if test -n "$LD"; then
36271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36272$as_echo "$LD" >&6; }
36273else
36274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36275$as_echo "no" >&6; }
36276fi
36277
36278
36279
36280  # Only process if variable expands to non-empty
36281
36282  if test "x$LD" != x; then
36283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36284
36285  # First separate the path from the arguments. This will split at the first
36286  # space.
36287  complete="$LD"
36288  path="${complete%% *}"
36289  tmp="$complete EOL"
36290  arguments="${tmp#* }"
36291
36292  # Input might be given as Windows format, start by converting to
36293  # unix format.
36294  new_path=`$CYGPATH -u "$path"`
36295
36296  # Now try to locate executable using which
36297  new_path=`$WHICH "$new_path" 2> /dev/null`
36298  # bat and cmd files are not always considered executable in cygwin causing which
36299  # to not find them
36300  if test "x$new_path" = x \
36301      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36302      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36303    new_path=`$CYGPATH -u "$path"`
36304  fi
36305  if test "x$new_path" = x; then
36306    # Oops. Which didn't find the executable.
36307    # The splitting of arguments from the executable at a space might have been incorrect,
36308    # since paths with space are more likely in Windows. Give it another try with the whole
36309    # argument.
36310    path="$complete"
36311    arguments="EOL"
36312    new_path=`$CYGPATH -u "$path"`
36313    new_path=`$WHICH "$new_path" 2> /dev/null`
36314    # bat and cmd files are not always considered executable in cygwin causing which
36315    # to not find them
36316    if test "x$new_path" = x \
36317        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36318        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36319      new_path=`$CYGPATH -u "$path"`
36320    fi
36321    if test "x$new_path" = x; then
36322      # It's still not found. Now this is an unrecoverable error.
36323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36324$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36325      has_space=`$ECHO "$complete" | $GREP " "`
36326      if test "x$has_space" != x; then
36327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36329      fi
36330      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36331    fi
36332  fi
36333
36334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36337  # "foo.exe" is OK but "foo" is an error.
36338  #
36339  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36340  # It is also a way to make sure we got the proper file name for the real test later on.
36341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36342  if test "x$test_shortpath" = x; then
36343    # Short path failed, file does not exist as specified.
36344    # Try adding .exe or .cmd
36345    if test -f "${new_path}.exe"; then
36346      input_to_shortpath="${new_path}.exe"
36347    elif test -f "${new_path}.cmd"; then
36348      input_to_shortpath="${new_path}.cmd"
36349    else
36350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36351$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36352      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36353$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36354      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36355    fi
36356  else
36357    input_to_shortpath="$new_path"
36358  fi
36359
36360  # Call helper function which possibly converts this using DOS-style short mode.
36361  # If so, the updated path is stored in $new_path.
36362  new_path="$input_to_shortpath"
36363
36364  input_path="$input_to_shortpath"
36365  # Check if we need to convert this using DOS-style short mode. If the path
36366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36367  # take no chances and rewrite it.
36368  # Note: m4 eats our [], so we need to use [ and ] instead.
36369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36370  if test "x$has_forbidden_chars" != x; then
36371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36375      # Going to short mode and back again did indeed matter. Since short mode is
36376      # case insensitive, let's make it lowercase to improve readability.
36377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36378      # Now convert it back to Unix-style (cygpath)
36379      input_path=`$CYGPATH -u "$shortmode_path"`
36380      new_path="$input_path"
36381    fi
36382  fi
36383
36384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36385  if test "x$test_cygdrive_prefix" = x; then
36386    # As a simple fix, exclude /usr/bin since it's not a real path.
36387    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36389      # a path prefixed by /cygdrive for fixpath to work.
36390      new_path="$CYGWIN_ROOT_PATH$input_path"
36391    fi
36392  fi
36393
36394  # remove trailing .exe if any
36395  new_path="${new_path/%.exe/}"
36396
36397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36398
36399  # First separate the path from the arguments. This will split at the first
36400  # space.
36401  complete="$LD"
36402  path="${complete%% *}"
36403  tmp="$complete EOL"
36404  arguments="${tmp#* }"
36405
36406  # Input might be given as Windows format, start by converting to
36407  # unix format.
36408  new_path="$path"
36409
36410  windows_path="$new_path"
36411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36412    unix_path=`$CYGPATH -u "$windows_path"`
36413    new_path="$unix_path"
36414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36416    new_path="$unix_path"
36417  fi
36418
36419
36420  # Now try to locate executable using which
36421  new_path=`$WHICH "$new_path" 2> /dev/null`
36422
36423  if test "x$new_path" = x; then
36424    # Oops. Which didn't find the executable.
36425    # The splitting of arguments from the executable at a space might have been incorrect,
36426    # since paths with space are more likely in Windows. Give it another try with the whole
36427    # argument.
36428    path="$complete"
36429    arguments="EOL"
36430    new_path="$path"
36431
36432  windows_path="$new_path"
36433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36434    unix_path=`$CYGPATH -u "$windows_path"`
36435    new_path="$unix_path"
36436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36438    new_path="$unix_path"
36439  fi
36440
36441
36442    new_path=`$WHICH "$new_path" 2> /dev/null`
36443    # bat and cmd files are not always considered executable in MSYS causing which
36444    # to not find them
36445    if test "x$new_path" = x \
36446        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36447        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36448      new_path="$path"
36449
36450  windows_path="$new_path"
36451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36452    unix_path=`$CYGPATH -u "$windows_path"`
36453    new_path="$unix_path"
36454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36456    new_path="$unix_path"
36457  fi
36458
36459    fi
36460
36461    if test "x$new_path" = x; then
36462      # It's still not found. Now this is an unrecoverable error.
36463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36464$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36465      has_space=`$ECHO "$complete" | $GREP " "`
36466      if test "x$has_space" != x; then
36467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36469      fi
36470      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36471    fi
36472  fi
36473
36474  # Now new_path has a complete unix path to the binary
36475  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36476    # Keep paths in /bin as-is, but remove trailing .exe if any
36477    new_path="${new_path/%.exe/}"
36478    # Do not save /bin paths to all_fixpath_prefixes!
36479  else
36480    # Not in mixed or Windows style, start by that.
36481    new_path=`cmd //c echo $new_path`
36482
36483  input_path="$new_path"
36484  # Check if we need to convert this using DOS-style short mode. If the path
36485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36486  # take no chances and rewrite it.
36487  # Note: m4 eats our [], so we need to use [ and ] instead.
36488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36489  if test "x$has_forbidden_chars" != x; then
36490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36492  fi
36493
36494    # Output is in $new_path
36495
36496  windows_path="$new_path"
36497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36498    unix_path=`$CYGPATH -u "$windows_path"`
36499    new_path="$unix_path"
36500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36502    new_path="$unix_path"
36503  fi
36504
36505    # remove trailing .exe if any
36506    new_path="${new_path/%.exe/}"
36507
36508    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36509    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36510  fi
36511
36512    else
36513      # We're on a unix platform. Hooray! :)
36514      # First separate the path from the arguments. This will split at the first
36515      # space.
36516      complete="$LD"
36517      path="${complete%% *}"
36518      tmp="$complete EOL"
36519      arguments="${tmp#* }"
36520
36521      # Cannot rely on the command "which" here since it doesn't always work.
36522      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36523      if test -z "$is_absolute_path"; then
36524        # Path to executable is not absolute. Find it.
36525        IFS_save="$IFS"
36526        IFS=:
36527        for p in $PATH; do
36528          if test -f "$p/$path" && test -x "$p/$path"; then
36529            new_path="$p/$path"
36530            break
36531          fi
36532        done
36533        IFS="$IFS_save"
36534      else
36535        # This is an absolute path, we can use it without further modifications.
36536        new_path="$path"
36537      fi
36538
36539      if test "x$new_path" = x; then
36540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36541$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36542        has_space=`$ECHO "$complete" | $GREP " "`
36543        if test "x$has_space" != x; then
36544          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36545$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36546        fi
36547        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36548      fi
36549    fi
36550
36551    # Now join together the path and the arguments once again
36552    if test "x$arguments" != xEOL; then
36553      new_complete="$new_path ${arguments% *}"
36554    else
36555      new_complete="$new_path"
36556    fi
36557
36558    if test "x$complete" != "x$new_complete"; then
36559      LD="$new_complete"
36560      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36561$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36562    fi
36563  fi
36564
36565    # Verify that we indeed succeeded with this trick.
36566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36567$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36568    "$LD" --version > /dev/null
36569    if test $? -eq 0 ; then
36570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36571$as_echo "no" >&6; }
36572      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36573    else
36574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36575$as_echo "yes" >&6; }
36576    fi
36577    LDCXX="$LD"
36578  else
36579    # All other toolchains use the compiler to link.
36580    LD="$CC"
36581    LDCXX="$CXX"
36582  fi
36583
36584  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36585
36586
36587  #
36588  # Setup the assembler (AS)
36589  #
36590  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36591
36592
36593  # Publish this variable in the help.
36594
36595
36596  if [ -z "${AS+x}" ]; then
36597    # The variable is not set by user, try to locate tool using the code snippet
36598    for ac_prog in as
36599do
36600  # Extract the first word of "$ac_prog", so it can be a program name with args.
36601set dummy $ac_prog; ac_word=$2
36602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36603$as_echo_n "checking for $ac_word... " >&6; }
36604if ${ac_cv_path_AS+:} false; then :
36605  $as_echo_n "(cached) " >&6
36606else
36607  case $AS in
36608  [\\/]* | ?:[\\/]*)
36609  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36610  ;;
36611  *)
36612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36613for as_dir in $PATH
36614do
36615  IFS=$as_save_IFS
36616  test -z "$as_dir" && as_dir=.
36617    for ac_exec_ext in '' $ac_executable_extensions; do
36618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36619    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36621    break 2
36622  fi
36623done
36624  done
36625IFS=$as_save_IFS
36626
36627  ;;
36628esac
36629fi
36630AS=$ac_cv_path_AS
36631if test -n "$AS"; then
36632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36633$as_echo "$AS" >&6; }
36634else
36635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36636$as_echo "no" >&6; }
36637fi
36638
36639
36640  test -n "$AS" && break
36641done
36642
36643  else
36644    # The variable is set, but is it from the command line or the environment?
36645
36646    # Try to remove the string !AS! from our list.
36647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36649      # If it failed, the variable was not from the command line. Ignore it,
36650      # but warn the user (except for BASH, which is always set by the calling BASH).
36651      if test "xAS" != xBASH; then
36652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36653$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36654      fi
36655      # Try to locate tool using the code snippet
36656      for ac_prog in as
36657do
36658  # Extract the first word of "$ac_prog", so it can be a program name with args.
36659set dummy $ac_prog; ac_word=$2
36660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36661$as_echo_n "checking for $ac_word... " >&6; }
36662if ${ac_cv_path_AS+:} false; then :
36663  $as_echo_n "(cached) " >&6
36664else
36665  case $AS in
36666  [\\/]* | ?:[\\/]*)
36667  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36668  ;;
36669  *)
36670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36671for as_dir in $PATH
36672do
36673  IFS=$as_save_IFS
36674  test -z "$as_dir" && as_dir=.
36675    for ac_exec_ext in '' $ac_executable_extensions; do
36676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36677    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36679    break 2
36680  fi
36681done
36682  done
36683IFS=$as_save_IFS
36684
36685  ;;
36686esac
36687fi
36688AS=$ac_cv_path_AS
36689if test -n "$AS"; then
36690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36691$as_echo "$AS" >&6; }
36692else
36693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36694$as_echo "no" >&6; }
36695fi
36696
36697
36698  test -n "$AS" && break
36699done
36700
36701    else
36702      # If it succeeded, then it was overridden by the user. We will use it
36703      # for the tool.
36704
36705      # First remove it from the list of overridden variables, so we can test
36706      # for unknown variables in the end.
36707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36708
36709      # Check if we try to supply an empty value
36710      if test "x$AS" = x; then
36711        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36712$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36714$as_echo_n "checking for AS... " >&6; }
36715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36716$as_echo "disabled" >&6; }
36717      else
36718        # Check if the provided tool contains a complete path.
36719        tool_specified="$AS"
36720        tool_basename="${tool_specified##*/}"
36721        if test "x$tool_basename" = "x$tool_specified"; then
36722          # A command without a complete path is provided, search $PATH.
36723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36724$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36725          # Extract the first word of "$tool_basename", so it can be a program name with args.
36726set dummy $tool_basename; ac_word=$2
36727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36728$as_echo_n "checking for $ac_word... " >&6; }
36729if ${ac_cv_path_AS+:} false; then :
36730  $as_echo_n "(cached) " >&6
36731else
36732  case $AS in
36733  [\\/]* | ?:[\\/]*)
36734  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36735  ;;
36736  *)
36737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36738for as_dir in $PATH
36739do
36740  IFS=$as_save_IFS
36741  test -z "$as_dir" && as_dir=.
36742    for ac_exec_ext in '' $ac_executable_extensions; do
36743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36744    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36746    break 2
36747  fi
36748done
36749  done
36750IFS=$as_save_IFS
36751
36752  ;;
36753esac
36754fi
36755AS=$ac_cv_path_AS
36756if test -n "$AS"; then
36757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36758$as_echo "$AS" >&6; }
36759else
36760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36761$as_echo "no" >&6; }
36762fi
36763
36764
36765          if test "x$AS" = x; then
36766            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36767          fi
36768        else
36769          # Otherwise we believe it is a complete path. Use it as it is.
36770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36771$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36772          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36773$as_echo_n "checking for AS... " >&6; }
36774          if test ! -x "$tool_specified"; then
36775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36776$as_echo "not found" >&6; }
36777            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36778          fi
36779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36780$as_echo "$tool_specified" >&6; }
36781        fi
36782      fi
36783    fi
36784
36785  fi
36786
36787
36788
36789  # Only process if variable expands to non-empty
36790
36791  if test "x$AS" != x; then
36792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36793
36794  # First separate the path from the arguments. This will split at the first
36795  # space.
36796  complete="$AS"
36797  path="${complete%% *}"
36798  tmp="$complete EOL"
36799  arguments="${tmp#* }"
36800
36801  # Input might be given as Windows format, start by converting to
36802  # unix format.
36803  new_path=`$CYGPATH -u "$path"`
36804
36805  # Now try to locate executable using which
36806  new_path=`$WHICH "$new_path" 2> /dev/null`
36807  # bat and cmd files are not always considered executable in cygwin causing which
36808  # to not find them
36809  if test "x$new_path" = x \
36810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36812    new_path=`$CYGPATH -u "$path"`
36813  fi
36814  if test "x$new_path" = x; then
36815    # Oops. Which didn't find the executable.
36816    # The splitting of arguments from the executable at a space might have been incorrect,
36817    # since paths with space are more likely in Windows. Give it another try with the whole
36818    # argument.
36819    path="$complete"
36820    arguments="EOL"
36821    new_path=`$CYGPATH -u "$path"`
36822    new_path=`$WHICH "$new_path" 2> /dev/null`
36823    # bat and cmd files are not always considered executable in cygwin causing which
36824    # to not find them
36825    if test "x$new_path" = x \
36826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36828      new_path=`$CYGPATH -u "$path"`
36829    fi
36830    if test "x$new_path" = x; then
36831      # It's still not found. Now this is an unrecoverable error.
36832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36833$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36834      has_space=`$ECHO "$complete" | $GREP " "`
36835      if test "x$has_space" != x; then
36836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36838      fi
36839      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36840    fi
36841  fi
36842
36843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36846  # "foo.exe" is OK but "foo" is an error.
36847  #
36848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36849  # It is also a way to make sure we got the proper file name for the real test later on.
36850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36851  if test "x$test_shortpath" = x; then
36852    # Short path failed, file does not exist as specified.
36853    # Try adding .exe or .cmd
36854    if test -f "${new_path}.exe"; then
36855      input_to_shortpath="${new_path}.exe"
36856    elif test -f "${new_path}.cmd"; then
36857      input_to_shortpath="${new_path}.cmd"
36858    else
36859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36860$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36863      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36864    fi
36865  else
36866    input_to_shortpath="$new_path"
36867  fi
36868
36869  # Call helper function which possibly converts this using DOS-style short mode.
36870  # If so, the updated path is stored in $new_path.
36871  new_path="$input_to_shortpath"
36872
36873  input_path="$input_to_shortpath"
36874  # Check if we need to convert this using DOS-style short mode. If the path
36875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36876  # take no chances and rewrite it.
36877  # Note: m4 eats our [], so we need to use [ and ] instead.
36878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36879  if test "x$has_forbidden_chars" != x; then
36880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36884      # Going to short mode and back again did indeed matter. Since short mode is
36885      # case insensitive, let's make it lowercase to improve readability.
36886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36887      # Now convert it back to Unix-style (cygpath)
36888      input_path=`$CYGPATH -u "$shortmode_path"`
36889      new_path="$input_path"
36890    fi
36891  fi
36892
36893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36894  if test "x$test_cygdrive_prefix" = x; then
36895    # As a simple fix, exclude /usr/bin since it's not a real path.
36896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36898      # a path prefixed by /cygdrive for fixpath to work.
36899      new_path="$CYGWIN_ROOT_PATH$input_path"
36900    fi
36901  fi
36902
36903  # remove trailing .exe if any
36904  new_path="${new_path/%.exe/}"
36905
36906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36907
36908  # First separate the path from the arguments. This will split at the first
36909  # space.
36910  complete="$AS"
36911  path="${complete%% *}"
36912  tmp="$complete EOL"
36913  arguments="${tmp#* }"
36914
36915  # Input might be given as Windows format, start by converting to
36916  # unix format.
36917  new_path="$path"
36918
36919  windows_path="$new_path"
36920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36921    unix_path=`$CYGPATH -u "$windows_path"`
36922    new_path="$unix_path"
36923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36925    new_path="$unix_path"
36926  fi
36927
36928
36929  # Now try to locate executable using which
36930  new_path=`$WHICH "$new_path" 2> /dev/null`
36931
36932  if test "x$new_path" = x; then
36933    # Oops. Which didn't find the executable.
36934    # The splitting of arguments from the executable at a space might have been incorrect,
36935    # since paths with space are more likely in Windows. Give it another try with the whole
36936    # argument.
36937    path="$complete"
36938    arguments="EOL"
36939    new_path="$path"
36940
36941  windows_path="$new_path"
36942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36943    unix_path=`$CYGPATH -u "$windows_path"`
36944    new_path="$unix_path"
36945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36947    new_path="$unix_path"
36948  fi
36949
36950
36951    new_path=`$WHICH "$new_path" 2> /dev/null`
36952    # bat and cmd files are not always considered executable in MSYS causing which
36953    # to not find them
36954    if test "x$new_path" = x \
36955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36957      new_path="$path"
36958
36959  windows_path="$new_path"
36960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36961    unix_path=`$CYGPATH -u "$windows_path"`
36962    new_path="$unix_path"
36963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36965    new_path="$unix_path"
36966  fi
36967
36968    fi
36969
36970    if test "x$new_path" = x; then
36971      # It's still not found. Now this is an unrecoverable error.
36972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36973$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36974      has_space=`$ECHO "$complete" | $GREP " "`
36975      if test "x$has_space" != x; then
36976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36978      fi
36979      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36980    fi
36981  fi
36982
36983  # Now new_path has a complete unix path to the binary
36984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36985    # Keep paths in /bin as-is, but remove trailing .exe if any
36986    new_path="${new_path/%.exe/}"
36987    # Do not save /bin paths to all_fixpath_prefixes!
36988  else
36989    # Not in mixed or Windows style, start by that.
36990    new_path=`cmd //c echo $new_path`
36991
36992  input_path="$new_path"
36993  # Check if we need to convert this using DOS-style short mode. If the path
36994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36995  # take no chances and rewrite it.
36996  # Note: m4 eats our [], so we need to use [ and ] instead.
36997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36998  if test "x$has_forbidden_chars" != x; then
36999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37001  fi
37002
37003    # Output is in $new_path
37004
37005  windows_path="$new_path"
37006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37007    unix_path=`$CYGPATH -u "$windows_path"`
37008    new_path="$unix_path"
37009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37011    new_path="$unix_path"
37012  fi
37013
37014    # remove trailing .exe if any
37015    new_path="${new_path/%.exe/}"
37016
37017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37019  fi
37020
37021    else
37022      # We're on a unix platform. Hooray! :)
37023      # First separate the path from the arguments. This will split at the first
37024      # space.
37025      complete="$AS"
37026      path="${complete%% *}"
37027      tmp="$complete EOL"
37028      arguments="${tmp#* }"
37029
37030      # Cannot rely on the command "which" here since it doesn't always work.
37031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37032      if test -z "$is_absolute_path"; then
37033        # Path to executable is not absolute. Find it.
37034        IFS_save="$IFS"
37035        IFS=:
37036        for p in $PATH; do
37037          if test -f "$p/$path" && test -x "$p/$path"; then
37038            new_path="$p/$path"
37039            break
37040          fi
37041        done
37042        IFS="$IFS_save"
37043      else
37044        # This is an absolute path, we can use it without further modifications.
37045        new_path="$path"
37046      fi
37047
37048      if test "x$new_path" = x; then
37049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37050$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37051        has_space=`$ECHO "$complete" | $GREP " "`
37052        if test "x$has_space" != x; then
37053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37055        fi
37056        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37057      fi
37058    fi
37059
37060    # Now join together the path and the arguments once again
37061    if test "x$arguments" != xEOL; then
37062      new_complete="$new_path ${arguments% *}"
37063    else
37064      new_complete="$new_path"
37065    fi
37066
37067    if test "x$complete" != "x$new_complete"; then
37068      AS="$new_complete"
37069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37070$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37071    fi
37072  fi
37073
37074    if test "x$AS" = x; then
37075      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37076    fi
37077  else
37078    # FIXME: is this correct for microsoft?
37079    AS="$CC -c"
37080  fi
37081
37082
37083  #
37084  # Setup the archiver (AR)
37085  #
37086  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37087    # The corresponding ar tool is lib.exe (used to create static libraries)
37088    # Extract the first word of "lib", so it can be a program name with args.
37089set dummy lib; ac_word=$2
37090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37091$as_echo_n "checking for $ac_word... " >&6; }
37092if ${ac_cv_prog_AR+:} false; then :
37093  $as_echo_n "(cached) " >&6
37094else
37095  if test -n "$AR"; then
37096  ac_cv_prog_AR="$AR" # Let the user override the test.
37097else
37098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37099for as_dir in $PATH
37100do
37101  IFS=$as_save_IFS
37102  test -z "$as_dir" && as_dir=.
37103    for ac_exec_ext in '' $ac_executable_extensions; do
37104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37105    ac_cv_prog_AR="lib"
37106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37107    break 2
37108  fi
37109done
37110  done
37111IFS=$as_save_IFS
37112
37113fi
37114fi
37115AR=$ac_cv_prog_AR
37116if test -n "$AR"; then
37117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37118$as_echo "$AR" >&6; }
37119else
37120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37121$as_echo "no" >&6; }
37122fi
37123
37124
37125  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37126
37127
37128  # Publish this variable in the help.
37129
37130
37131  if [ -z "${AR+x}" ]; then
37132    # The variable is not set by user, try to locate tool using the code snippet
37133    if test -n "$ac_tool_prefix"; then
37134  for ac_prog in ar gcc-ar
37135  do
37136    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37137set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37139$as_echo_n "checking for $ac_word... " >&6; }
37140if ${ac_cv_prog_AR+:} false; then :
37141  $as_echo_n "(cached) " >&6
37142else
37143  if test -n "$AR"; then
37144  ac_cv_prog_AR="$AR" # Let the user override the test.
37145else
37146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37147for as_dir in $PATH
37148do
37149  IFS=$as_save_IFS
37150  test -z "$as_dir" && as_dir=.
37151    for ac_exec_ext in '' $ac_executable_extensions; do
37152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37153    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37155    break 2
37156  fi
37157done
37158  done
37159IFS=$as_save_IFS
37160
37161fi
37162fi
37163AR=$ac_cv_prog_AR
37164if test -n "$AR"; then
37165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37166$as_echo "$AR" >&6; }
37167else
37168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37169$as_echo "no" >&6; }
37170fi
37171
37172
37173    test -n "$AR" && break
37174  done
37175fi
37176if test -z "$AR"; then
37177  ac_ct_AR=$AR
37178  for ac_prog in ar gcc-ar
37179do
37180  # Extract the first word of "$ac_prog", so it can be a program name with args.
37181set dummy $ac_prog; ac_word=$2
37182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37183$as_echo_n "checking for $ac_word... " >&6; }
37184if ${ac_cv_prog_ac_ct_AR+:} false; then :
37185  $as_echo_n "(cached) " >&6
37186else
37187  if test -n "$ac_ct_AR"; then
37188  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37189else
37190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37191for as_dir in $PATH
37192do
37193  IFS=$as_save_IFS
37194  test -z "$as_dir" && as_dir=.
37195    for ac_exec_ext in '' $ac_executable_extensions; do
37196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37197    ac_cv_prog_ac_ct_AR="$ac_prog"
37198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37199    break 2
37200  fi
37201done
37202  done
37203IFS=$as_save_IFS
37204
37205fi
37206fi
37207ac_ct_AR=$ac_cv_prog_ac_ct_AR
37208if test -n "$ac_ct_AR"; then
37209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37210$as_echo "$ac_ct_AR" >&6; }
37211else
37212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37213$as_echo "no" >&6; }
37214fi
37215
37216
37217  test -n "$ac_ct_AR" && break
37218done
37219
37220  if test "x$ac_ct_AR" = x; then
37221    AR=""
37222  else
37223    case $cross_compiling:$ac_tool_warned in
37224yes:)
37225{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37226$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37227ac_tool_warned=yes ;;
37228esac
37229    AR=$ac_ct_AR
37230  fi
37231fi
37232
37233  else
37234    # The variable is set, but is it from the command line or the environment?
37235
37236    # Try to remove the string !AR! from our list.
37237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37239      # If it failed, the variable was not from the command line. Ignore it,
37240      # but warn the user (except for BASH, which is always set by the calling BASH).
37241      if test "xAR" != xBASH; then
37242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37243$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37244      fi
37245      # Try to locate tool using the code snippet
37246      if test -n "$ac_tool_prefix"; then
37247  for ac_prog in ar gcc-ar
37248  do
37249    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37250set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37252$as_echo_n "checking for $ac_word... " >&6; }
37253if ${ac_cv_prog_AR+:} false; then :
37254  $as_echo_n "(cached) " >&6
37255else
37256  if test -n "$AR"; then
37257  ac_cv_prog_AR="$AR" # Let the user override the test.
37258else
37259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37260for as_dir in $PATH
37261do
37262  IFS=$as_save_IFS
37263  test -z "$as_dir" && as_dir=.
37264    for ac_exec_ext in '' $ac_executable_extensions; do
37265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37266    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37268    break 2
37269  fi
37270done
37271  done
37272IFS=$as_save_IFS
37273
37274fi
37275fi
37276AR=$ac_cv_prog_AR
37277if test -n "$AR"; then
37278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37279$as_echo "$AR" >&6; }
37280else
37281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37282$as_echo "no" >&6; }
37283fi
37284
37285
37286    test -n "$AR" && break
37287  done
37288fi
37289if test -z "$AR"; then
37290  ac_ct_AR=$AR
37291  for ac_prog in ar gcc-ar
37292do
37293  # Extract the first word of "$ac_prog", so it can be a program name with args.
37294set dummy $ac_prog; ac_word=$2
37295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37296$as_echo_n "checking for $ac_word... " >&6; }
37297if ${ac_cv_prog_ac_ct_AR+:} false; then :
37298  $as_echo_n "(cached) " >&6
37299else
37300  if test -n "$ac_ct_AR"; then
37301  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37302else
37303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37304for as_dir in $PATH
37305do
37306  IFS=$as_save_IFS
37307  test -z "$as_dir" && as_dir=.
37308    for ac_exec_ext in '' $ac_executable_extensions; do
37309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37310    ac_cv_prog_ac_ct_AR="$ac_prog"
37311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37312    break 2
37313  fi
37314done
37315  done
37316IFS=$as_save_IFS
37317
37318fi
37319fi
37320ac_ct_AR=$ac_cv_prog_ac_ct_AR
37321if test -n "$ac_ct_AR"; then
37322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37323$as_echo "$ac_ct_AR" >&6; }
37324else
37325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37326$as_echo "no" >&6; }
37327fi
37328
37329
37330  test -n "$ac_ct_AR" && break
37331done
37332
37333  if test "x$ac_ct_AR" = x; then
37334    AR=""
37335  else
37336    case $cross_compiling:$ac_tool_warned in
37337yes:)
37338{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37339$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37340ac_tool_warned=yes ;;
37341esac
37342    AR=$ac_ct_AR
37343  fi
37344fi
37345
37346    else
37347      # If it succeeded, then it was overridden by the user. We will use it
37348      # for the tool.
37349
37350      # First remove it from the list of overridden variables, so we can test
37351      # for unknown variables in the end.
37352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37353
37354      # Check if we try to supply an empty value
37355      if test "x$AR" = x; then
37356        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37357$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37359$as_echo_n "checking for AR... " >&6; }
37360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37361$as_echo "disabled" >&6; }
37362      else
37363        # Check if the provided tool contains a complete path.
37364        tool_specified="$AR"
37365        tool_basename="${tool_specified##*/}"
37366        if test "x$tool_basename" = "x$tool_specified"; then
37367          # A command without a complete path is provided, search $PATH.
37368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37369$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37370          # Extract the first word of "$tool_basename", so it can be a program name with args.
37371set dummy $tool_basename; ac_word=$2
37372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37373$as_echo_n "checking for $ac_word... " >&6; }
37374if ${ac_cv_path_AR+:} false; then :
37375  $as_echo_n "(cached) " >&6
37376else
37377  case $AR in
37378  [\\/]* | ?:[\\/]*)
37379  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37380  ;;
37381  *)
37382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37383for as_dir in $PATH
37384do
37385  IFS=$as_save_IFS
37386  test -z "$as_dir" && as_dir=.
37387    for ac_exec_ext in '' $ac_executable_extensions; do
37388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37389    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37391    break 2
37392  fi
37393done
37394  done
37395IFS=$as_save_IFS
37396
37397  ;;
37398esac
37399fi
37400AR=$ac_cv_path_AR
37401if test -n "$AR"; then
37402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37403$as_echo "$AR" >&6; }
37404else
37405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37406$as_echo "no" >&6; }
37407fi
37408
37409
37410          if test "x$AR" = x; then
37411            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37412          fi
37413        else
37414          # Otherwise we believe it is a complete path. Use it as it is.
37415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37416$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37418$as_echo_n "checking for AR... " >&6; }
37419          if test ! -x "$tool_specified"; then
37420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37421$as_echo "not found" >&6; }
37422            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37423          fi
37424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37425$as_echo "$tool_specified" >&6; }
37426        fi
37427      fi
37428    fi
37429
37430  fi
37431
37432
37433  else
37434
37435
37436  # Publish this variable in the help.
37437
37438
37439  if [ -z "${AR+x}" ]; then
37440    # The variable is not set by user, try to locate tool using the code snippet
37441    if test -n "$ac_tool_prefix"; then
37442  for ac_prog in ar
37443  do
37444    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37445set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37447$as_echo_n "checking for $ac_word... " >&6; }
37448if ${ac_cv_prog_AR+:} false; then :
37449  $as_echo_n "(cached) " >&6
37450else
37451  if test -n "$AR"; then
37452  ac_cv_prog_AR="$AR" # Let the user override the test.
37453else
37454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37455for as_dir in $PATH
37456do
37457  IFS=$as_save_IFS
37458  test -z "$as_dir" && as_dir=.
37459    for ac_exec_ext in '' $ac_executable_extensions; do
37460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37461    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37463    break 2
37464  fi
37465done
37466  done
37467IFS=$as_save_IFS
37468
37469fi
37470fi
37471AR=$ac_cv_prog_AR
37472if test -n "$AR"; then
37473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37474$as_echo "$AR" >&6; }
37475else
37476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37477$as_echo "no" >&6; }
37478fi
37479
37480
37481    test -n "$AR" && break
37482  done
37483fi
37484if test -z "$AR"; then
37485  ac_ct_AR=$AR
37486  for ac_prog in ar
37487do
37488  # Extract the first word of "$ac_prog", so it can be a program name with args.
37489set dummy $ac_prog; ac_word=$2
37490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37491$as_echo_n "checking for $ac_word... " >&6; }
37492if ${ac_cv_prog_ac_ct_AR+:} false; then :
37493  $as_echo_n "(cached) " >&6
37494else
37495  if test -n "$ac_ct_AR"; then
37496  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37497else
37498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37499for as_dir in $PATH
37500do
37501  IFS=$as_save_IFS
37502  test -z "$as_dir" && as_dir=.
37503    for ac_exec_ext in '' $ac_executable_extensions; do
37504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37505    ac_cv_prog_ac_ct_AR="$ac_prog"
37506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37507    break 2
37508  fi
37509done
37510  done
37511IFS=$as_save_IFS
37512
37513fi
37514fi
37515ac_ct_AR=$ac_cv_prog_ac_ct_AR
37516if test -n "$ac_ct_AR"; then
37517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37518$as_echo "$ac_ct_AR" >&6; }
37519else
37520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37521$as_echo "no" >&6; }
37522fi
37523
37524
37525  test -n "$ac_ct_AR" && break
37526done
37527
37528  if test "x$ac_ct_AR" = x; then
37529    AR=""
37530  else
37531    case $cross_compiling:$ac_tool_warned in
37532yes:)
37533{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37534$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37535ac_tool_warned=yes ;;
37536esac
37537    AR=$ac_ct_AR
37538  fi
37539fi
37540
37541  else
37542    # The variable is set, but is it from the command line or the environment?
37543
37544    # Try to remove the string !AR! from our list.
37545    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37546    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37547      # If it failed, the variable was not from the command line. Ignore it,
37548      # but warn the user (except for BASH, which is always set by the calling BASH).
37549      if test "xAR" != xBASH; then
37550        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37551$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37552      fi
37553      # Try to locate tool using the code snippet
37554      if test -n "$ac_tool_prefix"; then
37555  for ac_prog in ar
37556  do
37557    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37558set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37560$as_echo_n "checking for $ac_word... " >&6; }
37561if ${ac_cv_prog_AR+:} false; then :
37562  $as_echo_n "(cached) " >&6
37563else
37564  if test -n "$AR"; then
37565  ac_cv_prog_AR="$AR" # Let the user override the test.
37566else
37567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37568for as_dir in $PATH
37569do
37570  IFS=$as_save_IFS
37571  test -z "$as_dir" && as_dir=.
37572    for ac_exec_ext in '' $ac_executable_extensions; do
37573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37574    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37576    break 2
37577  fi
37578done
37579  done
37580IFS=$as_save_IFS
37581
37582fi
37583fi
37584AR=$ac_cv_prog_AR
37585if test -n "$AR"; then
37586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37587$as_echo "$AR" >&6; }
37588else
37589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37590$as_echo "no" >&6; }
37591fi
37592
37593
37594    test -n "$AR" && break
37595  done
37596fi
37597if test -z "$AR"; then
37598  ac_ct_AR=$AR
37599  for ac_prog in ar
37600do
37601  # Extract the first word of "$ac_prog", so it can be a program name with args.
37602set dummy $ac_prog; ac_word=$2
37603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37604$as_echo_n "checking for $ac_word... " >&6; }
37605if ${ac_cv_prog_ac_ct_AR+:} false; then :
37606  $as_echo_n "(cached) " >&6
37607else
37608  if test -n "$ac_ct_AR"; then
37609  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37610else
37611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37612for as_dir in $PATH
37613do
37614  IFS=$as_save_IFS
37615  test -z "$as_dir" && as_dir=.
37616    for ac_exec_ext in '' $ac_executable_extensions; do
37617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37618    ac_cv_prog_ac_ct_AR="$ac_prog"
37619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37620    break 2
37621  fi
37622done
37623  done
37624IFS=$as_save_IFS
37625
37626fi
37627fi
37628ac_ct_AR=$ac_cv_prog_ac_ct_AR
37629if test -n "$ac_ct_AR"; then
37630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37631$as_echo "$ac_ct_AR" >&6; }
37632else
37633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37634$as_echo "no" >&6; }
37635fi
37636
37637
37638  test -n "$ac_ct_AR" && break
37639done
37640
37641  if test "x$ac_ct_AR" = x; then
37642    AR=""
37643  else
37644    case $cross_compiling:$ac_tool_warned in
37645yes:)
37646{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37647$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37648ac_tool_warned=yes ;;
37649esac
37650    AR=$ac_ct_AR
37651  fi
37652fi
37653
37654    else
37655      # If it succeeded, then it was overridden by the user. We will use it
37656      # for the tool.
37657
37658      # First remove it from the list of overridden variables, so we can test
37659      # for unknown variables in the end.
37660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37661
37662      # Check if we try to supply an empty value
37663      if test "x$AR" = x; then
37664        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37665$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37667$as_echo_n "checking for AR... " >&6; }
37668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37669$as_echo "disabled" >&6; }
37670      else
37671        # Check if the provided tool contains a complete path.
37672        tool_specified="$AR"
37673        tool_basename="${tool_specified##*/}"
37674        if test "x$tool_basename" = "x$tool_specified"; then
37675          # A command without a complete path is provided, search $PATH.
37676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37677$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37678          # Extract the first word of "$tool_basename", so it can be a program name with args.
37679set dummy $tool_basename; ac_word=$2
37680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37681$as_echo_n "checking for $ac_word... " >&6; }
37682if ${ac_cv_path_AR+:} false; then :
37683  $as_echo_n "(cached) " >&6
37684else
37685  case $AR in
37686  [\\/]* | ?:[\\/]*)
37687  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37688  ;;
37689  *)
37690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37691for as_dir in $PATH
37692do
37693  IFS=$as_save_IFS
37694  test -z "$as_dir" && as_dir=.
37695    for ac_exec_ext in '' $ac_executable_extensions; do
37696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37697    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37699    break 2
37700  fi
37701done
37702  done
37703IFS=$as_save_IFS
37704
37705  ;;
37706esac
37707fi
37708AR=$ac_cv_path_AR
37709if test -n "$AR"; then
37710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37711$as_echo "$AR" >&6; }
37712else
37713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37714$as_echo "no" >&6; }
37715fi
37716
37717
37718          if test "x$AR" = x; then
37719            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37720          fi
37721        else
37722          # Otherwise we believe it is a complete path. Use it as it is.
37723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37724$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37725          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37726$as_echo_n "checking for AR... " >&6; }
37727          if test ! -x "$tool_specified"; then
37728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37729$as_echo "not found" >&6; }
37730            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37731          fi
37732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37733$as_echo "$tool_specified" >&6; }
37734        fi
37735      fi
37736    fi
37737
37738  fi
37739
37740
37741  fi
37742
37743  # Only process if variable expands to non-empty
37744
37745  if test "x$AR" != x; then
37746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37747
37748  # First separate the path from the arguments. This will split at the first
37749  # space.
37750  complete="$AR"
37751  path="${complete%% *}"
37752  tmp="$complete EOL"
37753  arguments="${tmp#* }"
37754
37755  # Input might be given as Windows format, start by converting to
37756  # unix format.
37757  new_path=`$CYGPATH -u "$path"`
37758
37759  # Now try to locate executable using which
37760  new_path=`$WHICH "$new_path" 2> /dev/null`
37761  # bat and cmd files are not always considered executable in cygwin causing which
37762  # to not find them
37763  if test "x$new_path" = x \
37764      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37765      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37766    new_path=`$CYGPATH -u "$path"`
37767  fi
37768  if test "x$new_path" = x; then
37769    # Oops. Which didn't find the executable.
37770    # The splitting of arguments from the executable at a space might have been incorrect,
37771    # since paths with space are more likely in Windows. Give it another try with the whole
37772    # argument.
37773    path="$complete"
37774    arguments="EOL"
37775    new_path=`$CYGPATH -u "$path"`
37776    new_path=`$WHICH "$new_path" 2> /dev/null`
37777    # bat and cmd files are not always considered executable in cygwin causing which
37778    # to not find them
37779    if test "x$new_path" = x \
37780        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37781        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37782      new_path=`$CYGPATH -u "$path"`
37783    fi
37784    if test "x$new_path" = x; then
37785      # It's still not found. Now this is an unrecoverable error.
37786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37787$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37788      has_space=`$ECHO "$complete" | $GREP " "`
37789      if test "x$has_space" != x; then
37790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37792      fi
37793      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37794    fi
37795  fi
37796
37797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37800  # "foo.exe" is OK but "foo" is an error.
37801  #
37802  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37803  # It is also a way to make sure we got the proper file name for the real test later on.
37804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37805  if test "x$test_shortpath" = x; then
37806    # Short path failed, file does not exist as specified.
37807    # Try adding .exe or .cmd
37808    if test -f "${new_path}.exe"; then
37809      input_to_shortpath="${new_path}.exe"
37810    elif test -f "${new_path}.cmd"; then
37811      input_to_shortpath="${new_path}.cmd"
37812    else
37813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37814$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37815      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37816$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37817      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37818    fi
37819  else
37820    input_to_shortpath="$new_path"
37821  fi
37822
37823  # Call helper function which possibly converts this using DOS-style short mode.
37824  # If so, the updated path is stored in $new_path.
37825  new_path="$input_to_shortpath"
37826
37827  input_path="$input_to_shortpath"
37828  # Check if we need to convert this using DOS-style short mode. If the path
37829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37830  # take no chances and rewrite it.
37831  # Note: m4 eats our [], so we need to use [ and ] instead.
37832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37833  if test "x$has_forbidden_chars" != x; then
37834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37838      # Going to short mode and back again did indeed matter. Since short mode is
37839      # case insensitive, let's make it lowercase to improve readability.
37840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37841      # Now convert it back to Unix-style (cygpath)
37842      input_path=`$CYGPATH -u "$shortmode_path"`
37843      new_path="$input_path"
37844    fi
37845  fi
37846
37847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37848  if test "x$test_cygdrive_prefix" = x; then
37849    # As a simple fix, exclude /usr/bin since it's not a real path.
37850    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37852      # a path prefixed by /cygdrive for fixpath to work.
37853      new_path="$CYGWIN_ROOT_PATH$input_path"
37854    fi
37855  fi
37856
37857  # remove trailing .exe if any
37858  new_path="${new_path/%.exe/}"
37859
37860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37861
37862  # First separate the path from the arguments. This will split at the first
37863  # space.
37864  complete="$AR"
37865  path="${complete%% *}"
37866  tmp="$complete EOL"
37867  arguments="${tmp#* }"
37868
37869  # Input might be given as Windows format, start by converting to
37870  # unix format.
37871  new_path="$path"
37872
37873  windows_path="$new_path"
37874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37875    unix_path=`$CYGPATH -u "$windows_path"`
37876    new_path="$unix_path"
37877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37879    new_path="$unix_path"
37880  fi
37881
37882
37883  # Now try to locate executable using which
37884  new_path=`$WHICH "$new_path" 2> /dev/null`
37885
37886  if test "x$new_path" = x; then
37887    # Oops. Which didn't find the executable.
37888    # The splitting of arguments from the executable at a space might have been incorrect,
37889    # since paths with space are more likely in Windows. Give it another try with the whole
37890    # argument.
37891    path="$complete"
37892    arguments="EOL"
37893    new_path="$path"
37894
37895  windows_path="$new_path"
37896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37897    unix_path=`$CYGPATH -u "$windows_path"`
37898    new_path="$unix_path"
37899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37901    new_path="$unix_path"
37902  fi
37903
37904
37905    new_path=`$WHICH "$new_path" 2> /dev/null`
37906    # bat and cmd files are not always considered executable in MSYS causing which
37907    # to not find them
37908    if test "x$new_path" = x \
37909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37911      new_path="$path"
37912
37913  windows_path="$new_path"
37914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37915    unix_path=`$CYGPATH -u "$windows_path"`
37916    new_path="$unix_path"
37917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37919    new_path="$unix_path"
37920  fi
37921
37922    fi
37923
37924    if test "x$new_path" = x; then
37925      # It's still not found. Now this is an unrecoverable error.
37926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37927$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37928      has_space=`$ECHO "$complete" | $GREP " "`
37929      if test "x$has_space" != x; then
37930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37932      fi
37933      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37934    fi
37935  fi
37936
37937  # Now new_path has a complete unix path to the binary
37938  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37939    # Keep paths in /bin as-is, but remove trailing .exe if any
37940    new_path="${new_path/%.exe/}"
37941    # Do not save /bin paths to all_fixpath_prefixes!
37942  else
37943    # Not in mixed or Windows style, start by that.
37944    new_path=`cmd //c echo $new_path`
37945
37946  input_path="$new_path"
37947  # Check if we need to convert this using DOS-style short mode. If the path
37948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37949  # take no chances and rewrite it.
37950  # Note: m4 eats our [], so we need to use [ and ] instead.
37951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37952  if test "x$has_forbidden_chars" != x; then
37953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37955  fi
37956
37957    # Output is in $new_path
37958
37959  windows_path="$new_path"
37960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37961    unix_path=`$CYGPATH -u "$windows_path"`
37962    new_path="$unix_path"
37963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37965    new_path="$unix_path"
37966  fi
37967
37968    # remove trailing .exe if any
37969    new_path="${new_path/%.exe/}"
37970
37971    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37972    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37973  fi
37974
37975    else
37976      # We're on a unix platform. Hooray! :)
37977      # First separate the path from the arguments. This will split at the first
37978      # space.
37979      complete="$AR"
37980      path="${complete%% *}"
37981      tmp="$complete EOL"
37982      arguments="${tmp#* }"
37983
37984      # Cannot rely on the command "which" here since it doesn't always work.
37985      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37986      if test -z "$is_absolute_path"; then
37987        # Path to executable is not absolute. Find it.
37988        IFS_save="$IFS"
37989        IFS=:
37990        for p in $PATH; do
37991          if test -f "$p/$path" && test -x "$p/$path"; then
37992            new_path="$p/$path"
37993            break
37994          fi
37995        done
37996        IFS="$IFS_save"
37997      else
37998        # This is an absolute path, we can use it without further modifications.
37999        new_path="$path"
38000      fi
38001
38002      if test "x$new_path" = x; then
38003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38004$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38005        has_space=`$ECHO "$complete" | $GREP " "`
38006        if test "x$has_space" != x; then
38007          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38008$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38009        fi
38010        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38011      fi
38012    fi
38013
38014    # Now join together the path and the arguments once again
38015    if test "x$arguments" != xEOL; then
38016      new_complete="$new_path ${arguments% *}"
38017    else
38018      new_complete="$new_path"
38019    fi
38020
38021    if test "x$complete" != "x$new_complete"; then
38022      AR="$new_complete"
38023      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38024$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38025    fi
38026  fi
38027
38028
38029
38030  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38031
38032
38033  # Publish this variable in the help.
38034
38035
38036  if [ -z "${LIPO+x}" ]; then
38037    # The variable is not set by user, try to locate tool using the code snippet
38038    for ac_prog in lipo
38039do
38040  # Extract the first word of "$ac_prog", so it can be a program name with args.
38041set dummy $ac_prog; ac_word=$2
38042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38043$as_echo_n "checking for $ac_word... " >&6; }
38044if ${ac_cv_path_LIPO+:} false; then :
38045  $as_echo_n "(cached) " >&6
38046else
38047  case $LIPO in
38048  [\\/]* | ?:[\\/]*)
38049  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38050  ;;
38051  *)
38052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38053for as_dir in $PATH
38054do
38055  IFS=$as_save_IFS
38056  test -z "$as_dir" && as_dir=.
38057    for ac_exec_ext in '' $ac_executable_extensions; do
38058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38059    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38061    break 2
38062  fi
38063done
38064  done
38065IFS=$as_save_IFS
38066
38067  ;;
38068esac
38069fi
38070LIPO=$ac_cv_path_LIPO
38071if test -n "$LIPO"; then
38072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38073$as_echo "$LIPO" >&6; }
38074else
38075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38076$as_echo "no" >&6; }
38077fi
38078
38079
38080  test -n "$LIPO" && break
38081done
38082
38083  else
38084    # The variable is set, but is it from the command line or the environment?
38085
38086    # Try to remove the string !LIPO! from our list.
38087    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38088    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38089      # If it failed, the variable was not from the command line. Ignore it,
38090      # but warn the user (except for BASH, which is always set by the calling BASH).
38091      if test "xLIPO" != xBASH; then
38092        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38093$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38094      fi
38095      # Try to locate tool using the code snippet
38096      for ac_prog in lipo
38097do
38098  # Extract the first word of "$ac_prog", so it can be a program name with args.
38099set dummy $ac_prog; ac_word=$2
38100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38101$as_echo_n "checking for $ac_word... " >&6; }
38102if ${ac_cv_path_LIPO+:} false; then :
38103  $as_echo_n "(cached) " >&6
38104else
38105  case $LIPO in
38106  [\\/]* | ?:[\\/]*)
38107  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38108  ;;
38109  *)
38110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38111for as_dir in $PATH
38112do
38113  IFS=$as_save_IFS
38114  test -z "$as_dir" && as_dir=.
38115    for ac_exec_ext in '' $ac_executable_extensions; do
38116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38117    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38119    break 2
38120  fi
38121done
38122  done
38123IFS=$as_save_IFS
38124
38125  ;;
38126esac
38127fi
38128LIPO=$ac_cv_path_LIPO
38129if test -n "$LIPO"; then
38130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38131$as_echo "$LIPO" >&6; }
38132else
38133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38134$as_echo "no" >&6; }
38135fi
38136
38137
38138  test -n "$LIPO" && break
38139done
38140
38141    else
38142      # If it succeeded, then it was overridden by the user. We will use it
38143      # for the tool.
38144
38145      # First remove it from the list of overridden variables, so we can test
38146      # for unknown variables in the end.
38147      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38148
38149      # Check if we try to supply an empty value
38150      if test "x$LIPO" = x; then
38151        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38152$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38154$as_echo_n "checking for LIPO... " >&6; }
38155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38156$as_echo "disabled" >&6; }
38157      else
38158        # Check if the provided tool contains a complete path.
38159        tool_specified="$LIPO"
38160        tool_basename="${tool_specified##*/}"
38161        if test "x$tool_basename" = "x$tool_specified"; then
38162          # A command without a complete path is provided, search $PATH.
38163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38164$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38165          # Extract the first word of "$tool_basename", so it can be a program name with args.
38166set dummy $tool_basename; ac_word=$2
38167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38168$as_echo_n "checking for $ac_word... " >&6; }
38169if ${ac_cv_path_LIPO+:} false; then :
38170  $as_echo_n "(cached) " >&6
38171else
38172  case $LIPO in
38173  [\\/]* | ?:[\\/]*)
38174  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38175  ;;
38176  *)
38177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38178for as_dir in $PATH
38179do
38180  IFS=$as_save_IFS
38181  test -z "$as_dir" && as_dir=.
38182    for ac_exec_ext in '' $ac_executable_extensions; do
38183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38184    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38186    break 2
38187  fi
38188done
38189  done
38190IFS=$as_save_IFS
38191
38192  ;;
38193esac
38194fi
38195LIPO=$ac_cv_path_LIPO
38196if test -n "$LIPO"; then
38197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38198$as_echo "$LIPO" >&6; }
38199else
38200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38201$as_echo "no" >&6; }
38202fi
38203
38204
38205          if test "x$LIPO" = x; then
38206            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38207          fi
38208        else
38209          # Otherwise we believe it is a complete path. Use it as it is.
38210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38211$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38212          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38213$as_echo_n "checking for LIPO... " >&6; }
38214          if test ! -x "$tool_specified"; then
38215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38216$as_echo "not found" >&6; }
38217            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38218          fi
38219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38220$as_echo "$tool_specified" >&6; }
38221        fi
38222      fi
38223    fi
38224
38225  fi
38226
38227
38228
38229  # Only process if variable expands to non-empty
38230
38231  if test "x$LIPO" != x; then
38232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38233
38234  # First separate the path from the arguments. This will split at the first
38235  # space.
38236  complete="$LIPO"
38237  path="${complete%% *}"
38238  tmp="$complete EOL"
38239  arguments="${tmp#* }"
38240
38241  # Input might be given as Windows format, start by converting to
38242  # unix format.
38243  new_path=`$CYGPATH -u "$path"`
38244
38245  # Now try to locate executable using which
38246  new_path=`$WHICH "$new_path" 2> /dev/null`
38247  # bat and cmd files are not always considered executable in cygwin causing which
38248  # to not find them
38249  if test "x$new_path" = x \
38250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38252    new_path=`$CYGPATH -u "$path"`
38253  fi
38254  if test "x$new_path" = x; then
38255    # Oops. Which didn't find the executable.
38256    # The splitting of arguments from the executable at a space might have been incorrect,
38257    # since paths with space are more likely in Windows. Give it another try with the whole
38258    # argument.
38259    path="$complete"
38260    arguments="EOL"
38261    new_path=`$CYGPATH -u "$path"`
38262    new_path=`$WHICH "$new_path" 2> /dev/null`
38263    # bat and cmd files are not always considered executable in cygwin causing which
38264    # to not find them
38265    if test "x$new_path" = x \
38266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38268      new_path=`$CYGPATH -u "$path"`
38269    fi
38270    if test "x$new_path" = x; then
38271      # It's still not found. Now this is an unrecoverable error.
38272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38273$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38274      has_space=`$ECHO "$complete" | $GREP " "`
38275      if test "x$has_space" != x; then
38276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38278      fi
38279      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38280    fi
38281  fi
38282
38283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38286  # "foo.exe" is OK but "foo" is an error.
38287  #
38288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38289  # It is also a way to make sure we got the proper file name for the real test later on.
38290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38291  if test "x$test_shortpath" = x; then
38292    # Short path failed, file does not exist as specified.
38293    # Try adding .exe or .cmd
38294    if test -f "${new_path}.exe"; then
38295      input_to_shortpath="${new_path}.exe"
38296    elif test -f "${new_path}.cmd"; then
38297      input_to_shortpath="${new_path}.cmd"
38298    else
38299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38300$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38303      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38304    fi
38305  else
38306    input_to_shortpath="$new_path"
38307  fi
38308
38309  # Call helper function which possibly converts this using DOS-style short mode.
38310  # If so, the updated path is stored in $new_path.
38311  new_path="$input_to_shortpath"
38312
38313  input_path="$input_to_shortpath"
38314  # Check if we need to convert this using DOS-style short mode. If the path
38315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38316  # take no chances and rewrite it.
38317  # Note: m4 eats our [], so we need to use [ and ] instead.
38318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38319  if test "x$has_forbidden_chars" != x; then
38320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38324      # Going to short mode and back again did indeed matter. Since short mode is
38325      # case insensitive, let's make it lowercase to improve readability.
38326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38327      # Now convert it back to Unix-style (cygpath)
38328      input_path=`$CYGPATH -u "$shortmode_path"`
38329      new_path="$input_path"
38330    fi
38331  fi
38332
38333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38334  if test "x$test_cygdrive_prefix" = x; then
38335    # As a simple fix, exclude /usr/bin since it's not a real path.
38336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38338      # a path prefixed by /cygdrive for fixpath to work.
38339      new_path="$CYGWIN_ROOT_PATH$input_path"
38340    fi
38341  fi
38342
38343  # remove trailing .exe if any
38344  new_path="${new_path/%.exe/}"
38345
38346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38347
38348  # First separate the path from the arguments. This will split at the first
38349  # space.
38350  complete="$LIPO"
38351  path="${complete%% *}"
38352  tmp="$complete EOL"
38353  arguments="${tmp#* }"
38354
38355  # Input might be given as Windows format, start by converting to
38356  # unix format.
38357  new_path="$path"
38358
38359  windows_path="$new_path"
38360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38361    unix_path=`$CYGPATH -u "$windows_path"`
38362    new_path="$unix_path"
38363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38365    new_path="$unix_path"
38366  fi
38367
38368
38369  # Now try to locate executable using which
38370  new_path=`$WHICH "$new_path" 2> /dev/null`
38371
38372  if test "x$new_path" = x; then
38373    # Oops. Which didn't find the executable.
38374    # The splitting of arguments from the executable at a space might have been incorrect,
38375    # since paths with space are more likely in Windows. Give it another try with the whole
38376    # argument.
38377    path="$complete"
38378    arguments="EOL"
38379    new_path="$path"
38380
38381  windows_path="$new_path"
38382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38383    unix_path=`$CYGPATH -u "$windows_path"`
38384    new_path="$unix_path"
38385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38387    new_path="$unix_path"
38388  fi
38389
38390
38391    new_path=`$WHICH "$new_path" 2> /dev/null`
38392    # bat and cmd files are not always considered executable in MSYS causing which
38393    # to not find them
38394    if test "x$new_path" = x \
38395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38397      new_path="$path"
38398
38399  windows_path="$new_path"
38400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38401    unix_path=`$CYGPATH -u "$windows_path"`
38402    new_path="$unix_path"
38403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38405    new_path="$unix_path"
38406  fi
38407
38408    fi
38409
38410    if test "x$new_path" = x; then
38411      # It's still not found. Now this is an unrecoverable error.
38412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38413$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38414      has_space=`$ECHO "$complete" | $GREP " "`
38415      if test "x$has_space" != x; then
38416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38418      fi
38419      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38420    fi
38421  fi
38422
38423  # Now new_path has a complete unix path to the binary
38424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38425    # Keep paths in /bin as-is, but remove trailing .exe if any
38426    new_path="${new_path/%.exe/}"
38427    # Do not save /bin paths to all_fixpath_prefixes!
38428  else
38429    # Not in mixed or Windows style, start by that.
38430    new_path=`cmd //c echo $new_path`
38431
38432  input_path="$new_path"
38433  # Check if we need to convert this using DOS-style short mode. If the path
38434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38435  # take no chances and rewrite it.
38436  # Note: m4 eats our [], so we need to use [ and ] instead.
38437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38438  if test "x$has_forbidden_chars" != x; then
38439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38441  fi
38442
38443    # Output is in $new_path
38444
38445  windows_path="$new_path"
38446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38447    unix_path=`$CYGPATH -u "$windows_path"`
38448    new_path="$unix_path"
38449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38451    new_path="$unix_path"
38452  fi
38453
38454    # remove trailing .exe if any
38455    new_path="${new_path/%.exe/}"
38456
38457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38459  fi
38460
38461    else
38462      # We're on a unix platform. Hooray! :)
38463      # First separate the path from the arguments. This will split at the first
38464      # space.
38465      complete="$LIPO"
38466      path="${complete%% *}"
38467      tmp="$complete EOL"
38468      arguments="${tmp#* }"
38469
38470      # Cannot rely on the command "which" here since it doesn't always work.
38471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38472      if test -z "$is_absolute_path"; then
38473        # Path to executable is not absolute. Find it.
38474        IFS_save="$IFS"
38475        IFS=:
38476        for p in $PATH; do
38477          if test -f "$p/$path" && test -x "$p/$path"; then
38478            new_path="$p/$path"
38479            break
38480          fi
38481        done
38482        IFS="$IFS_save"
38483      else
38484        # This is an absolute path, we can use it without further modifications.
38485        new_path="$path"
38486      fi
38487
38488      if test "x$new_path" = x; then
38489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38490$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38491        has_space=`$ECHO "$complete" | $GREP " "`
38492        if test "x$has_space" != x; then
38493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38495        fi
38496        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38497      fi
38498    fi
38499
38500    # Now join together the path and the arguments once again
38501    if test "x$arguments" != xEOL; then
38502      new_complete="$new_path ${arguments% *}"
38503    else
38504      new_complete="$new_path"
38505    fi
38506
38507    if test "x$complete" != "x$new_complete"; then
38508      LIPO="$new_complete"
38509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38510$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38511    fi
38512  fi
38513
38514  fi
38515
38516  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38517    # Extract the first word of "mt", so it can be a program name with args.
38518set dummy mt; ac_word=$2
38519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38520$as_echo_n "checking for $ac_word... " >&6; }
38521if ${ac_cv_prog_MT+:} false; then :
38522  $as_echo_n "(cached) " >&6
38523else
38524  if test -n "$MT"; then
38525  ac_cv_prog_MT="$MT" # Let the user override the test.
38526else
38527  ac_prog_rejected=no
38528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38529for as_dir in $PATH
38530do
38531  IFS=$as_save_IFS
38532  test -z "$as_dir" && as_dir=.
38533    for ac_exec_ext in '' $ac_executable_extensions; do
38534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38535    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38536       ac_prog_rejected=yes
38537       continue
38538     fi
38539    ac_cv_prog_MT="mt"
38540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38541    break 2
38542  fi
38543done
38544  done
38545IFS=$as_save_IFS
38546
38547if test $ac_prog_rejected = yes; then
38548  # We found a bogon in the path, so make sure we never use it.
38549  set dummy $ac_cv_prog_MT
38550  shift
38551  if test $# != 0; then
38552    # We chose a different compiler from the bogus one.
38553    # However, it has the same basename, so the bogon will be chosen
38554    # first if we set MT to just the basename; use the full file name.
38555    shift
38556    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38557  fi
38558fi
38559fi
38560fi
38561MT=$ac_cv_prog_MT
38562if test -n "$MT"; then
38563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38564$as_echo "$MT" >&6; }
38565else
38566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38567$as_echo "no" >&6; }
38568fi
38569
38570
38571
38572  # Only process if variable expands to non-empty
38573
38574  if test "x$MT" != x; then
38575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38576
38577  # First separate the path from the arguments. This will split at the first
38578  # space.
38579  complete="$MT"
38580  path="${complete%% *}"
38581  tmp="$complete EOL"
38582  arguments="${tmp#* }"
38583
38584  # Input might be given as Windows format, start by converting to
38585  # unix format.
38586  new_path=`$CYGPATH -u "$path"`
38587
38588  # Now try to locate executable using which
38589  new_path=`$WHICH "$new_path" 2> /dev/null`
38590  # bat and cmd files are not always considered executable in cygwin causing which
38591  # to not find them
38592  if test "x$new_path" = x \
38593      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38594      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38595    new_path=`$CYGPATH -u "$path"`
38596  fi
38597  if test "x$new_path" = x; then
38598    # Oops. Which didn't find the executable.
38599    # The splitting of arguments from the executable at a space might have been incorrect,
38600    # since paths with space are more likely in Windows. Give it another try with the whole
38601    # argument.
38602    path="$complete"
38603    arguments="EOL"
38604    new_path=`$CYGPATH -u "$path"`
38605    new_path=`$WHICH "$new_path" 2> /dev/null`
38606    # bat and cmd files are not always considered executable in cygwin causing which
38607    # to not find them
38608    if test "x$new_path" = x \
38609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38611      new_path=`$CYGPATH -u "$path"`
38612    fi
38613    if test "x$new_path" = x; then
38614      # It's still not found. Now this is an unrecoverable error.
38615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38616$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38617      has_space=`$ECHO "$complete" | $GREP " "`
38618      if test "x$has_space" != x; then
38619        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38621      fi
38622      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38623    fi
38624  fi
38625
38626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38629  # "foo.exe" is OK but "foo" is an error.
38630  #
38631  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38632  # It is also a way to make sure we got the proper file name for the real test later on.
38633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38634  if test "x$test_shortpath" = x; then
38635    # Short path failed, file does not exist as specified.
38636    # Try adding .exe or .cmd
38637    if test -f "${new_path}.exe"; then
38638      input_to_shortpath="${new_path}.exe"
38639    elif test -f "${new_path}.cmd"; then
38640      input_to_shortpath="${new_path}.cmd"
38641    else
38642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38643$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38644      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38645$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38646      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38647    fi
38648  else
38649    input_to_shortpath="$new_path"
38650  fi
38651
38652  # Call helper function which possibly converts this using DOS-style short mode.
38653  # If so, the updated path is stored in $new_path.
38654  new_path="$input_to_shortpath"
38655
38656  input_path="$input_to_shortpath"
38657  # Check if we need to convert this using DOS-style short mode. If the path
38658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38659  # take no chances and rewrite it.
38660  # Note: m4 eats our [], so we need to use [ and ] instead.
38661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38662  if test "x$has_forbidden_chars" != x; then
38663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38667      # Going to short mode and back again did indeed matter. Since short mode is
38668      # case insensitive, let's make it lowercase to improve readability.
38669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38670      # Now convert it back to Unix-style (cygpath)
38671      input_path=`$CYGPATH -u "$shortmode_path"`
38672      new_path="$input_path"
38673    fi
38674  fi
38675
38676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38677  if test "x$test_cygdrive_prefix" = x; then
38678    # As a simple fix, exclude /usr/bin since it's not a real path.
38679    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38681      # a path prefixed by /cygdrive for fixpath to work.
38682      new_path="$CYGWIN_ROOT_PATH$input_path"
38683    fi
38684  fi
38685
38686  # remove trailing .exe if any
38687  new_path="${new_path/%.exe/}"
38688
38689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38690
38691  # First separate the path from the arguments. This will split at the first
38692  # space.
38693  complete="$MT"
38694  path="${complete%% *}"
38695  tmp="$complete EOL"
38696  arguments="${tmp#* }"
38697
38698  # Input might be given as Windows format, start by converting to
38699  # unix format.
38700  new_path="$path"
38701
38702  windows_path="$new_path"
38703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38704    unix_path=`$CYGPATH -u "$windows_path"`
38705    new_path="$unix_path"
38706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38708    new_path="$unix_path"
38709  fi
38710
38711
38712  # Now try to locate executable using which
38713  new_path=`$WHICH "$new_path" 2> /dev/null`
38714
38715  if test "x$new_path" = x; then
38716    # Oops. Which didn't find the executable.
38717    # The splitting of arguments from the executable at a space might have been incorrect,
38718    # since paths with space are more likely in Windows. Give it another try with the whole
38719    # argument.
38720    path="$complete"
38721    arguments="EOL"
38722    new_path="$path"
38723
38724  windows_path="$new_path"
38725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38726    unix_path=`$CYGPATH -u "$windows_path"`
38727    new_path="$unix_path"
38728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38730    new_path="$unix_path"
38731  fi
38732
38733
38734    new_path=`$WHICH "$new_path" 2> /dev/null`
38735    # bat and cmd files are not always considered executable in MSYS causing which
38736    # to not find them
38737    if test "x$new_path" = x \
38738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38740      new_path="$path"
38741
38742  windows_path="$new_path"
38743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38744    unix_path=`$CYGPATH -u "$windows_path"`
38745    new_path="$unix_path"
38746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38748    new_path="$unix_path"
38749  fi
38750
38751    fi
38752
38753    if test "x$new_path" = x; then
38754      # It's still not found. Now this is an unrecoverable error.
38755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38756$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38757      has_space=`$ECHO "$complete" | $GREP " "`
38758      if test "x$has_space" != x; then
38759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38761      fi
38762      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38763    fi
38764  fi
38765
38766  # Now new_path has a complete unix path to the binary
38767  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38768    # Keep paths in /bin as-is, but remove trailing .exe if any
38769    new_path="${new_path/%.exe/}"
38770    # Do not save /bin paths to all_fixpath_prefixes!
38771  else
38772    # Not in mixed or Windows style, start by that.
38773    new_path=`cmd //c echo $new_path`
38774
38775  input_path="$new_path"
38776  # Check if we need to convert this using DOS-style short mode. If the path
38777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38778  # take no chances and rewrite it.
38779  # Note: m4 eats our [], so we need to use [ and ] instead.
38780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38781  if test "x$has_forbidden_chars" != x; then
38782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38784  fi
38785
38786    # Output is in $new_path
38787
38788  windows_path="$new_path"
38789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38790    unix_path=`$CYGPATH -u "$windows_path"`
38791    new_path="$unix_path"
38792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38794    new_path="$unix_path"
38795  fi
38796
38797    # remove trailing .exe if any
38798    new_path="${new_path/%.exe/}"
38799
38800    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38801    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38802  fi
38803
38804    else
38805      # We're on a unix platform. Hooray! :)
38806      # First separate the path from the arguments. This will split at the first
38807      # space.
38808      complete="$MT"
38809      path="${complete%% *}"
38810      tmp="$complete EOL"
38811      arguments="${tmp#* }"
38812
38813      # Cannot rely on the command "which" here since it doesn't always work.
38814      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38815      if test -z "$is_absolute_path"; then
38816        # Path to executable is not absolute. Find it.
38817        IFS_save="$IFS"
38818        IFS=:
38819        for p in $PATH; do
38820          if test -f "$p/$path" && test -x "$p/$path"; then
38821            new_path="$p/$path"
38822            break
38823          fi
38824        done
38825        IFS="$IFS_save"
38826      else
38827        # This is an absolute path, we can use it without further modifications.
38828        new_path="$path"
38829      fi
38830
38831      if test "x$new_path" = x; then
38832        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38833$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38834        has_space=`$ECHO "$complete" | $GREP " "`
38835        if test "x$has_space" != x; then
38836          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38837$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38838        fi
38839        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38840      fi
38841    fi
38842
38843    # Now join together the path and the arguments once again
38844    if test "x$arguments" != xEOL; then
38845      new_complete="$new_path ${arguments% *}"
38846    else
38847      new_complete="$new_path"
38848    fi
38849
38850    if test "x$complete" != "x$new_complete"; then
38851      MT="$new_complete"
38852      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38853$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38854    fi
38855  fi
38856
38857    # Setup the resource compiler (RC)
38858    # Extract the first word of "rc", so it can be a program name with args.
38859set dummy rc; ac_word=$2
38860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38861$as_echo_n "checking for $ac_word... " >&6; }
38862if ${ac_cv_prog_RC+:} false; then :
38863  $as_echo_n "(cached) " >&6
38864else
38865  if test -n "$RC"; then
38866  ac_cv_prog_RC="$RC" # Let the user override the test.
38867else
38868  ac_prog_rejected=no
38869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38870for as_dir in $PATH
38871do
38872  IFS=$as_save_IFS
38873  test -z "$as_dir" && as_dir=.
38874    for ac_exec_ext in '' $ac_executable_extensions; do
38875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38876    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38877       ac_prog_rejected=yes
38878       continue
38879     fi
38880    ac_cv_prog_RC="rc"
38881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38882    break 2
38883  fi
38884done
38885  done
38886IFS=$as_save_IFS
38887
38888if test $ac_prog_rejected = yes; then
38889  # We found a bogon in the path, so make sure we never use it.
38890  set dummy $ac_cv_prog_RC
38891  shift
38892  if test $# != 0; then
38893    # We chose a different compiler from the bogus one.
38894    # However, it has the same basename, so the bogon will be chosen
38895    # first if we set RC to just the basename; use the full file name.
38896    shift
38897    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38898  fi
38899fi
38900fi
38901fi
38902RC=$ac_cv_prog_RC
38903if test -n "$RC"; then
38904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38905$as_echo "$RC" >&6; }
38906else
38907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38908$as_echo "no" >&6; }
38909fi
38910
38911
38912
38913  # Only process if variable expands to non-empty
38914
38915  if test "x$RC" != x; then
38916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38917
38918  # First separate the path from the arguments. This will split at the first
38919  # space.
38920  complete="$RC"
38921  path="${complete%% *}"
38922  tmp="$complete EOL"
38923  arguments="${tmp#* }"
38924
38925  # Input might be given as Windows format, start by converting to
38926  # unix format.
38927  new_path=`$CYGPATH -u "$path"`
38928
38929  # Now try to locate executable using which
38930  new_path=`$WHICH "$new_path" 2> /dev/null`
38931  # bat and cmd files are not always considered executable in cygwin causing which
38932  # to not find them
38933  if test "x$new_path" = x \
38934      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38935      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38936    new_path=`$CYGPATH -u "$path"`
38937  fi
38938  if test "x$new_path" = x; then
38939    # Oops. Which didn't find the executable.
38940    # The splitting of arguments from the executable at a space might have been incorrect,
38941    # since paths with space are more likely in Windows. Give it another try with the whole
38942    # argument.
38943    path="$complete"
38944    arguments="EOL"
38945    new_path=`$CYGPATH -u "$path"`
38946    new_path=`$WHICH "$new_path" 2> /dev/null`
38947    # bat and cmd files are not always considered executable in cygwin causing which
38948    # to not find them
38949    if test "x$new_path" = x \
38950        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38951        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38952      new_path=`$CYGPATH -u "$path"`
38953    fi
38954    if test "x$new_path" = x; then
38955      # It's still not found. Now this is an unrecoverable error.
38956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38957$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38958      has_space=`$ECHO "$complete" | $GREP " "`
38959      if test "x$has_space" != x; then
38960        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38961$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38962      fi
38963      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38964    fi
38965  fi
38966
38967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38970  # "foo.exe" is OK but "foo" is an error.
38971  #
38972  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38973  # It is also a way to make sure we got the proper file name for the real test later on.
38974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38975  if test "x$test_shortpath" = x; then
38976    # Short path failed, file does not exist as specified.
38977    # Try adding .exe or .cmd
38978    if test -f "${new_path}.exe"; then
38979      input_to_shortpath="${new_path}.exe"
38980    elif test -f "${new_path}.cmd"; then
38981      input_to_shortpath="${new_path}.cmd"
38982    else
38983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38984$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38985      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38986$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38987      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38988    fi
38989  else
38990    input_to_shortpath="$new_path"
38991  fi
38992
38993  # Call helper function which possibly converts this using DOS-style short mode.
38994  # If so, the updated path is stored in $new_path.
38995  new_path="$input_to_shortpath"
38996
38997  input_path="$input_to_shortpath"
38998  # Check if we need to convert this using DOS-style short mode. If the path
38999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39000  # take no chances and rewrite it.
39001  # Note: m4 eats our [], so we need to use [ and ] instead.
39002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39003  if test "x$has_forbidden_chars" != x; then
39004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39008      # Going to short mode and back again did indeed matter. Since short mode is
39009      # case insensitive, let's make it lowercase to improve readability.
39010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39011      # Now convert it back to Unix-style (cygpath)
39012      input_path=`$CYGPATH -u "$shortmode_path"`
39013      new_path="$input_path"
39014    fi
39015  fi
39016
39017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39018  if test "x$test_cygdrive_prefix" = x; then
39019    # As a simple fix, exclude /usr/bin since it's not a real path.
39020    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39022      # a path prefixed by /cygdrive for fixpath to work.
39023      new_path="$CYGWIN_ROOT_PATH$input_path"
39024    fi
39025  fi
39026
39027  # remove trailing .exe if any
39028  new_path="${new_path/%.exe/}"
39029
39030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39031
39032  # First separate the path from the arguments. This will split at the first
39033  # space.
39034  complete="$RC"
39035  path="${complete%% *}"
39036  tmp="$complete EOL"
39037  arguments="${tmp#* }"
39038
39039  # Input might be given as Windows format, start by converting to
39040  # unix format.
39041  new_path="$path"
39042
39043  windows_path="$new_path"
39044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39045    unix_path=`$CYGPATH -u "$windows_path"`
39046    new_path="$unix_path"
39047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39049    new_path="$unix_path"
39050  fi
39051
39052
39053  # Now try to locate executable using which
39054  new_path=`$WHICH "$new_path" 2> /dev/null`
39055
39056  if test "x$new_path" = x; then
39057    # Oops. Which didn't find the executable.
39058    # The splitting of arguments from the executable at a space might have been incorrect,
39059    # since paths with space are more likely in Windows. Give it another try with the whole
39060    # argument.
39061    path="$complete"
39062    arguments="EOL"
39063    new_path="$path"
39064
39065  windows_path="$new_path"
39066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39067    unix_path=`$CYGPATH -u "$windows_path"`
39068    new_path="$unix_path"
39069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39071    new_path="$unix_path"
39072  fi
39073
39074
39075    new_path=`$WHICH "$new_path" 2> /dev/null`
39076    # bat and cmd files are not always considered executable in MSYS causing which
39077    # to not find them
39078    if test "x$new_path" = x \
39079        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39080        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39081      new_path="$path"
39082
39083  windows_path="$new_path"
39084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39085    unix_path=`$CYGPATH -u "$windows_path"`
39086    new_path="$unix_path"
39087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39089    new_path="$unix_path"
39090  fi
39091
39092    fi
39093
39094    if test "x$new_path" = x; then
39095      # It's still not found. Now this is an unrecoverable error.
39096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39097$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39098      has_space=`$ECHO "$complete" | $GREP " "`
39099      if test "x$has_space" != x; then
39100        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39101$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39102      fi
39103      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39104    fi
39105  fi
39106
39107  # Now new_path has a complete unix path to the binary
39108  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39109    # Keep paths in /bin as-is, but remove trailing .exe if any
39110    new_path="${new_path/%.exe/}"
39111    # Do not save /bin paths to all_fixpath_prefixes!
39112  else
39113    # Not in mixed or Windows style, start by that.
39114    new_path=`cmd //c echo $new_path`
39115
39116  input_path="$new_path"
39117  # Check if we need to convert this using DOS-style short mode. If the path
39118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39119  # take no chances and rewrite it.
39120  # Note: m4 eats our [], so we need to use [ and ] instead.
39121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39122  if test "x$has_forbidden_chars" != x; then
39123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39125  fi
39126
39127    # Output is in $new_path
39128
39129  windows_path="$new_path"
39130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39131    unix_path=`$CYGPATH -u "$windows_path"`
39132    new_path="$unix_path"
39133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39135    new_path="$unix_path"
39136  fi
39137
39138    # remove trailing .exe if any
39139    new_path="${new_path/%.exe/}"
39140
39141    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39142    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39143  fi
39144
39145    else
39146      # We're on a unix platform. Hooray! :)
39147      # First separate the path from the arguments. This will split at the first
39148      # space.
39149      complete="$RC"
39150      path="${complete%% *}"
39151      tmp="$complete EOL"
39152      arguments="${tmp#* }"
39153
39154      # Cannot rely on the command "which" here since it doesn't always work.
39155      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39156      if test -z "$is_absolute_path"; then
39157        # Path to executable is not absolute. Find it.
39158        IFS_save="$IFS"
39159        IFS=:
39160        for p in $PATH; do
39161          if test -f "$p/$path" && test -x "$p/$path"; then
39162            new_path="$p/$path"
39163            break
39164          fi
39165        done
39166        IFS="$IFS_save"
39167      else
39168        # This is an absolute path, we can use it without further modifications.
39169        new_path="$path"
39170      fi
39171
39172      if test "x$new_path" = x; then
39173        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39174$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39175        has_space=`$ECHO "$complete" | $GREP " "`
39176        if test "x$has_space" != x; then
39177          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39178$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39179        fi
39180        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39181      fi
39182    fi
39183
39184    # Now join together the path and the arguments once again
39185    if test "x$arguments" != xEOL; then
39186      new_complete="$new_path ${arguments% *}"
39187    else
39188      new_complete="$new_path"
39189    fi
39190
39191    if test "x$complete" != "x$new_complete"; then
39192      RC="$new_complete"
39193      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39194$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39195    fi
39196  fi
39197
39198    # Extract the first word of "dumpbin", so it can be a program name with args.
39199set dummy dumpbin; ac_word=$2
39200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39201$as_echo_n "checking for $ac_word... " >&6; }
39202if ${ac_cv_prog_DUMPBIN+:} false; then :
39203  $as_echo_n "(cached) " >&6
39204else
39205  if test -n "$DUMPBIN"; then
39206  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39207else
39208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39209for as_dir in $PATH
39210do
39211  IFS=$as_save_IFS
39212  test -z "$as_dir" && as_dir=.
39213    for ac_exec_ext in '' $ac_executable_extensions; do
39214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39215    ac_cv_prog_DUMPBIN="dumpbin"
39216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39217    break 2
39218  fi
39219done
39220  done
39221IFS=$as_save_IFS
39222
39223fi
39224fi
39225DUMPBIN=$ac_cv_prog_DUMPBIN
39226if test -n "$DUMPBIN"; then
39227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39228$as_echo "$DUMPBIN" >&6; }
39229else
39230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39231$as_echo "no" >&6; }
39232fi
39233
39234
39235
39236  # Only process if variable expands to non-empty
39237
39238  if test "x$DUMPBIN" != x; then
39239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39240
39241  # First separate the path from the arguments. This will split at the first
39242  # space.
39243  complete="$DUMPBIN"
39244  path="${complete%% *}"
39245  tmp="$complete EOL"
39246  arguments="${tmp#* }"
39247
39248  # Input might be given as Windows format, start by converting to
39249  # unix format.
39250  new_path=`$CYGPATH -u "$path"`
39251
39252  # Now try to locate executable using which
39253  new_path=`$WHICH "$new_path" 2> /dev/null`
39254  # bat and cmd files are not always considered executable in cygwin causing which
39255  # to not find them
39256  if test "x$new_path" = x \
39257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39259    new_path=`$CYGPATH -u "$path"`
39260  fi
39261  if test "x$new_path" = x; then
39262    # Oops. Which didn't find the executable.
39263    # The splitting of arguments from the executable at a space might have been incorrect,
39264    # since paths with space are more likely in Windows. Give it another try with the whole
39265    # argument.
39266    path="$complete"
39267    arguments="EOL"
39268    new_path=`$CYGPATH -u "$path"`
39269    new_path=`$WHICH "$new_path" 2> /dev/null`
39270    # bat and cmd files are not always considered executable in cygwin causing which
39271    # to not find them
39272    if test "x$new_path" = x \
39273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39275      new_path=`$CYGPATH -u "$path"`
39276    fi
39277    if test "x$new_path" = x; then
39278      # It's still not found. Now this is an unrecoverable error.
39279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39280$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39281      has_space=`$ECHO "$complete" | $GREP " "`
39282      if test "x$has_space" != x; then
39283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39285      fi
39286      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39287    fi
39288  fi
39289
39290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39293  # "foo.exe" is OK but "foo" is an error.
39294  #
39295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39296  # It is also a way to make sure we got the proper file name for the real test later on.
39297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39298  if test "x$test_shortpath" = x; then
39299    # Short path failed, file does not exist as specified.
39300    # Try adding .exe or .cmd
39301    if test -f "${new_path}.exe"; then
39302      input_to_shortpath="${new_path}.exe"
39303    elif test -f "${new_path}.cmd"; then
39304      input_to_shortpath="${new_path}.cmd"
39305    else
39306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39307$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39310      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39311    fi
39312  else
39313    input_to_shortpath="$new_path"
39314  fi
39315
39316  # Call helper function which possibly converts this using DOS-style short mode.
39317  # If so, the updated path is stored in $new_path.
39318  new_path="$input_to_shortpath"
39319
39320  input_path="$input_to_shortpath"
39321  # Check if we need to convert this using DOS-style short mode. If the path
39322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39323  # take no chances and rewrite it.
39324  # Note: m4 eats our [], so we need to use [ and ] instead.
39325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39326  if test "x$has_forbidden_chars" != x; then
39327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39331      # Going to short mode and back again did indeed matter. Since short mode is
39332      # case insensitive, let's make it lowercase to improve readability.
39333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39334      # Now convert it back to Unix-style (cygpath)
39335      input_path=`$CYGPATH -u "$shortmode_path"`
39336      new_path="$input_path"
39337    fi
39338  fi
39339
39340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39341  if test "x$test_cygdrive_prefix" = x; then
39342    # As a simple fix, exclude /usr/bin since it's not a real path.
39343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39345      # a path prefixed by /cygdrive for fixpath to work.
39346      new_path="$CYGWIN_ROOT_PATH$input_path"
39347    fi
39348  fi
39349
39350  # remove trailing .exe if any
39351  new_path="${new_path/%.exe/}"
39352
39353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39354
39355  # First separate the path from the arguments. This will split at the first
39356  # space.
39357  complete="$DUMPBIN"
39358  path="${complete%% *}"
39359  tmp="$complete EOL"
39360  arguments="${tmp#* }"
39361
39362  # Input might be given as Windows format, start by converting to
39363  # unix format.
39364  new_path="$path"
39365
39366  windows_path="$new_path"
39367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39368    unix_path=`$CYGPATH -u "$windows_path"`
39369    new_path="$unix_path"
39370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39372    new_path="$unix_path"
39373  fi
39374
39375
39376  # Now try to locate executable using which
39377  new_path=`$WHICH "$new_path" 2> /dev/null`
39378
39379  if test "x$new_path" = x; then
39380    # Oops. Which didn't find the executable.
39381    # The splitting of arguments from the executable at a space might have been incorrect,
39382    # since paths with space are more likely in Windows. Give it another try with the whole
39383    # argument.
39384    path="$complete"
39385    arguments="EOL"
39386    new_path="$path"
39387
39388  windows_path="$new_path"
39389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39390    unix_path=`$CYGPATH -u "$windows_path"`
39391    new_path="$unix_path"
39392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39394    new_path="$unix_path"
39395  fi
39396
39397
39398    new_path=`$WHICH "$new_path" 2> /dev/null`
39399    # bat and cmd files are not always considered executable in MSYS causing which
39400    # to not find them
39401    if test "x$new_path" = x \
39402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39404      new_path="$path"
39405
39406  windows_path="$new_path"
39407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39408    unix_path=`$CYGPATH -u "$windows_path"`
39409    new_path="$unix_path"
39410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39412    new_path="$unix_path"
39413  fi
39414
39415    fi
39416
39417    if test "x$new_path" = x; then
39418      # It's still not found. Now this is an unrecoverable error.
39419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39420$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39421      has_space=`$ECHO "$complete" | $GREP " "`
39422      if test "x$has_space" != x; then
39423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39425      fi
39426      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39427    fi
39428  fi
39429
39430  # Now new_path has a complete unix path to the binary
39431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39432    # Keep paths in /bin as-is, but remove trailing .exe if any
39433    new_path="${new_path/%.exe/}"
39434    # Do not save /bin paths to all_fixpath_prefixes!
39435  else
39436    # Not in mixed or Windows style, start by that.
39437    new_path=`cmd //c echo $new_path`
39438
39439  input_path="$new_path"
39440  # Check if we need to convert this using DOS-style short mode. If the path
39441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39442  # take no chances and rewrite it.
39443  # Note: m4 eats our [], so we need to use [ and ] instead.
39444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39445  if test "x$has_forbidden_chars" != x; then
39446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39448  fi
39449
39450    # Output is in $new_path
39451
39452  windows_path="$new_path"
39453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39454    unix_path=`$CYGPATH -u "$windows_path"`
39455    new_path="$unix_path"
39456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39458    new_path="$unix_path"
39459  fi
39460
39461    # remove trailing .exe if any
39462    new_path="${new_path/%.exe/}"
39463
39464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39466  fi
39467
39468    else
39469      # We're on a unix platform. Hooray! :)
39470      # First separate the path from the arguments. This will split at the first
39471      # space.
39472      complete="$DUMPBIN"
39473      path="${complete%% *}"
39474      tmp="$complete EOL"
39475      arguments="${tmp#* }"
39476
39477      # Cannot rely on the command "which" here since it doesn't always work.
39478      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39479      if test -z "$is_absolute_path"; then
39480        # Path to executable is not absolute. Find it.
39481        IFS_save="$IFS"
39482        IFS=:
39483        for p in $PATH; do
39484          if test -f "$p/$path" && test -x "$p/$path"; then
39485            new_path="$p/$path"
39486            break
39487          fi
39488        done
39489        IFS="$IFS_save"
39490      else
39491        # This is an absolute path, we can use it without further modifications.
39492        new_path="$path"
39493      fi
39494
39495      if test "x$new_path" = x; then
39496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39497$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39498        has_space=`$ECHO "$complete" | $GREP " "`
39499        if test "x$has_space" != x; then
39500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39502        fi
39503        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39504      fi
39505    fi
39506
39507    # Now join together the path and the arguments once again
39508    if test "x$arguments" != xEOL; then
39509      new_complete="$new_path ${arguments% *}"
39510    else
39511      new_complete="$new_path"
39512    fi
39513
39514    if test "x$complete" != "x$new_complete"; then
39515      DUMPBIN="$new_complete"
39516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39517$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39518    fi
39519  fi
39520
39521    # We need to check for 'msbuild.exe' because at the place where we expect to
39522    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39523    # won't find the 'msbuild.exe' executable in that case (and the
39524    # 'ac_executable_extensions' is unusable due to performance reasons).
39525    # Notice that we intentionally don't fix up the path to MSBUILD because we
39526    # will call it in a DOS shell during freetype detection on Windows (see
39527    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39528    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39529set dummy msbuild.exe; ac_word=$2
39530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39531$as_echo_n "checking for $ac_word... " >&6; }
39532if ${ac_cv_prog_MSBUILD+:} false; then :
39533  $as_echo_n "(cached) " >&6
39534else
39535  if test -n "$MSBUILD"; then
39536  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39537else
39538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39539for as_dir in $PATH
39540do
39541  IFS=$as_save_IFS
39542  test -z "$as_dir" && as_dir=.
39543    for ac_exec_ext in '' $ac_executable_extensions; do
39544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39545    ac_cv_prog_MSBUILD="msbuild.exe"
39546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39547    break 2
39548  fi
39549done
39550  done
39551IFS=$as_save_IFS
39552
39553fi
39554fi
39555MSBUILD=$ac_cv_prog_MSBUILD
39556if test -n "$MSBUILD"; then
39557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39558$as_echo "$MSBUILD" >&6; }
39559else
39560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39561$as_echo "no" >&6; }
39562fi
39563
39564
39565  fi
39566
39567  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39568
39569
39570  # Publish this variable in the help.
39571
39572
39573  if [ -z "${STRIP+x}" ]; then
39574    # The variable is not set by user, try to locate tool using the code snippet
39575    for ac_prog in strip
39576do
39577  # Extract the first word of "$ac_prog", so it can be a program name with args.
39578set dummy $ac_prog; ac_word=$2
39579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39580$as_echo_n "checking for $ac_word... " >&6; }
39581if ${ac_cv_path_STRIP+:} false; then :
39582  $as_echo_n "(cached) " >&6
39583else
39584  case $STRIP in
39585  [\\/]* | ?:[\\/]*)
39586  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39587  ;;
39588  *)
39589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39590for as_dir in $PATH
39591do
39592  IFS=$as_save_IFS
39593  test -z "$as_dir" && as_dir=.
39594    for ac_exec_ext in '' $ac_executable_extensions; do
39595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39596    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39598    break 2
39599  fi
39600done
39601  done
39602IFS=$as_save_IFS
39603
39604  ;;
39605esac
39606fi
39607STRIP=$ac_cv_path_STRIP
39608if test -n "$STRIP"; then
39609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39610$as_echo "$STRIP" >&6; }
39611else
39612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39613$as_echo "no" >&6; }
39614fi
39615
39616
39617  test -n "$STRIP" && break
39618done
39619
39620  else
39621    # The variable is set, but is it from the command line or the environment?
39622
39623    # Try to remove the string !STRIP! from our list.
39624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39626      # If it failed, the variable was not from the command line. Ignore it,
39627      # but warn the user (except for BASH, which is always set by the calling BASH).
39628      if test "xSTRIP" != xBASH; then
39629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39630$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39631      fi
39632      # Try to locate tool using the code snippet
39633      for ac_prog in strip
39634do
39635  # Extract the first word of "$ac_prog", so it can be a program name with args.
39636set dummy $ac_prog; ac_word=$2
39637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39638$as_echo_n "checking for $ac_word... " >&6; }
39639if ${ac_cv_path_STRIP+:} false; then :
39640  $as_echo_n "(cached) " >&6
39641else
39642  case $STRIP in
39643  [\\/]* | ?:[\\/]*)
39644  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39645  ;;
39646  *)
39647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39648for as_dir in $PATH
39649do
39650  IFS=$as_save_IFS
39651  test -z "$as_dir" && as_dir=.
39652    for ac_exec_ext in '' $ac_executable_extensions; do
39653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39654    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39656    break 2
39657  fi
39658done
39659  done
39660IFS=$as_save_IFS
39661
39662  ;;
39663esac
39664fi
39665STRIP=$ac_cv_path_STRIP
39666if test -n "$STRIP"; then
39667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39668$as_echo "$STRIP" >&6; }
39669else
39670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39671$as_echo "no" >&6; }
39672fi
39673
39674
39675  test -n "$STRIP" && break
39676done
39677
39678    else
39679      # If it succeeded, then it was overridden by the user. We will use it
39680      # for the tool.
39681
39682      # First remove it from the list of overridden variables, so we can test
39683      # for unknown variables in the end.
39684      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39685
39686      # Check if we try to supply an empty value
39687      if test "x$STRIP" = x; then
39688        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39689$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39691$as_echo_n "checking for STRIP... " >&6; }
39692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39693$as_echo "disabled" >&6; }
39694      else
39695        # Check if the provided tool contains a complete path.
39696        tool_specified="$STRIP"
39697        tool_basename="${tool_specified##*/}"
39698        if test "x$tool_basename" = "x$tool_specified"; then
39699          # A command without a complete path is provided, search $PATH.
39700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39701$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39702          # Extract the first word of "$tool_basename", so it can be a program name with args.
39703set dummy $tool_basename; ac_word=$2
39704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39705$as_echo_n "checking for $ac_word... " >&6; }
39706if ${ac_cv_path_STRIP+:} false; then :
39707  $as_echo_n "(cached) " >&6
39708else
39709  case $STRIP in
39710  [\\/]* | ?:[\\/]*)
39711  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39712  ;;
39713  *)
39714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39715for as_dir in $PATH
39716do
39717  IFS=$as_save_IFS
39718  test -z "$as_dir" && as_dir=.
39719    for ac_exec_ext in '' $ac_executable_extensions; do
39720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39721    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39723    break 2
39724  fi
39725done
39726  done
39727IFS=$as_save_IFS
39728
39729  ;;
39730esac
39731fi
39732STRIP=$ac_cv_path_STRIP
39733if test -n "$STRIP"; then
39734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39735$as_echo "$STRIP" >&6; }
39736else
39737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39738$as_echo "no" >&6; }
39739fi
39740
39741
39742          if test "x$STRIP" = x; then
39743            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39744          fi
39745        else
39746          # Otherwise we believe it is a complete path. Use it as it is.
39747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39748$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39749          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39750$as_echo_n "checking for STRIP... " >&6; }
39751          if test ! -x "$tool_specified"; then
39752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39753$as_echo "not found" >&6; }
39754            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39755          fi
39756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39757$as_echo "$tool_specified" >&6; }
39758        fi
39759      fi
39760    fi
39761
39762  fi
39763
39764
39765
39766  # Only process if variable expands to non-empty
39767
39768  if test "x$STRIP" != x; then
39769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39770
39771  # First separate the path from the arguments. This will split at the first
39772  # space.
39773  complete="$STRIP"
39774  path="${complete%% *}"
39775  tmp="$complete EOL"
39776  arguments="${tmp#* }"
39777
39778  # Input might be given as Windows format, start by converting to
39779  # unix format.
39780  new_path=`$CYGPATH -u "$path"`
39781
39782  # Now try to locate executable using which
39783  new_path=`$WHICH "$new_path" 2> /dev/null`
39784  # bat and cmd files are not always considered executable in cygwin causing which
39785  # to not find them
39786  if test "x$new_path" = x \
39787      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39788      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39789    new_path=`$CYGPATH -u "$path"`
39790  fi
39791  if test "x$new_path" = x; then
39792    # Oops. Which didn't find the executable.
39793    # The splitting of arguments from the executable at a space might have been incorrect,
39794    # since paths with space are more likely in Windows. Give it another try with the whole
39795    # argument.
39796    path="$complete"
39797    arguments="EOL"
39798    new_path=`$CYGPATH -u "$path"`
39799    new_path=`$WHICH "$new_path" 2> /dev/null`
39800    # bat and cmd files are not always considered executable in cygwin causing which
39801    # to not find them
39802    if test "x$new_path" = x \
39803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39805      new_path=`$CYGPATH -u "$path"`
39806    fi
39807    if test "x$new_path" = x; then
39808      # It's still not found. Now this is an unrecoverable error.
39809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39810$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39811      has_space=`$ECHO "$complete" | $GREP " "`
39812      if test "x$has_space" != x; then
39813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39815      fi
39816      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39817    fi
39818  fi
39819
39820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39823  # "foo.exe" is OK but "foo" is an error.
39824  #
39825  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39826  # It is also a way to make sure we got the proper file name for the real test later on.
39827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39828  if test "x$test_shortpath" = x; then
39829    # Short path failed, file does not exist as specified.
39830    # Try adding .exe or .cmd
39831    if test -f "${new_path}.exe"; then
39832      input_to_shortpath="${new_path}.exe"
39833    elif test -f "${new_path}.cmd"; then
39834      input_to_shortpath="${new_path}.cmd"
39835    else
39836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39837$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39838      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39839$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39840      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39841    fi
39842  else
39843    input_to_shortpath="$new_path"
39844  fi
39845
39846  # Call helper function which possibly converts this using DOS-style short mode.
39847  # If so, the updated path is stored in $new_path.
39848  new_path="$input_to_shortpath"
39849
39850  input_path="$input_to_shortpath"
39851  # Check if we need to convert this using DOS-style short mode. If the path
39852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39853  # take no chances and rewrite it.
39854  # Note: m4 eats our [], so we need to use [ and ] instead.
39855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39856  if test "x$has_forbidden_chars" != x; then
39857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39861      # Going to short mode and back again did indeed matter. Since short mode is
39862      # case insensitive, let's make it lowercase to improve readability.
39863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39864      # Now convert it back to Unix-style (cygpath)
39865      input_path=`$CYGPATH -u "$shortmode_path"`
39866      new_path="$input_path"
39867    fi
39868  fi
39869
39870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39871  if test "x$test_cygdrive_prefix" = x; then
39872    # As a simple fix, exclude /usr/bin since it's not a real path.
39873    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39875      # a path prefixed by /cygdrive for fixpath to work.
39876      new_path="$CYGWIN_ROOT_PATH$input_path"
39877    fi
39878  fi
39879
39880  # remove trailing .exe if any
39881  new_path="${new_path/%.exe/}"
39882
39883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39884
39885  # First separate the path from the arguments. This will split at the first
39886  # space.
39887  complete="$STRIP"
39888  path="${complete%% *}"
39889  tmp="$complete EOL"
39890  arguments="${tmp#* }"
39891
39892  # Input might be given as Windows format, start by converting to
39893  # unix format.
39894  new_path="$path"
39895
39896  windows_path="$new_path"
39897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39898    unix_path=`$CYGPATH -u "$windows_path"`
39899    new_path="$unix_path"
39900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39902    new_path="$unix_path"
39903  fi
39904
39905
39906  # Now try to locate executable using which
39907  new_path=`$WHICH "$new_path" 2> /dev/null`
39908
39909  if test "x$new_path" = x; then
39910    # Oops. Which didn't find the executable.
39911    # The splitting of arguments from the executable at a space might have been incorrect,
39912    # since paths with space are more likely in Windows. Give it another try with the whole
39913    # argument.
39914    path="$complete"
39915    arguments="EOL"
39916    new_path="$path"
39917
39918  windows_path="$new_path"
39919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39920    unix_path=`$CYGPATH -u "$windows_path"`
39921    new_path="$unix_path"
39922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39924    new_path="$unix_path"
39925  fi
39926
39927
39928    new_path=`$WHICH "$new_path" 2> /dev/null`
39929    # bat and cmd files are not always considered executable in MSYS causing which
39930    # to not find them
39931    if test "x$new_path" = x \
39932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39934      new_path="$path"
39935
39936  windows_path="$new_path"
39937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39938    unix_path=`$CYGPATH -u "$windows_path"`
39939    new_path="$unix_path"
39940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39942    new_path="$unix_path"
39943  fi
39944
39945    fi
39946
39947    if test "x$new_path" = x; then
39948      # It's still not found. Now this is an unrecoverable error.
39949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39950$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39951      has_space=`$ECHO "$complete" | $GREP " "`
39952      if test "x$has_space" != x; then
39953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39955      fi
39956      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39957    fi
39958  fi
39959
39960  # Now new_path has a complete unix path to the binary
39961  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39962    # Keep paths in /bin as-is, but remove trailing .exe if any
39963    new_path="${new_path/%.exe/}"
39964    # Do not save /bin paths to all_fixpath_prefixes!
39965  else
39966    # Not in mixed or Windows style, start by that.
39967    new_path=`cmd //c echo $new_path`
39968
39969  input_path="$new_path"
39970  # Check if we need to convert this using DOS-style short mode. If the path
39971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39972  # take no chances and rewrite it.
39973  # Note: m4 eats our [], so we need to use [ and ] instead.
39974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39975  if test "x$has_forbidden_chars" != x; then
39976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39978  fi
39979
39980    # Output is in $new_path
39981
39982  windows_path="$new_path"
39983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39984    unix_path=`$CYGPATH -u "$windows_path"`
39985    new_path="$unix_path"
39986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39988    new_path="$unix_path"
39989  fi
39990
39991    # remove trailing .exe if any
39992    new_path="${new_path/%.exe/}"
39993
39994    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39995    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39996  fi
39997
39998    else
39999      # We're on a unix platform. Hooray! :)
40000      # First separate the path from the arguments. This will split at the first
40001      # space.
40002      complete="$STRIP"
40003      path="${complete%% *}"
40004      tmp="$complete EOL"
40005      arguments="${tmp#* }"
40006
40007      # Cannot rely on the command "which" here since it doesn't always work.
40008      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40009      if test -z "$is_absolute_path"; then
40010        # Path to executable is not absolute. Find it.
40011        IFS_save="$IFS"
40012        IFS=:
40013        for p in $PATH; do
40014          if test -f "$p/$path" && test -x "$p/$path"; then
40015            new_path="$p/$path"
40016            break
40017          fi
40018        done
40019        IFS="$IFS_save"
40020      else
40021        # This is an absolute path, we can use it without further modifications.
40022        new_path="$path"
40023      fi
40024
40025      if test "x$new_path" = x; then
40026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40027$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40028        has_space=`$ECHO "$complete" | $GREP " "`
40029        if test "x$has_space" != x; then
40030          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40031$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40032        fi
40033        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40034      fi
40035    fi
40036
40037    # Now join together the path and the arguments once again
40038    if test "x$arguments" != xEOL; then
40039      new_complete="$new_path ${arguments% *}"
40040    else
40041      new_complete="$new_path"
40042    fi
40043
40044    if test "x$complete" != "x$new_complete"; then
40045      STRIP="$new_complete"
40046      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40047$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40048    fi
40049  fi
40050
40051
40052
40053  # Publish this variable in the help.
40054
40055
40056  if [ -z "${NM+x}" ]; then
40057    # The variable is not set by user, try to locate tool using the code snippet
40058    for ac_prog in nm
40059do
40060  # Extract the first word of "$ac_prog", so it can be a program name with args.
40061set dummy $ac_prog; ac_word=$2
40062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40063$as_echo_n "checking for $ac_word... " >&6; }
40064if ${ac_cv_path_NM+:} false; then :
40065  $as_echo_n "(cached) " >&6
40066else
40067  case $NM in
40068  [\\/]* | ?:[\\/]*)
40069  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40070  ;;
40071  *)
40072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40073for as_dir in $PATH
40074do
40075  IFS=$as_save_IFS
40076  test -z "$as_dir" && as_dir=.
40077    for ac_exec_ext in '' $ac_executable_extensions; do
40078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40079    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40081    break 2
40082  fi
40083done
40084  done
40085IFS=$as_save_IFS
40086
40087  ;;
40088esac
40089fi
40090NM=$ac_cv_path_NM
40091if test -n "$NM"; then
40092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40093$as_echo "$NM" >&6; }
40094else
40095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40096$as_echo "no" >&6; }
40097fi
40098
40099
40100  test -n "$NM" && break
40101done
40102
40103  else
40104    # The variable is set, but is it from the command line or the environment?
40105
40106    # Try to remove the string !NM! from our list.
40107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40109      # If it failed, the variable was not from the command line. Ignore it,
40110      # but warn the user (except for BASH, which is always set by the calling BASH).
40111      if test "xNM" != xBASH; then
40112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40113$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40114      fi
40115      # Try to locate tool using the code snippet
40116      for ac_prog in nm
40117do
40118  # Extract the first word of "$ac_prog", so it can be a program name with args.
40119set dummy $ac_prog; ac_word=$2
40120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40121$as_echo_n "checking for $ac_word... " >&6; }
40122if ${ac_cv_path_NM+:} false; then :
40123  $as_echo_n "(cached) " >&6
40124else
40125  case $NM in
40126  [\\/]* | ?:[\\/]*)
40127  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40128  ;;
40129  *)
40130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40131for as_dir in $PATH
40132do
40133  IFS=$as_save_IFS
40134  test -z "$as_dir" && as_dir=.
40135    for ac_exec_ext in '' $ac_executable_extensions; do
40136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40137    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40139    break 2
40140  fi
40141done
40142  done
40143IFS=$as_save_IFS
40144
40145  ;;
40146esac
40147fi
40148NM=$ac_cv_path_NM
40149if test -n "$NM"; then
40150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40151$as_echo "$NM" >&6; }
40152else
40153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40154$as_echo "no" >&6; }
40155fi
40156
40157
40158  test -n "$NM" && break
40159done
40160
40161    else
40162      # If it succeeded, then it was overridden by the user. We will use it
40163      # for the tool.
40164
40165      # First remove it from the list of overridden variables, so we can test
40166      # for unknown variables in the end.
40167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40168
40169      # Check if we try to supply an empty value
40170      if test "x$NM" = x; then
40171        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40172$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40174$as_echo_n "checking for NM... " >&6; }
40175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40176$as_echo "disabled" >&6; }
40177      else
40178        # Check if the provided tool contains a complete path.
40179        tool_specified="$NM"
40180        tool_basename="${tool_specified##*/}"
40181        if test "x$tool_basename" = "x$tool_specified"; then
40182          # A command without a complete path is provided, search $PATH.
40183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40184$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40185          # Extract the first word of "$tool_basename", so it can be a program name with args.
40186set dummy $tool_basename; ac_word=$2
40187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40188$as_echo_n "checking for $ac_word... " >&6; }
40189if ${ac_cv_path_NM+:} false; then :
40190  $as_echo_n "(cached) " >&6
40191else
40192  case $NM in
40193  [\\/]* | ?:[\\/]*)
40194  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40195  ;;
40196  *)
40197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40198for as_dir in $PATH
40199do
40200  IFS=$as_save_IFS
40201  test -z "$as_dir" && as_dir=.
40202    for ac_exec_ext in '' $ac_executable_extensions; do
40203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40204    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40206    break 2
40207  fi
40208done
40209  done
40210IFS=$as_save_IFS
40211
40212  ;;
40213esac
40214fi
40215NM=$ac_cv_path_NM
40216if test -n "$NM"; then
40217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40218$as_echo "$NM" >&6; }
40219else
40220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40221$as_echo "no" >&6; }
40222fi
40223
40224
40225          if test "x$NM" = x; then
40226            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40227          fi
40228        else
40229          # Otherwise we believe it is a complete path. Use it as it is.
40230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40231$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40232          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40233$as_echo_n "checking for NM... " >&6; }
40234          if test ! -x "$tool_specified"; then
40235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40236$as_echo "not found" >&6; }
40237            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40238          fi
40239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40240$as_echo "$tool_specified" >&6; }
40241        fi
40242      fi
40243    fi
40244
40245  fi
40246
40247
40248
40249  # Only process if variable expands to non-empty
40250
40251  if test "x$NM" != x; then
40252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40253
40254  # First separate the path from the arguments. This will split at the first
40255  # space.
40256  complete="$NM"
40257  path="${complete%% *}"
40258  tmp="$complete EOL"
40259  arguments="${tmp#* }"
40260
40261  # Input might be given as Windows format, start by converting to
40262  # unix format.
40263  new_path=`$CYGPATH -u "$path"`
40264
40265  # Now try to locate executable using which
40266  new_path=`$WHICH "$new_path" 2> /dev/null`
40267  # bat and cmd files are not always considered executable in cygwin causing which
40268  # to not find them
40269  if test "x$new_path" = x \
40270      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40271      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40272    new_path=`$CYGPATH -u "$path"`
40273  fi
40274  if test "x$new_path" = x; then
40275    # Oops. Which didn't find the executable.
40276    # The splitting of arguments from the executable at a space might have been incorrect,
40277    # since paths with space are more likely in Windows. Give it another try with the whole
40278    # argument.
40279    path="$complete"
40280    arguments="EOL"
40281    new_path=`$CYGPATH -u "$path"`
40282    new_path=`$WHICH "$new_path" 2> /dev/null`
40283    # bat and cmd files are not always considered executable in cygwin causing which
40284    # to not find them
40285    if test "x$new_path" = x \
40286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40288      new_path=`$CYGPATH -u "$path"`
40289    fi
40290    if test "x$new_path" = x; then
40291      # It's still not found. Now this is an unrecoverable error.
40292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40293$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40294      has_space=`$ECHO "$complete" | $GREP " "`
40295      if test "x$has_space" != x; then
40296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40298      fi
40299      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40300    fi
40301  fi
40302
40303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40306  # "foo.exe" is OK but "foo" is an error.
40307  #
40308  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40309  # It is also a way to make sure we got the proper file name for the real test later on.
40310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40311  if test "x$test_shortpath" = x; then
40312    # Short path failed, file does not exist as specified.
40313    # Try adding .exe or .cmd
40314    if test -f "${new_path}.exe"; then
40315      input_to_shortpath="${new_path}.exe"
40316    elif test -f "${new_path}.cmd"; then
40317      input_to_shortpath="${new_path}.cmd"
40318    else
40319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40320$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40323      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40324    fi
40325  else
40326    input_to_shortpath="$new_path"
40327  fi
40328
40329  # Call helper function which possibly converts this using DOS-style short mode.
40330  # If so, the updated path is stored in $new_path.
40331  new_path="$input_to_shortpath"
40332
40333  input_path="$input_to_shortpath"
40334  # Check if we need to convert this using DOS-style short mode. If the path
40335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40336  # take no chances and rewrite it.
40337  # Note: m4 eats our [], so we need to use [ and ] instead.
40338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40339  if test "x$has_forbidden_chars" != x; then
40340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40344      # Going to short mode and back again did indeed matter. Since short mode is
40345      # case insensitive, let's make it lowercase to improve readability.
40346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40347      # Now convert it back to Unix-style (cygpath)
40348      input_path=`$CYGPATH -u "$shortmode_path"`
40349      new_path="$input_path"
40350    fi
40351  fi
40352
40353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40354  if test "x$test_cygdrive_prefix" = x; then
40355    # As a simple fix, exclude /usr/bin since it's not a real path.
40356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40358      # a path prefixed by /cygdrive for fixpath to work.
40359      new_path="$CYGWIN_ROOT_PATH$input_path"
40360    fi
40361  fi
40362
40363  # remove trailing .exe if any
40364  new_path="${new_path/%.exe/}"
40365
40366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40367
40368  # First separate the path from the arguments. This will split at the first
40369  # space.
40370  complete="$NM"
40371  path="${complete%% *}"
40372  tmp="$complete EOL"
40373  arguments="${tmp#* }"
40374
40375  # Input might be given as Windows format, start by converting to
40376  # unix format.
40377  new_path="$path"
40378
40379  windows_path="$new_path"
40380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40381    unix_path=`$CYGPATH -u "$windows_path"`
40382    new_path="$unix_path"
40383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40385    new_path="$unix_path"
40386  fi
40387
40388
40389  # Now try to locate executable using which
40390  new_path=`$WHICH "$new_path" 2> /dev/null`
40391
40392  if test "x$new_path" = x; then
40393    # Oops. Which didn't find the executable.
40394    # The splitting of arguments from the executable at a space might have been incorrect,
40395    # since paths with space are more likely in Windows. Give it another try with the whole
40396    # argument.
40397    path="$complete"
40398    arguments="EOL"
40399    new_path="$path"
40400
40401  windows_path="$new_path"
40402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40403    unix_path=`$CYGPATH -u "$windows_path"`
40404    new_path="$unix_path"
40405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40407    new_path="$unix_path"
40408  fi
40409
40410
40411    new_path=`$WHICH "$new_path" 2> /dev/null`
40412    # bat and cmd files are not always considered executable in MSYS causing which
40413    # to not find them
40414    if test "x$new_path" = x \
40415        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40416        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40417      new_path="$path"
40418
40419  windows_path="$new_path"
40420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40421    unix_path=`$CYGPATH -u "$windows_path"`
40422    new_path="$unix_path"
40423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40425    new_path="$unix_path"
40426  fi
40427
40428    fi
40429
40430    if test "x$new_path" = x; then
40431      # It's still not found. Now this is an unrecoverable error.
40432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40433$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40434      has_space=`$ECHO "$complete" | $GREP " "`
40435      if test "x$has_space" != x; then
40436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40438      fi
40439      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40440    fi
40441  fi
40442
40443  # Now new_path has a complete unix path to the binary
40444  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40445    # Keep paths in /bin as-is, but remove trailing .exe if any
40446    new_path="${new_path/%.exe/}"
40447    # Do not save /bin paths to all_fixpath_prefixes!
40448  else
40449    # Not in mixed or Windows style, start by that.
40450    new_path=`cmd //c echo $new_path`
40451
40452  input_path="$new_path"
40453  # Check if we need to convert this using DOS-style short mode. If the path
40454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40455  # take no chances and rewrite it.
40456  # Note: m4 eats our [], so we need to use [ and ] instead.
40457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40458  if test "x$has_forbidden_chars" != x; then
40459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40461  fi
40462
40463    # Output is in $new_path
40464
40465  windows_path="$new_path"
40466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40467    unix_path=`$CYGPATH -u "$windows_path"`
40468    new_path="$unix_path"
40469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40471    new_path="$unix_path"
40472  fi
40473
40474    # remove trailing .exe if any
40475    new_path="${new_path/%.exe/}"
40476
40477    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40478    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40479  fi
40480
40481    else
40482      # We're on a unix platform. Hooray! :)
40483      # First separate the path from the arguments. This will split at the first
40484      # space.
40485      complete="$NM"
40486      path="${complete%% *}"
40487      tmp="$complete EOL"
40488      arguments="${tmp#* }"
40489
40490      # Cannot rely on the command "which" here since it doesn't always work.
40491      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40492      if test -z "$is_absolute_path"; then
40493        # Path to executable is not absolute. Find it.
40494        IFS_save="$IFS"
40495        IFS=:
40496        for p in $PATH; do
40497          if test -f "$p/$path" && test -x "$p/$path"; then
40498            new_path="$p/$path"
40499            break
40500          fi
40501        done
40502        IFS="$IFS_save"
40503      else
40504        # This is an absolute path, we can use it without further modifications.
40505        new_path="$path"
40506      fi
40507
40508      if test "x$new_path" = x; then
40509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40510$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40511        has_space=`$ECHO "$complete" | $GREP " "`
40512        if test "x$has_space" != x; then
40513          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40514$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40515        fi
40516        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40517      fi
40518    fi
40519
40520    # Now join together the path and the arguments once again
40521    if test "x$arguments" != xEOL; then
40522      new_complete="$new_path ${arguments% *}"
40523    else
40524      new_complete="$new_path"
40525    fi
40526
40527    if test "x$complete" != "x$new_complete"; then
40528      NM="$new_complete"
40529      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40530$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40531    fi
40532  fi
40533
40534
40535
40536  # Publish this variable in the help.
40537
40538
40539  if [ -z "${GNM+x}" ]; then
40540    # The variable is not set by user, try to locate tool using the code snippet
40541    for ac_prog in gnm
40542do
40543  # Extract the first word of "$ac_prog", so it can be a program name with args.
40544set dummy $ac_prog; ac_word=$2
40545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40546$as_echo_n "checking for $ac_word... " >&6; }
40547if ${ac_cv_path_GNM+:} false; then :
40548  $as_echo_n "(cached) " >&6
40549else
40550  case $GNM in
40551  [\\/]* | ?:[\\/]*)
40552  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40553  ;;
40554  *)
40555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40556for as_dir in $PATH
40557do
40558  IFS=$as_save_IFS
40559  test -z "$as_dir" && as_dir=.
40560    for ac_exec_ext in '' $ac_executable_extensions; do
40561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40562    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40564    break 2
40565  fi
40566done
40567  done
40568IFS=$as_save_IFS
40569
40570  ;;
40571esac
40572fi
40573GNM=$ac_cv_path_GNM
40574if test -n "$GNM"; then
40575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40576$as_echo "$GNM" >&6; }
40577else
40578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40579$as_echo "no" >&6; }
40580fi
40581
40582
40583  test -n "$GNM" && break
40584done
40585
40586  else
40587    # The variable is set, but is it from the command line or the environment?
40588
40589    # Try to remove the string !GNM! from our list.
40590    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40591    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40592      # If it failed, the variable was not from the command line. Ignore it,
40593      # but warn the user (except for BASH, which is always set by the calling BASH).
40594      if test "xGNM" != xBASH; then
40595        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40596$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40597      fi
40598      # Try to locate tool using the code snippet
40599      for ac_prog in gnm
40600do
40601  # Extract the first word of "$ac_prog", so it can be a program name with args.
40602set dummy $ac_prog; ac_word=$2
40603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40604$as_echo_n "checking for $ac_word... " >&6; }
40605if ${ac_cv_path_GNM+:} false; then :
40606  $as_echo_n "(cached) " >&6
40607else
40608  case $GNM in
40609  [\\/]* | ?:[\\/]*)
40610  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40611  ;;
40612  *)
40613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40614for as_dir in $PATH
40615do
40616  IFS=$as_save_IFS
40617  test -z "$as_dir" && as_dir=.
40618    for ac_exec_ext in '' $ac_executable_extensions; do
40619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40620    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40622    break 2
40623  fi
40624done
40625  done
40626IFS=$as_save_IFS
40627
40628  ;;
40629esac
40630fi
40631GNM=$ac_cv_path_GNM
40632if test -n "$GNM"; then
40633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40634$as_echo "$GNM" >&6; }
40635else
40636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40637$as_echo "no" >&6; }
40638fi
40639
40640
40641  test -n "$GNM" && break
40642done
40643
40644    else
40645      # If it succeeded, then it was overridden by the user. We will use it
40646      # for the tool.
40647
40648      # First remove it from the list of overridden variables, so we can test
40649      # for unknown variables in the end.
40650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40651
40652      # Check if we try to supply an empty value
40653      if test "x$GNM" = x; then
40654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40655$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40657$as_echo_n "checking for GNM... " >&6; }
40658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40659$as_echo "disabled" >&6; }
40660      else
40661        # Check if the provided tool contains a complete path.
40662        tool_specified="$GNM"
40663        tool_basename="${tool_specified##*/}"
40664        if test "x$tool_basename" = "x$tool_specified"; then
40665          # A command without a complete path is provided, search $PATH.
40666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40667$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40668          # Extract the first word of "$tool_basename", so it can be a program name with args.
40669set dummy $tool_basename; ac_word=$2
40670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40671$as_echo_n "checking for $ac_word... " >&6; }
40672if ${ac_cv_path_GNM+:} false; then :
40673  $as_echo_n "(cached) " >&6
40674else
40675  case $GNM in
40676  [\\/]* | ?:[\\/]*)
40677  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40678  ;;
40679  *)
40680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40681for as_dir in $PATH
40682do
40683  IFS=$as_save_IFS
40684  test -z "$as_dir" && as_dir=.
40685    for ac_exec_ext in '' $ac_executable_extensions; do
40686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40687    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40689    break 2
40690  fi
40691done
40692  done
40693IFS=$as_save_IFS
40694
40695  ;;
40696esac
40697fi
40698GNM=$ac_cv_path_GNM
40699if test -n "$GNM"; then
40700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40701$as_echo "$GNM" >&6; }
40702else
40703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40704$as_echo "no" >&6; }
40705fi
40706
40707
40708          if test "x$GNM" = x; then
40709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40710          fi
40711        else
40712          # Otherwise we believe it is a complete path. Use it as it is.
40713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40714$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40716$as_echo_n "checking for GNM... " >&6; }
40717          if test ! -x "$tool_specified"; then
40718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40719$as_echo "not found" >&6; }
40720            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40721          fi
40722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40723$as_echo "$tool_specified" >&6; }
40724        fi
40725      fi
40726    fi
40727
40728  fi
40729
40730
40731
40732  # Only process if variable expands to non-empty
40733
40734  if test "x$GNM" != x; then
40735    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40736
40737  # First separate the path from the arguments. This will split at the first
40738  # space.
40739  complete="$GNM"
40740  path="${complete%% *}"
40741  tmp="$complete EOL"
40742  arguments="${tmp#* }"
40743
40744  # Input might be given as Windows format, start by converting to
40745  # unix format.
40746  new_path=`$CYGPATH -u "$path"`
40747
40748  # Now try to locate executable using which
40749  new_path=`$WHICH "$new_path" 2> /dev/null`
40750  # bat and cmd files are not always considered executable in cygwin causing which
40751  # to not find them
40752  if test "x$new_path" = x \
40753      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40754      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40755    new_path=`$CYGPATH -u "$path"`
40756  fi
40757  if test "x$new_path" = x; then
40758    # Oops. Which didn't find the executable.
40759    # The splitting of arguments from the executable at a space might have been incorrect,
40760    # since paths with space are more likely in Windows. Give it another try with the whole
40761    # argument.
40762    path="$complete"
40763    arguments="EOL"
40764    new_path=`$CYGPATH -u "$path"`
40765    new_path=`$WHICH "$new_path" 2> /dev/null`
40766    # bat and cmd files are not always considered executable in cygwin causing which
40767    # to not find them
40768    if test "x$new_path" = x \
40769        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40770        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40771      new_path=`$CYGPATH -u "$path"`
40772    fi
40773    if test "x$new_path" = x; then
40774      # It's still not found. Now this is an unrecoverable error.
40775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40776$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40777      has_space=`$ECHO "$complete" | $GREP " "`
40778      if test "x$has_space" != x; then
40779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40781      fi
40782      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40783    fi
40784  fi
40785
40786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40789  # "foo.exe" is OK but "foo" is an error.
40790  #
40791  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40792  # It is also a way to make sure we got the proper file name for the real test later on.
40793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40794  if test "x$test_shortpath" = x; then
40795    # Short path failed, file does not exist as specified.
40796    # Try adding .exe or .cmd
40797    if test -f "${new_path}.exe"; then
40798      input_to_shortpath="${new_path}.exe"
40799    elif test -f "${new_path}.cmd"; then
40800      input_to_shortpath="${new_path}.cmd"
40801    else
40802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40803$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40804      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40805$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40806      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40807    fi
40808  else
40809    input_to_shortpath="$new_path"
40810  fi
40811
40812  # Call helper function which possibly converts this using DOS-style short mode.
40813  # If so, the updated path is stored in $new_path.
40814  new_path="$input_to_shortpath"
40815
40816  input_path="$input_to_shortpath"
40817  # Check if we need to convert this using DOS-style short mode. If the path
40818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40819  # take no chances and rewrite it.
40820  # Note: m4 eats our [], so we need to use [ and ] instead.
40821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40822  if test "x$has_forbidden_chars" != x; then
40823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40827      # Going to short mode and back again did indeed matter. Since short mode is
40828      # case insensitive, let's make it lowercase to improve readability.
40829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40830      # Now convert it back to Unix-style (cygpath)
40831      input_path=`$CYGPATH -u "$shortmode_path"`
40832      new_path="$input_path"
40833    fi
40834  fi
40835
40836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40837  if test "x$test_cygdrive_prefix" = x; then
40838    # As a simple fix, exclude /usr/bin since it's not a real path.
40839    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40841      # a path prefixed by /cygdrive for fixpath to work.
40842      new_path="$CYGWIN_ROOT_PATH$input_path"
40843    fi
40844  fi
40845
40846  # remove trailing .exe if any
40847  new_path="${new_path/%.exe/}"
40848
40849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40850
40851  # First separate the path from the arguments. This will split at the first
40852  # space.
40853  complete="$GNM"
40854  path="${complete%% *}"
40855  tmp="$complete EOL"
40856  arguments="${tmp#* }"
40857
40858  # Input might be given as Windows format, start by converting to
40859  # unix format.
40860  new_path="$path"
40861
40862  windows_path="$new_path"
40863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40864    unix_path=`$CYGPATH -u "$windows_path"`
40865    new_path="$unix_path"
40866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40868    new_path="$unix_path"
40869  fi
40870
40871
40872  # Now try to locate executable using which
40873  new_path=`$WHICH "$new_path" 2> /dev/null`
40874
40875  if test "x$new_path" = x; then
40876    # Oops. Which didn't find the executable.
40877    # The splitting of arguments from the executable at a space might have been incorrect,
40878    # since paths with space are more likely in Windows. Give it another try with the whole
40879    # argument.
40880    path="$complete"
40881    arguments="EOL"
40882    new_path="$path"
40883
40884  windows_path="$new_path"
40885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40886    unix_path=`$CYGPATH -u "$windows_path"`
40887    new_path="$unix_path"
40888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40890    new_path="$unix_path"
40891  fi
40892
40893
40894    new_path=`$WHICH "$new_path" 2> /dev/null`
40895    # bat and cmd files are not always considered executable in MSYS causing which
40896    # to not find them
40897    if test "x$new_path" = x \
40898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40900      new_path="$path"
40901
40902  windows_path="$new_path"
40903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40904    unix_path=`$CYGPATH -u "$windows_path"`
40905    new_path="$unix_path"
40906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40908    new_path="$unix_path"
40909  fi
40910
40911    fi
40912
40913    if test "x$new_path" = x; then
40914      # It's still not found. Now this is an unrecoverable error.
40915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40916$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40917      has_space=`$ECHO "$complete" | $GREP " "`
40918      if test "x$has_space" != x; then
40919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40921      fi
40922      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40923    fi
40924  fi
40925
40926  # Now new_path has a complete unix path to the binary
40927  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40928    # Keep paths in /bin as-is, but remove trailing .exe if any
40929    new_path="${new_path/%.exe/}"
40930    # Do not save /bin paths to all_fixpath_prefixes!
40931  else
40932    # Not in mixed or Windows style, start by that.
40933    new_path=`cmd //c echo $new_path`
40934
40935  input_path="$new_path"
40936  # Check if we need to convert this using DOS-style short mode. If the path
40937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40938  # take no chances and rewrite it.
40939  # Note: m4 eats our [], so we need to use [ and ] instead.
40940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40941  if test "x$has_forbidden_chars" != x; then
40942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40944  fi
40945
40946    # Output is in $new_path
40947
40948  windows_path="$new_path"
40949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40950    unix_path=`$CYGPATH -u "$windows_path"`
40951    new_path="$unix_path"
40952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40954    new_path="$unix_path"
40955  fi
40956
40957    # remove trailing .exe if any
40958    new_path="${new_path/%.exe/}"
40959
40960    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40961    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40962  fi
40963
40964    else
40965      # We're on a unix platform. Hooray! :)
40966      # First separate the path from the arguments. This will split at the first
40967      # space.
40968      complete="$GNM"
40969      path="${complete%% *}"
40970      tmp="$complete EOL"
40971      arguments="${tmp#* }"
40972
40973      # Cannot rely on the command "which" here since it doesn't always work.
40974      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40975      if test -z "$is_absolute_path"; then
40976        # Path to executable is not absolute. Find it.
40977        IFS_save="$IFS"
40978        IFS=:
40979        for p in $PATH; do
40980          if test -f "$p/$path" && test -x "$p/$path"; then
40981            new_path="$p/$path"
40982            break
40983          fi
40984        done
40985        IFS="$IFS_save"
40986      else
40987        # This is an absolute path, we can use it without further modifications.
40988        new_path="$path"
40989      fi
40990
40991      if test "x$new_path" = x; then
40992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40993$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40994        has_space=`$ECHO "$complete" | $GREP " "`
40995        if test "x$has_space" != x; then
40996          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40997$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40998        fi
40999        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41000      fi
41001    fi
41002
41003    # Now join together the path and the arguments once again
41004    if test "x$arguments" != xEOL; then
41005      new_complete="$new_path ${arguments% *}"
41006    else
41007      new_complete="$new_path"
41008    fi
41009
41010    if test "x$complete" != "x$new_complete"; then
41011      GNM="$new_complete"
41012      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41013$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41014    fi
41015  fi
41016
41017  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41018    # FIXME: we should unify this with the solaris case above.
41019
41020
41021  # Publish this variable in the help.
41022
41023
41024  if [ -z "${STRIP+x}" ]; then
41025    # The variable is not set by user, try to locate tool using the code snippet
41026    if test -n "$ac_tool_prefix"; then
41027  for ac_prog in strip
41028  do
41029    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41032$as_echo_n "checking for $ac_word... " >&6; }
41033if ${ac_cv_prog_STRIP+:} false; then :
41034  $as_echo_n "(cached) " >&6
41035else
41036  if test -n "$STRIP"; then
41037  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41038else
41039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41040for as_dir in $PATH
41041do
41042  IFS=$as_save_IFS
41043  test -z "$as_dir" && as_dir=.
41044    for ac_exec_ext in '' $ac_executable_extensions; do
41045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41046    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41048    break 2
41049  fi
41050done
41051  done
41052IFS=$as_save_IFS
41053
41054fi
41055fi
41056STRIP=$ac_cv_prog_STRIP
41057if test -n "$STRIP"; then
41058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41059$as_echo "$STRIP" >&6; }
41060else
41061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41062$as_echo "no" >&6; }
41063fi
41064
41065
41066    test -n "$STRIP" && break
41067  done
41068fi
41069if test -z "$STRIP"; then
41070  ac_ct_STRIP=$STRIP
41071  for ac_prog in strip
41072do
41073  # Extract the first word of "$ac_prog", so it can be a program name with args.
41074set dummy $ac_prog; ac_word=$2
41075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41076$as_echo_n "checking for $ac_word... " >&6; }
41077if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41078  $as_echo_n "(cached) " >&6
41079else
41080  if test -n "$ac_ct_STRIP"; then
41081  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41082else
41083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41084for as_dir in $PATH
41085do
41086  IFS=$as_save_IFS
41087  test -z "$as_dir" && as_dir=.
41088    for ac_exec_ext in '' $ac_executable_extensions; do
41089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41090    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41092    break 2
41093  fi
41094done
41095  done
41096IFS=$as_save_IFS
41097
41098fi
41099fi
41100ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41101if test -n "$ac_ct_STRIP"; then
41102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41103$as_echo "$ac_ct_STRIP" >&6; }
41104else
41105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41106$as_echo "no" >&6; }
41107fi
41108
41109
41110  test -n "$ac_ct_STRIP" && break
41111done
41112
41113  if test "x$ac_ct_STRIP" = x; then
41114    STRIP=""
41115  else
41116    case $cross_compiling:$ac_tool_warned in
41117yes:)
41118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41120ac_tool_warned=yes ;;
41121esac
41122    STRIP=$ac_ct_STRIP
41123  fi
41124fi
41125
41126  else
41127    # The variable is set, but is it from the command line or the environment?
41128
41129    # Try to remove the string !STRIP! from our list.
41130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41132      # If it failed, the variable was not from the command line. Ignore it,
41133      # but warn the user (except for BASH, which is always set by the calling BASH).
41134      if test "xSTRIP" != xBASH; then
41135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41136$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41137      fi
41138      # Try to locate tool using the code snippet
41139      if test -n "$ac_tool_prefix"; then
41140  for ac_prog in strip
41141  do
41142    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41143set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41145$as_echo_n "checking for $ac_word... " >&6; }
41146if ${ac_cv_prog_STRIP+:} false; then :
41147  $as_echo_n "(cached) " >&6
41148else
41149  if test -n "$STRIP"; then
41150  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41151else
41152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41153for as_dir in $PATH
41154do
41155  IFS=$as_save_IFS
41156  test -z "$as_dir" && as_dir=.
41157    for ac_exec_ext in '' $ac_executable_extensions; do
41158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41159    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41161    break 2
41162  fi
41163done
41164  done
41165IFS=$as_save_IFS
41166
41167fi
41168fi
41169STRIP=$ac_cv_prog_STRIP
41170if test -n "$STRIP"; then
41171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41172$as_echo "$STRIP" >&6; }
41173else
41174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41175$as_echo "no" >&6; }
41176fi
41177
41178
41179    test -n "$STRIP" && break
41180  done
41181fi
41182if test -z "$STRIP"; then
41183  ac_ct_STRIP=$STRIP
41184  for ac_prog in strip
41185do
41186  # Extract the first word of "$ac_prog", so it can be a program name with args.
41187set dummy $ac_prog; ac_word=$2
41188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41189$as_echo_n "checking for $ac_word... " >&6; }
41190if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41191  $as_echo_n "(cached) " >&6
41192else
41193  if test -n "$ac_ct_STRIP"; then
41194  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41195else
41196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41197for as_dir in $PATH
41198do
41199  IFS=$as_save_IFS
41200  test -z "$as_dir" && as_dir=.
41201    for ac_exec_ext in '' $ac_executable_extensions; do
41202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41203    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41205    break 2
41206  fi
41207done
41208  done
41209IFS=$as_save_IFS
41210
41211fi
41212fi
41213ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41214if test -n "$ac_ct_STRIP"; then
41215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41216$as_echo "$ac_ct_STRIP" >&6; }
41217else
41218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41219$as_echo "no" >&6; }
41220fi
41221
41222
41223  test -n "$ac_ct_STRIP" && break
41224done
41225
41226  if test "x$ac_ct_STRIP" = x; then
41227    STRIP=""
41228  else
41229    case $cross_compiling:$ac_tool_warned in
41230yes:)
41231{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41232$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41233ac_tool_warned=yes ;;
41234esac
41235    STRIP=$ac_ct_STRIP
41236  fi
41237fi
41238
41239    else
41240      # If it succeeded, then it was overridden by the user. We will use it
41241      # for the tool.
41242
41243      # First remove it from the list of overridden variables, so we can test
41244      # for unknown variables in the end.
41245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41246
41247      # Check if we try to supply an empty value
41248      if test "x$STRIP" = x; then
41249        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41250$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41252$as_echo_n "checking for STRIP... " >&6; }
41253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41254$as_echo "disabled" >&6; }
41255      else
41256        # Check if the provided tool contains a complete path.
41257        tool_specified="$STRIP"
41258        tool_basename="${tool_specified##*/}"
41259        if test "x$tool_basename" = "x$tool_specified"; then
41260          # A command without a complete path is provided, search $PATH.
41261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41262$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41263          # Extract the first word of "$tool_basename", so it can be a program name with args.
41264set dummy $tool_basename; ac_word=$2
41265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41266$as_echo_n "checking for $ac_word... " >&6; }
41267if ${ac_cv_path_STRIP+:} false; then :
41268  $as_echo_n "(cached) " >&6
41269else
41270  case $STRIP in
41271  [\\/]* | ?:[\\/]*)
41272  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41273  ;;
41274  *)
41275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41276for as_dir in $PATH
41277do
41278  IFS=$as_save_IFS
41279  test -z "$as_dir" && as_dir=.
41280    for ac_exec_ext in '' $ac_executable_extensions; do
41281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41282    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41284    break 2
41285  fi
41286done
41287  done
41288IFS=$as_save_IFS
41289
41290  ;;
41291esac
41292fi
41293STRIP=$ac_cv_path_STRIP
41294if test -n "$STRIP"; then
41295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41296$as_echo "$STRIP" >&6; }
41297else
41298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41299$as_echo "no" >&6; }
41300fi
41301
41302
41303          if test "x$STRIP" = x; then
41304            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41305          fi
41306        else
41307          # Otherwise we believe it is a complete path. Use it as it is.
41308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41309$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41310          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41311$as_echo_n "checking for STRIP... " >&6; }
41312          if test ! -x "$tool_specified"; then
41313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41314$as_echo "not found" >&6; }
41315            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41316          fi
41317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41318$as_echo "$tool_specified" >&6; }
41319        fi
41320      fi
41321    fi
41322
41323  fi
41324
41325
41326
41327  # Only process if variable expands to non-empty
41328
41329  if test "x$STRIP" != x; then
41330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41331
41332  # First separate the path from the arguments. This will split at the first
41333  # space.
41334  complete="$STRIP"
41335  path="${complete%% *}"
41336  tmp="$complete EOL"
41337  arguments="${tmp#* }"
41338
41339  # Input might be given as Windows format, start by converting to
41340  # unix format.
41341  new_path=`$CYGPATH -u "$path"`
41342
41343  # Now try to locate executable using which
41344  new_path=`$WHICH "$new_path" 2> /dev/null`
41345  # bat and cmd files are not always considered executable in cygwin causing which
41346  # to not find them
41347  if test "x$new_path" = x \
41348      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41349      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41350    new_path=`$CYGPATH -u "$path"`
41351  fi
41352  if test "x$new_path" = x; then
41353    # Oops. Which didn't find the executable.
41354    # The splitting of arguments from the executable at a space might have been incorrect,
41355    # since paths with space are more likely in Windows. Give it another try with the whole
41356    # argument.
41357    path="$complete"
41358    arguments="EOL"
41359    new_path=`$CYGPATH -u "$path"`
41360    new_path=`$WHICH "$new_path" 2> /dev/null`
41361    # bat and cmd files are not always considered executable in cygwin causing which
41362    # to not find them
41363    if test "x$new_path" = x \
41364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41366      new_path=`$CYGPATH -u "$path"`
41367    fi
41368    if test "x$new_path" = x; then
41369      # It's still not found. Now this is an unrecoverable error.
41370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41371$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41372      has_space=`$ECHO "$complete" | $GREP " "`
41373      if test "x$has_space" != x; then
41374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41376      fi
41377      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41378    fi
41379  fi
41380
41381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41384  # "foo.exe" is OK but "foo" is an error.
41385  #
41386  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41387  # It is also a way to make sure we got the proper file name for the real test later on.
41388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41389  if test "x$test_shortpath" = x; then
41390    # Short path failed, file does not exist as specified.
41391    # Try adding .exe or .cmd
41392    if test -f "${new_path}.exe"; then
41393      input_to_shortpath="${new_path}.exe"
41394    elif test -f "${new_path}.cmd"; then
41395      input_to_shortpath="${new_path}.cmd"
41396    else
41397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41398$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41399      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41400$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41401      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41402    fi
41403  else
41404    input_to_shortpath="$new_path"
41405  fi
41406
41407  # Call helper function which possibly converts this using DOS-style short mode.
41408  # If so, the updated path is stored in $new_path.
41409  new_path="$input_to_shortpath"
41410
41411  input_path="$input_to_shortpath"
41412  # Check if we need to convert this using DOS-style short mode. If the path
41413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41414  # take no chances and rewrite it.
41415  # Note: m4 eats our [], so we need to use [ and ] instead.
41416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41417  if test "x$has_forbidden_chars" != x; then
41418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41422      # Going to short mode and back again did indeed matter. Since short mode is
41423      # case insensitive, let's make it lowercase to improve readability.
41424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41425      # Now convert it back to Unix-style (cygpath)
41426      input_path=`$CYGPATH -u "$shortmode_path"`
41427      new_path="$input_path"
41428    fi
41429  fi
41430
41431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41432  if test "x$test_cygdrive_prefix" = x; then
41433    # As a simple fix, exclude /usr/bin since it's not a real path.
41434    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41436      # a path prefixed by /cygdrive for fixpath to work.
41437      new_path="$CYGWIN_ROOT_PATH$input_path"
41438    fi
41439  fi
41440
41441  # remove trailing .exe if any
41442  new_path="${new_path/%.exe/}"
41443
41444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41445
41446  # First separate the path from the arguments. This will split at the first
41447  # space.
41448  complete="$STRIP"
41449  path="${complete%% *}"
41450  tmp="$complete EOL"
41451  arguments="${tmp#* }"
41452
41453  # Input might be given as Windows format, start by converting to
41454  # unix format.
41455  new_path="$path"
41456
41457  windows_path="$new_path"
41458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41459    unix_path=`$CYGPATH -u "$windows_path"`
41460    new_path="$unix_path"
41461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41463    new_path="$unix_path"
41464  fi
41465
41466
41467  # Now try to locate executable using which
41468  new_path=`$WHICH "$new_path" 2> /dev/null`
41469
41470  if test "x$new_path" = x; then
41471    # Oops. Which didn't find the executable.
41472    # The splitting of arguments from the executable at a space might have been incorrect,
41473    # since paths with space are more likely in Windows. Give it another try with the whole
41474    # argument.
41475    path="$complete"
41476    arguments="EOL"
41477    new_path="$path"
41478
41479  windows_path="$new_path"
41480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41481    unix_path=`$CYGPATH -u "$windows_path"`
41482    new_path="$unix_path"
41483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41485    new_path="$unix_path"
41486  fi
41487
41488
41489    new_path=`$WHICH "$new_path" 2> /dev/null`
41490    # bat and cmd files are not always considered executable in MSYS causing which
41491    # to not find them
41492    if test "x$new_path" = x \
41493        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41494        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41495      new_path="$path"
41496
41497  windows_path="$new_path"
41498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41499    unix_path=`$CYGPATH -u "$windows_path"`
41500    new_path="$unix_path"
41501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41503    new_path="$unix_path"
41504  fi
41505
41506    fi
41507
41508    if test "x$new_path" = x; then
41509      # It's still not found. Now this is an unrecoverable error.
41510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41511$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41512      has_space=`$ECHO "$complete" | $GREP " "`
41513      if test "x$has_space" != x; then
41514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41516      fi
41517      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41518    fi
41519  fi
41520
41521  # Now new_path has a complete unix path to the binary
41522  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41523    # Keep paths in /bin as-is, but remove trailing .exe if any
41524    new_path="${new_path/%.exe/}"
41525    # Do not save /bin paths to all_fixpath_prefixes!
41526  else
41527    # Not in mixed or Windows style, start by that.
41528    new_path=`cmd //c echo $new_path`
41529
41530  input_path="$new_path"
41531  # Check if we need to convert this using DOS-style short mode. If the path
41532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41533  # take no chances and rewrite it.
41534  # Note: m4 eats our [], so we need to use [ and ] instead.
41535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41536  if test "x$has_forbidden_chars" != x; then
41537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41539  fi
41540
41541    # Output is in $new_path
41542
41543  windows_path="$new_path"
41544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41545    unix_path=`$CYGPATH -u "$windows_path"`
41546    new_path="$unix_path"
41547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41549    new_path="$unix_path"
41550  fi
41551
41552    # remove trailing .exe if any
41553    new_path="${new_path/%.exe/}"
41554
41555    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41556    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41557  fi
41558
41559    else
41560      # We're on a unix platform. Hooray! :)
41561      # First separate the path from the arguments. This will split at the first
41562      # space.
41563      complete="$STRIP"
41564      path="${complete%% *}"
41565      tmp="$complete EOL"
41566      arguments="${tmp#* }"
41567
41568      # Cannot rely on the command "which" here since it doesn't always work.
41569      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41570      if test -z "$is_absolute_path"; then
41571        # Path to executable is not absolute. Find it.
41572        IFS_save="$IFS"
41573        IFS=:
41574        for p in $PATH; do
41575          if test -f "$p/$path" && test -x "$p/$path"; then
41576            new_path="$p/$path"
41577            break
41578          fi
41579        done
41580        IFS="$IFS_save"
41581      else
41582        # This is an absolute path, we can use it without further modifications.
41583        new_path="$path"
41584      fi
41585
41586      if test "x$new_path" = x; then
41587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41588$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41589        has_space=`$ECHO "$complete" | $GREP " "`
41590        if test "x$has_space" != x; then
41591          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41592$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41593        fi
41594        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41595      fi
41596    fi
41597
41598    # Now join together the path and the arguments once again
41599    if test "x$arguments" != xEOL; then
41600      new_complete="$new_path ${arguments% *}"
41601    else
41602      new_complete="$new_path"
41603    fi
41604
41605    if test "x$complete" != "x$new_complete"; then
41606      STRIP="$new_complete"
41607      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41608$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41609    fi
41610  fi
41611
41612    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41613
41614
41615  # Publish this variable in the help.
41616
41617
41618  if [ -z "${NM+x}" ]; then
41619    # The variable is not set by user, try to locate tool using the code snippet
41620    if test -n "$ac_tool_prefix"; then
41621  for ac_prog in nm gcc-nm
41622  do
41623    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41624set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41626$as_echo_n "checking for $ac_word... " >&6; }
41627if ${ac_cv_prog_NM+:} false; then :
41628  $as_echo_n "(cached) " >&6
41629else
41630  if test -n "$NM"; then
41631  ac_cv_prog_NM="$NM" # Let the user override the test.
41632else
41633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41634for as_dir in $PATH
41635do
41636  IFS=$as_save_IFS
41637  test -z "$as_dir" && as_dir=.
41638    for ac_exec_ext in '' $ac_executable_extensions; do
41639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41640    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41642    break 2
41643  fi
41644done
41645  done
41646IFS=$as_save_IFS
41647
41648fi
41649fi
41650NM=$ac_cv_prog_NM
41651if test -n "$NM"; then
41652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41653$as_echo "$NM" >&6; }
41654else
41655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41656$as_echo "no" >&6; }
41657fi
41658
41659
41660    test -n "$NM" && break
41661  done
41662fi
41663if test -z "$NM"; then
41664  ac_ct_NM=$NM
41665  for ac_prog in nm gcc-nm
41666do
41667  # Extract the first word of "$ac_prog", so it can be a program name with args.
41668set dummy $ac_prog; ac_word=$2
41669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41670$as_echo_n "checking for $ac_word... " >&6; }
41671if ${ac_cv_prog_ac_ct_NM+:} false; then :
41672  $as_echo_n "(cached) " >&6
41673else
41674  if test -n "$ac_ct_NM"; then
41675  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41676else
41677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41678for as_dir in $PATH
41679do
41680  IFS=$as_save_IFS
41681  test -z "$as_dir" && as_dir=.
41682    for ac_exec_ext in '' $ac_executable_extensions; do
41683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41684    ac_cv_prog_ac_ct_NM="$ac_prog"
41685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41686    break 2
41687  fi
41688done
41689  done
41690IFS=$as_save_IFS
41691
41692fi
41693fi
41694ac_ct_NM=$ac_cv_prog_ac_ct_NM
41695if test -n "$ac_ct_NM"; then
41696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41697$as_echo "$ac_ct_NM" >&6; }
41698else
41699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41700$as_echo "no" >&6; }
41701fi
41702
41703
41704  test -n "$ac_ct_NM" && break
41705done
41706
41707  if test "x$ac_ct_NM" = x; then
41708    NM=""
41709  else
41710    case $cross_compiling:$ac_tool_warned in
41711yes:)
41712{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41713$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41714ac_tool_warned=yes ;;
41715esac
41716    NM=$ac_ct_NM
41717  fi
41718fi
41719
41720  else
41721    # The variable is set, but is it from the command line or the environment?
41722
41723    # Try to remove the string !NM! from our list.
41724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41726      # If it failed, the variable was not from the command line. Ignore it,
41727      # but warn the user (except for BASH, which is always set by the calling BASH).
41728      if test "xNM" != xBASH; then
41729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41730$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41731      fi
41732      # Try to locate tool using the code snippet
41733      if test -n "$ac_tool_prefix"; then
41734  for ac_prog in nm gcc-nm
41735  do
41736    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41739$as_echo_n "checking for $ac_word... " >&6; }
41740if ${ac_cv_prog_NM+:} false; then :
41741  $as_echo_n "(cached) " >&6
41742else
41743  if test -n "$NM"; then
41744  ac_cv_prog_NM="$NM" # Let the user override the test.
41745else
41746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41747for as_dir in $PATH
41748do
41749  IFS=$as_save_IFS
41750  test -z "$as_dir" && as_dir=.
41751    for ac_exec_ext in '' $ac_executable_extensions; do
41752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41753    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41755    break 2
41756  fi
41757done
41758  done
41759IFS=$as_save_IFS
41760
41761fi
41762fi
41763NM=$ac_cv_prog_NM
41764if test -n "$NM"; then
41765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41766$as_echo "$NM" >&6; }
41767else
41768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41769$as_echo "no" >&6; }
41770fi
41771
41772
41773    test -n "$NM" && break
41774  done
41775fi
41776if test -z "$NM"; then
41777  ac_ct_NM=$NM
41778  for ac_prog in nm gcc-nm
41779do
41780  # Extract the first word of "$ac_prog", so it can be a program name with args.
41781set dummy $ac_prog; ac_word=$2
41782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41783$as_echo_n "checking for $ac_word... " >&6; }
41784if ${ac_cv_prog_ac_ct_NM+:} false; then :
41785  $as_echo_n "(cached) " >&6
41786else
41787  if test -n "$ac_ct_NM"; then
41788  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41789else
41790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41791for as_dir in $PATH
41792do
41793  IFS=$as_save_IFS
41794  test -z "$as_dir" && as_dir=.
41795    for ac_exec_ext in '' $ac_executable_extensions; do
41796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41797    ac_cv_prog_ac_ct_NM="$ac_prog"
41798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41799    break 2
41800  fi
41801done
41802  done
41803IFS=$as_save_IFS
41804
41805fi
41806fi
41807ac_ct_NM=$ac_cv_prog_ac_ct_NM
41808if test -n "$ac_ct_NM"; then
41809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41810$as_echo "$ac_ct_NM" >&6; }
41811else
41812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41813$as_echo "no" >&6; }
41814fi
41815
41816
41817  test -n "$ac_ct_NM" && break
41818done
41819
41820  if test "x$ac_ct_NM" = x; then
41821    NM=""
41822  else
41823    case $cross_compiling:$ac_tool_warned in
41824yes:)
41825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41827ac_tool_warned=yes ;;
41828esac
41829    NM=$ac_ct_NM
41830  fi
41831fi
41832
41833    else
41834      # If it succeeded, then it was overridden by the user. We will use it
41835      # for the tool.
41836
41837      # First remove it from the list of overridden variables, so we can test
41838      # for unknown variables in the end.
41839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41840
41841      # Check if we try to supply an empty value
41842      if test "x$NM" = x; then
41843        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41844$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41845        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41846$as_echo_n "checking for NM... " >&6; }
41847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41848$as_echo "disabled" >&6; }
41849      else
41850        # Check if the provided tool contains a complete path.
41851        tool_specified="$NM"
41852        tool_basename="${tool_specified##*/}"
41853        if test "x$tool_basename" = "x$tool_specified"; then
41854          # A command without a complete path is provided, search $PATH.
41855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41856$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41857          # Extract the first word of "$tool_basename", so it can be a program name with args.
41858set dummy $tool_basename; ac_word=$2
41859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41860$as_echo_n "checking for $ac_word... " >&6; }
41861if ${ac_cv_path_NM+:} false; then :
41862  $as_echo_n "(cached) " >&6
41863else
41864  case $NM in
41865  [\\/]* | ?:[\\/]*)
41866  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41867  ;;
41868  *)
41869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41870for as_dir in $PATH
41871do
41872  IFS=$as_save_IFS
41873  test -z "$as_dir" && as_dir=.
41874    for ac_exec_ext in '' $ac_executable_extensions; do
41875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41876    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41878    break 2
41879  fi
41880done
41881  done
41882IFS=$as_save_IFS
41883
41884  ;;
41885esac
41886fi
41887NM=$ac_cv_path_NM
41888if test -n "$NM"; then
41889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41890$as_echo "$NM" >&6; }
41891else
41892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41893$as_echo "no" >&6; }
41894fi
41895
41896
41897          if test "x$NM" = x; then
41898            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41899          fi
41900        else
41901          # Otherwise we believe it is a complete path. Use it as it is.
41902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41903$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41904          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41905$as_echo_n "checking for NM... " >&6; }
41906          if test ! -x "$tool_specified"; then
41907            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41908$as_echo "not found" >&6; }
41909            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41910          fi
41911          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41912$as_echo "$tool_specified" >&6; }
41913        fi
41914      fi
41915    fi
41916
41917  fi
41918
41919
41920    else
41921
41922
41923  # Publish this variable in the help.
41924
41925
41926  if [ -z "${NM+x}" ]; then
41927    # The variable is not set by user, try to locate tool using the code snippet
41928    if test -n "$ac_tool_prefix"; then
41929  for ac_prog in nm
41930  do
41931    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41932set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41934$as_echo_n "checking for $ac_word... " >&6; }
41935if ${ac_cv_prog_NM+:} false; then :
41936  $as_echo_n "(cached) " >&6
41937else
41938  if test -n "$NM"; then
41939  ac_cv_prog_NM="$NM" # Let the user override the test.
41940else
41941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41942for as_dir in $PATH
41943do
41944  IFS=$as_save_IFS
41945  test -z "$as_dir" && as_dir=.
41946    for ac_exec_ext in '' $ac_executable_extensions; do
41947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41948    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41950    break 2
41951  fi
41952done
41953  done
41954IFS=$as_save_IFS
41955
41956fi
41957fi
41958NM=$ac_cv_prog_NM
41959if test -n "$NM"; then
41960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41961$as_echo "$NM" >&6; }
41962else
41963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41964$as_echo "no" >&6; }
41965fi
41966
41967
41968    test -n "$NM" && break
41969  done
41970fi
41971if test -z "$NM"; then
41972  ac_ct_NM=$NM
41973  for ac_prog in nm
41974do
41975  # Extract the first word of "$ac_prog", so it can be a program name with args.
41976set dummy $ac_prog; ac_word=$2
41977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41978$as_echo_n "checking for $ac_word... " >&6; }
41979if ${ac_cv_prog_ac_ct_NM+:} false; then :
41980  $as_echo_n "(cached) " >&6
41981else
41982  if test -n "$ac_ct_NM"; then
41983  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41984else
41985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41986for as_dir in $PATH
41987do
41988  IFS=$as_save_IFS
41989  test -z "$as_dir" && as_dir=.
41990    for ac_exec_ext in '' $ac_executable_extensions; do
41991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41992    ac_cv_prog_ac_ct_NM="$ac_prog"
41993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41994    break 2
41995  fi
41996done
41997  done
41998IFS=$as_save_IFS
41999
42000fi
42001fi
42002ac_ct_NM=$ac_cv_prog_ac_ct_NM
42003if test -n "$ac_ct_NM"; then
42004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42005$as_echo "$ac_ct_NM" >&6; }
42006else
42007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42008$as_echo "no" >&6; }
42009fi
42010
42011
42012  test -n "$ac_ct_NM" && break
42013done
42014
42015  if test "x$ac_ct_NM" = x; then
42016    NM=""
42017  else
42018    case $cross_compiling:$ac_tool_warned in
42019yes:)
42020{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42021$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42022ac_tool_warned=yes ;;
42023esac
42024    NM=$ac_ct_NM
42025  fi
42026fi
42027
42028  else
42029    # The variable is set, but is it from the command line or the environment?
42030
42031    # Try to remove the string !NM! from our list.
42032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42034      # If it failed, the variable was not from the command line. Ignore it,
42035      # but warn the user (except for BASH, which is always set by the calling BASH).
42036      if test "xNM" != xBASH; then
42037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42038$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42039      fi
42040      # Try to locate tool using the code snippet
42041      if test -n "$ac_tool_prefix"; then
42042  for ac_prog in nm
42043  do
42044    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42047$as_echo_n "checking for $ac_word... " >&6; }
42048if ${ac_cv_prog_NM+:} false; then :
42049  $as_echo_n "(cached) " >&6
42050else
42051  if test -n "$NM"; then
42052  ac_cv_prog_NM="$NM" # Let the user override the test.
42053else
42054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42055for as_dir in $PATH
42056do
42057  IFS=$as_save_IFS
42058  test -z "$as_dir" && as_dir=.
42059    for ac_exec_ext in '' $ac_executable_extensions; do
42060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42061    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42063    break 2
42064  fi
42065done
42066  done
42067IFS=$as_save_IFS
42068
42069fi
42070fi
42071NM=$ac_cv_prog_NM
42072if test -n "$NM"; then
42073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42074$as_echo "$NM" >&6; }
42075else
42076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42077$as_echo "no" >&6; }
42078fi
42079
42080
42081    test -n "$NM" && break
42082  done
42083fi
42084if test -z "$NM"; then
42085  ac_ct_NM=$NM
42086  for ac_prog in nm
42087do
42088  # Extract the first word of "$ac_prog", so it can be a program name with args.
42089set dummy $ac_prog; ac_word=$2
42090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42091$as_echo_n "checking for $ac_word... " >&6; }
42092if ${ac_cv_prog_ac_ct_NM+:} false; then :
42093  $as_echo_n "(cached) " >&6
42094else
42095  if test -n "$ac_ct_NM"; then
42096  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42097else
42098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42099for as_dir in $PATH
42100do
42101  IFS=$as_save_IFS
42102  test -z "$as_dir" && as_dir=.
42103    for ac_exec_ext in '' $ac_executable_extensions; do
42104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42105    ac_cv_prog_ac_ct_NM="$ac_prog"
42106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42107    break 2
42108  fi
42109done
42110  done
42111IFS=$as_save_IFS
42112
42113fi
42114fi
42115ac_ct_NM=$ac_cv_prog_ac_ct_NM
42116if test -n "$ac_ct_NM"; then
42117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42118$as_echo "$ac_ct_NM" >&6; }
42119else
42120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42121$as_echo "no" >&6; }
42122fi
42123
42124
42125  test -n "$ac_ct_NM" && break
42126done
42127
42128  if test "x$ac_ct_NM" = x; then
42129    NM=""
42130  else
42131    case $cross_compiling:$ac_tool_warned in
42132yes:)
42133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42135ac_tool_warned=yes ;;
42136esac
42137    NM=$ac_ct_NM
42138  fi
42139fi
42140
42141    else
42142      # If it succeeded, then it was overridden by the user. We will use it
42143      # for the tool.
42144
42145      # First remove it from the list of overridden variables, so we can test
42146      # for unknown variables in the end.
42147      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42148
42149      # Check if we try to supply an empty value
42150      if test "x$NM" = x; then
42151        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42152$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42154$as_echo_n "checking for NM... " >&6; }
42155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42156$as_echo "disabled" >&6; }
42157      else
42158        # Check if the provided tool contains a complete path.
42159        tool_specified="$NM"
42160        tool_basename="${tool_specified##*/}"
42161        if test "x$tool_basename" = "x$tool_specified"; then
42162          # A command without a complete path is provided, search $PATH.
42163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42164$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42165          # Extract the first word of "$tool_basename", so it can be a program name with args.
42166set dummy $tool_basename; ac_word=$2
42167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42168$as_echo_n "checking for $ac_word... " >&6; }
42169if ${ac_cv_path_NM+:} false; then :
42170  $as_echo_n "(cached) " >&6
42171else
42172  case $NM in
42173  [\\/]* | ?:[\\/]*)
42174  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42175  ;;
42176  *)
42177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42178for as_dir in $PATH
42179do
42180  IFS=$as_save_IFS
42181  test -z "$as_dir" && as_dir=.
42182    for ac_exec_ext in '' $ac_executable_extensions; do
42183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42184    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42186    break 2
42187  fi
42188done
42189  done
42190IFS=$as_save_IFS
42191
42192  ;;
42193esac
42194fi
42195NM=$ac_cv_path_NM
42196if test -n "$NM"; then
42197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42198$as_echo "$NM" >&6; }
42199else
42200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42201$as_echo "no" >&6; }
42202fi
42203
42204
42205          if test "x$NM" = x; then
42206            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42207          fi
42208        else
42209          # Otherwise we believe it is a complete path. Use it as it is.
42210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42211$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42212          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42213$as_echo_n "checking for NM... " >&6; }
42214          if test ! -x "$tool_specified"; then
42215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42216$as_echo "not found" >&6; }
42217            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42218          fi
42219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42220$as_echo "$tool_specified" >&6; }
42221        fi
42222      fi
42223    fi
42224
42225  fi
42226
42227
42228    fi
42229
42230  # Only process if variable expands to non-empty
42231
42232  if test "x$NM" != x; then
42233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42234
42235  # First separate the path from the arguments. This will split at the first
42236  # space.
42237  complete="$NM"
42238  path="${complete%% *}"
42239  tmp="$complete EOL"
42240  arguments="${tmp#* }"
42241
42242  # Input might be given as Windows format, start by converting to
42243  # unix format.
42244  new_path=`$CYGPATH -u "$path"`
42245
42246  # Now try to locate executable using which
42247  new_path=`$WHICH "$new_path" 2> /dev/null`
42248  # bat and cmd files are not always considered executable in cygwin causing which
42249  # to not find them
42250  if test "x$new_path" = x \
42251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42253    new_path=`$CYGPATH -u "$path"`
42254  fi
42255  if test "x$new_path" = x; then
42256    # Oops. Which didn't find the executable.
42257    # The splitting of arguments from the executable at a space might have been incorrect,
42258    # since paths with space are more likely in Windows. Give it another try with the whole
42259    # argument.
42260    path="$complete"
42261    arguments="EOL"
42262    new_path=`$CYGPATH -u "$path"`
42263    new_path=`$WHICH "$new_path" 2> /dev/null`
42264    # bat and cmd files are not always considered executable in cygwin causing which
42265    # to not find them
42266    if test "x$new_path" = x \
42267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42269      new_path=`$CYGPATH -u "$path"`
42270    fi
42271    if test "x$new_path" = x; then
42272      # It's still not found. Now this is an unrecoverable error.
42273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42274$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42275      has_space=`$ECHO "$complete" | $GREP " "`
42276      if test "x$has_space" != x; then
42277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42279      fi
42280      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42281    fi
42282  fi
42283
42284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42287  # "foo.exe" is OK but "foo" is an error.
42288  #
42289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42290  # It is also a way to make sure we got the proper file name for the real test later on.
42291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42292  if test "x$test_shortpath" = x; then
42293    # Short path failed, file does not exist as specified.
42294    # Try adding .exe or .cmd
42295    if test -f "${new_path}.exe"; then
42296      input_to_shortpath="${new_path}.exe"
42297    elif test -f "${new_path}.cmd"; then
42298      input_to_shortpath="${new_path}.cmd"
42299    else
42300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42301$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42304      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42305    fi
42306  else
42307    input_to_shortpath="$new_path"
42308  fi
42309
42310  # Call helper function which possibly converts this using DOS-style short mode.
42311  # If so, the updated path is stored in $new_path.
42312  new_path="$input_to_shortpath"
42313
42314  input_path="$input_to_shortpath"
42315  # Check if we need to convert this using DOS-style short mode. If the path
42316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42317  # take no chances and rewrite it.
42318  # Note: m4 eats our [], so we need to use [ and ] instead.
42319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42320  if test "x$has_forbidden_chars" != x; then
42321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42325      # Going to short mode and back again did indeed matter. Since short mode is
42326      # case insensitive, let's make it lowercase to improve readability.
42327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42328      # Now convert it back to Unix-style (cygpath)
42329      input_path=`$CYGPATH -u "$shortmode_path"`
42330      new_path="$input_path"
42331    fi
42332  fi
42333
42334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42335  if test "x$test_cygdrive_prefix" = x; then
42336    # As a simple fix, exclude /usr/bin since it's not a real path.
42337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42339      # a path prefixed by /cygdrive for fixpath to work.
42340      new_path="$CYGWIN_ROOT_PATH$input_path"
42341    fi
42342  fi
42343
42344  # remove trailing .exe if any
42345  new_path="${new_path/%.exe/}"
42346
42347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42348
42349  # First separate the path from the arguments. This will split at the first
42350  # space.
42351  complete="$NM"
42352  path="${complete%% *}"
42353  tmp="$complete EOL"
42354  arguments="${tmp#* }"
42355
42356  # Input might be given as Windows format, start by converting to
42357  # unix format.
42358  new_path="$path"
42359
42360  windows_path="$new_path"
42361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42362    unix_path=`$CYGPATH -u "$windows_path"`
42363    new_path="$unix_path"
42364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42366    new_path="$unix_path"
42367  fi
42368
42369
42370  # Now try to locate executable using which
42371  new_path=`$WHICH "$new_path" 2> /dev/null`
42372
42373  if test "x$new_path" = x; then
42374    # Oops. Which didn't find the executable.
42375    # The splitting of arguments from the executable at a space might have been incorrect,
42376    # since paths with space are more likely in Windows. Give it another try with the whole
42377    # argument.
42378    path="$complete"
42379    arguments="EOL"
42380    new_path="$path"
42381
42382  windows_path="$new_path"
42383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42384    unix_path=`$CYGPATH -u "$windows_path"`
42385    new_path="$unix_path"
42386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42388    new_path="$unix_path"
42389  fi
42390
42391
42392    new_path=`$WHICH "$new_path" 2> /dev/null`
42393    # bat and cmd files are not always considered executable in MSYS causing which
42394    # to not find them
42395    if test "x$new_path" = x \
42396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42398      new_path="$path"
42399
42400  windows_path="$new_path"
42401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42402    unix_path=`$CYGPATH -u "$windows_path"`
42403    new_path="$unix_path"
42404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42406    new_path="$unix_path"
42407  fi
42408
42409    fi
42410
42411    if test "x$new_path" = x; then
42412      # It's still not found. Now this is an unrecoverable error.
42413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42414$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42415      has_space=`$ECHO "$complete" | $GREP " "`
42416      if test "x$has_space" != x; then
42417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42419      fi
42420      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42421    fi
42422  fi
42423
42424  # Now new_path has a complete unix path to the binary
42425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42426    # Keep paths in /bin as-is, but remove trailing .exe if any
42427    new_path="${new_path/%.exe/}"
42428    # Do not save /bin paths to all_fixpath_prefixes!
42429  else
42430    # Not in mixed or Windows style, start by that.
42431    new_path=`cmd //c echo $new_path`
42432
42433  input_path="$new_path"
42434  # Check if we need to convert this using DOS-style short mode. If the path
42435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42436  # take no chances and rewrite it.
42437  # Note: m4 eats our [], so we need to use [ and ] instead.
42438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42439  if test "x$has_forbidden_chars" != x; then
42440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42442  fi
42443
42444    # Output is in $new_path
42445
42446  windows_path="$new_path"
42447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42448    unix_path=`$CYGPATH -u "$windows_path"`
42449    new_path="$unix_path"
42450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42452    new_path="$unix_path"
42453  fi
42454
42455    # remove trailing .exe if any
42456    new_path="${new_path/%.exe/}"
42457
42458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42460  fi
42461
42462    else
42463      # We're on a unix platform. Hooray! :)
42464      # First separate the path from the arguments. This will split at the first
42465      # space.
42466      complete="$NM"
42467      path="${complete%% *}"
42468      tmp="$complete EOL"
42469      arguments="${tmp#* }"
42470
42471      # Cannot rely on the command "which" here since it doesn't always work.
42472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42473      if test -z "$is_absolute_path"; then
42474        # Path to executable is not absolute. Find it.
42475        IFS_save="$IFS"
42476        IFS=:
42477        for p in $PATH; do
42478          if test -f "$p/$path" && test -x "$p/$path"; then
42479            new_path="$p/$path"
42480            break
42481          fi
42482        done
42483        IFS="$IFS_save"
42484      else
42485        # This is an absolute path, we can use it without further modifications.
42486        new_path="$path"
42487      fi
42488
42489      if test "x$new_path" = x; then
42490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42491$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42492        has_space=`$ECHO "$complete" | $GREP " "`
42493        if test "x$has_space" != x; then
42494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42496        fi
42497        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42498      fi
42499    fi
42500
42501    # Now join together the path and the arguments once again
42502    if test "x$arguments" != xEOL; then
42503      new_complete="$new_path ${arguments% *}"
42504    else
42505      new_complete="$new_path"
42506    fi
42507
42508    if test "x$complete" != "x$new_complete"; then
42509      NM="$new_complete"
42510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42511$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42512    fi
42513  fi
42514
42515    GNM="$NM"
42516
42517  fi
42518
42519  # objcopy is used for moving debug symbols to separate files when
42520  # full debug symbols are enabled.
42521  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42522
42523
42524  # Publish this variable in the help.
42525
42526
42527  if [ -z "${OBJCOPY+x}" ]; then
42528    # The variable is not set by user, try to locate tool using the code snippet
42529    if test -n "$ac_tool_prefix"; then
42530  for ac_prog in gobjcopy objcopy
42531  do
42532    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42533set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42535$as_echo_n "checking for $ac_word... " >&6; }
42536if ${ac_cv_prog_OBJCOPY+:} false; then :
42537  $as_echo_n "(cached) " >&6
42538else
42539  if test -n "$OBJCOPY"; then
42540  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42541else
42542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42543for as_dir in $PATH
42544do
42545  IFS=$as_save_IFS
42546  test -z "$as_dir" && as_dir=.
42547    for ac_exec_ext in '' $ac_executable_extensions; do
42548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42549    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42551    break 2
42552  fi
42553done
42554  done
42555IFS=$as_save_IFS
42556
42557fi
42558fi
42559OBJCOPY=$ac_cv_prog_OBJCOPY
42560if test -n "$OBJCOPY"; then
42561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42562$as_echo "$OBJCOPY" >&6; }
42563else
42564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42565$as_echo "no" >&6; }
42566fi
42567
42568
42569    test -n "$OBJCOPY" && break
42570  done
42571fi
42572if test -z "$OBJCOPY"; then
42573  ac_ct_OBJCOPY=$OBJCOPY
42574  for ac_prog in gobjcopy objcopy
42575do
42576  # Extract the first word of "$ac_prog", so it can be a program name with args.
42577set dummy $ac_prog; ac_word=$2
42578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42579$as_echo_n "checking for $ac_word... " >&6; }
42580if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42581  $as_echo_n "(cached) " >&6
42582else
42583  if test -n "$ac_ct_OBJCOPY"; then
42584  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42585else
42586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42587for as_dir in $PATH
42588do
42589  IFS=$as_save_IFS
42590  test -z "$as_dir" && as_dir=.
42591    for ac_exec_ext in '' $ac_executable_extensions; do
42592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42593    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42595    break 2
42596  fi
42597done
42598  done
42599IFS=$as_save_IFS
42600
42601fi
42602fi
42603ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42604if test -n "$ac_ct_OBJCOPY"; then
42605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42606$as_echo "$ac_ct_OBJCOPY" >&6; }
42607else
42608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42609$as_echo "no" >&6; }
42610fi
42611
42612
42613  test -n "$ac_ct_OBJCOPY" && break
42614done
42615
42616  if test "x$ac_ct_OBJCOPY" = x; then
42617    OBJCOPY=""
42618  else
42619    case $cross_compiling:$ac_tool_warned in
42620yes:)
42621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42623ac_tool_warned=yes ;;
42624esac
42625    OBJCOPY=$ac_ct_OBJCOPY
42626  fi
42627fi
42628
42629  else
42630    # The variable is set, but is it from the command line or the environment?
42631
42632    # Try to remove the string !OBJCOPY! from our list.
42633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42635      # If it failed, the variable was not from the command line. Ignore it,
42636      # but warn the user (except for BASH, which is always set by the calling BASH).
42637      if test "xOBJCOPY" != xBASH; then
42638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42639$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42640      fi
42641      # Try to locate tool using the code snippet
42642      if test -n "$ac_tool_prefix"; then
42643  for ac_prog in gobjcopy objcopy
42644  do
42645    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42646set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42648$as_echo_n "checking for $ac_word... " >&6; }
42649if ${ac_cv_prog_OBJCOPY+:} false; then :
42650  $as_echo_n "(cached) " >&6
42651else
42652  if test -n "$OBJCOPY"; then
42653  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42654else
42655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42656for as_dir in $PATH
42657do
42658  IFS=$as_save_IFS
42659  test -z "$as_dir" && as_dir=.
42660    for ac_exec_ext in '' $ac_executable_extensions; do
42661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42662    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42664    break 2
42665  fi
42666done
42667  done
42668IFS=$as_save_IFS
42669
42670fi
42671fi
42672OBJCOPY=$ac_cv_prog_OBJCOPY
42673if test -n "$OBJCOPY"; then
42674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42675$as_echo "$OBJCOPY" >&6; }
42676else
42677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42678$as_echo "no" >&6; }
42679fi
42680
42681
42682    test -n "$OBJCOPY" && break
42683  done
42684fi
42685if test -z "$OBJCOPY"; then
42686  ac_ct_OBJCOPY=$OBJCOPY
42687  for ac_prog in gobjcopy objcopy
42688do
42689  # Extract the first word of "$ac_prog", so it can be a program name with args.
42690set dummy $ac_prog; ac_word=$2
42691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42692$as_echo_n "checking for $ac_word... " >&6; }
42693if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42694  $as_echo_n "(cached) " >&6
42695else
42696  if test -n "$ac_ct_OBJCOPY"; then
42697  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42698else
42699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42700for as_dir in $PATH
42701do
42702  IFS=$as_save_IFS
42703  test -z "$as_dir" && as_dir=.
42704    for ac_exec_ext in '' $ac_executable_extensions; do
42705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42706    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42708    break 2
42709  fi
42710done
42711  done
42712IFS=$as_save_IFS
42713
42714fi
42715fi
42716ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42717if test -n "$ac_ct_OBJCOPY"; then
42718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42719$as_echo "$ac_ct_OBJCOPY" >&6; }
42720else
42721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42722$as_echo "no" >&6; }
42723fi
42724
42725
42726  test -n "$ac_ct_OBJCOPY" && break
42727done
42728
42729  if test "x$ac_ct_OBJCOPY" = x; then
42730    OBJCOPY=""
42731  else
42732    case $cross_compiling:$ac_tool_warned in
42733yes:)
42734{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42735$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42736ac_tool_warned=yes ;;
42737esac
42738    OBJCOPY=$ac_ct_OBJCOPY
42739  fi
42740fi
42741
42742    else
42743      # If it succeeded, then it was overridden by the user. We will use it
42744      # for the tool.
42745
42746      # First remove it from the list of overridden variables, so we can test
42747      # for unknown variables in the end.
42748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42749
42750      # Check if we try to supply an empty value
42751      if test "x$OBJCOPY" = x; then
42752        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42753$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42755$as_echo_n "checking for OBJCOPY... " >&6; }
42756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42757$as_echo "disabled" >&6; }
42758      else
42759        # Check if the provided tool contains a complete path.
42760        tool_specified="$OBJCOPY"
42761        tool_basename="${tool_specified##*/}"
42762        if test "x$tool_basename" = "x$tool_specified"; then
42763          # A command without a complete path is provided, search $PATH.
42764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42765$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42766          # Extract the first word of "$tool_basename", so it can be a program name with args.
42767set dummy $tool_basename; ac_word=$2
42768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42769$as_echo_n "checking for $ac_word... " >&6; }
42770if ${ac_cv_path_OBJCOPY+:} false; then :
42771  $as_echo_n "(cached) " >&6
42772else
42773  case $OBJCOPY in
42774  [\\/]* | ?:[\\/]*)
42775  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42776  ;;
42777  *)
42778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42779for as_dir in $PATH
42780do
42781  IFS=$as_save_IFS
42782  test -z "$as_dir" && as_dir=.
42783    for ac_exec_ext in '' $ac_executable_extensions; do
42784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42785    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42787    break 2
42788  fi
42789done
42790  done
42791IFS=$as_save_IFS
42792
42793  ;;
42794esac
42795fi
42796OBJCOPY=$ac_cv_path_OBJCOPY
42797if test -n "$OBJCOPY"; then
42798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42799$as_echo "$OBJCOPY" >&6; }
42800else
42801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42802$as_echo "no" >&6; }
42803fi
42804
42805
42806          if test "x$OBJCOPY" = x; then
42807            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42808          fi
42809        else
42810          # Otherwise we believe it is a complete path. Use it as it is.
42811          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42812$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42813          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42814$as_echo_n "checking for OBJCOPY... " >&6; }
42815          if test ! -x "$tool_specified"; then
42816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42817$as_echo "not found" >&6; }
42818            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42819          fi
42820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42821$as_echo "$tool_specified" >&6; }
42822        fi
42823      fi
42824    fi
42825
42826  fi
42827
42828
42829    # Only call fixup if objcopy was found.
42830    if test -n "$OBJCOPY"; then
42831
42832  # Only process if variable expands to non-empty
42833
42834  if test "x$OBJCOPY" != x; then
42835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42836
42837  # First separate the path from the arguments. This will split at the first
42838  # space.
42839  complete="$OBJCOPY"
42840  path="${complete%% *}"
42841  tmp="$complete EOL"
42842  arguments="${tmp#* }"
42843
42844  # Input might be given as Windows format, start by converting to
42845  # unix format.
42846  new_path=`$CYGPATH -u "$path"`
42847
42848  # Now try to locate executable using which
42849  new_path=`$WHICH "$new_path" 2> /dev/null`
42850  # bat and cmd files are not always considered executable in cygwin causing which
42851  # to not find them
42852  if test "x$new_path" = x \
42853      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42854      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42855    new_path=`$CYGPATH -u "$path"`
42856  fi
42857  if test "x$new_path" = x; then
42858    # Oops. Which didn't find the executable.
42859    # The splitting of arguments from the executable at a space might have been incorrect,
42860    # since paths with space are more likely in Windows. Give it another try with the whole
42861    # argument.
42862    path="$complete"
42863    arguments="EOL"
42864    new_path=`$CYGPATH -u "$path"`
42865    new_path=`$WHICH "$new_path" 2> /dev/null`
42866    # bat and cmd files are not always considered executable in cygwin causing which
42867    # to not find them
42868    if test "x$new_path" = x \
42869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42871      new_path=`$CYGPATH -u "$path"`
42872    fi
42873    if test "x$new_path" = x; then
42874      # It's still not found. Now this is an unrecoverable error.
42875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42876$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42877      has_space=`$ECHO "$complete" | $GREP " "`
42878      if test "x$has_space" != x; then
42879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42881      fi
42882      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42883    fi
42884  fi
42885
42886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42889  # "foo.exe" is OK but "foo" is an error.
42890  #
42891  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42892  # It is also a way to make sure we got the proper file name for the real test later on.
42893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42894  if test "x$test_shortpath" = x; then
42895    # Short path failed, file does not exist as specified.
42896    # Try adding .exe or .cmd
42897    if test -f "${new_path}.exe"; then
42898      input_to_shortpath="${new_path}.exe"
42899    elif test -f "${new_path}.cmd"; then
42900      input_to_shortpath="${new_path}.cmd"
42901    else
42902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42903$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42904      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42905$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42906      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42907    fi
42908  else
42909    input_to_shortpath="$new_path"
42910  fi
42911
42912  # Call helper function which possibly converts this using DOS-style short mode.
42913  # If so, the updated path is stored in $new_path.
42914  new_path="$input_to_shortpath"
42915
42916  input_path="$input_to_shortpath"
42917  # Check if we need to convert this using DOS-style short mode. If the path
42918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42919  # take no chances and rewrite it.
42920  # Note: m4 eats our [], so we need to use [ and ] instead.
42921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42922  if test "x$has_forbidden_chars" != x; then
42923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42927      # Going to short mode and back again did indeed matter. Since short mode is
42928      # case insensitive, let's make it lowercase to improve readability.
42929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42930      # Now convert it back to Unix-style (cygpath)
42931      input_path=`$CYGPATH -u "$shortmode_path"`
42932      new_path="$input_path"
42933    fi
42934  fi
42935
42936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42937  if test "x$test_cygdrive_prefix" = x; then
42938    # As a simple fix, exclude /usr/bin since it's not a real path.
42939    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42941      # a path prefixed by /cygdrive for fixpath to work.
42942      new_path="$CYGWIN_ROOT_PATH$input_path"
42943    fi
42944  fi
42945
42946  # remove trailing .exe if any
42947  new_path="${new_path/%.exe/}"
42948
42949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42950
42951  # First separate the path from the arguments. This will split at the first
42952  # space.
42953  complete="$OBJCOPY"
42954  path="${complete%% *}"
42955  tmp="$complete EOL"
42956  arguments="${tmp#* }"
42957
42958  # Input might be given as Windows format, start by converting to
42959  # unix format.
42960  new_path="$path"
42961
42962  windows_path="$new_path"
42963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42964    unix_path=`$CYGPATH -u "$windows_path"`
42965    new_path="$unix_path"
42966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42968    new_path="$unix_path"
42969  fi
42970
42971
42972  # Now try to locate executable using which
42973  new_path=`$WHICH "$new_path" 2> /dev/null`
42974
42975  if test "x$new_path" = x; then
42976    # Oops. Which didn't find the executable.
42977    # The splitting of arguments from the executable at a space might have been incorrect,
42978    # since paths with space are more likely in Windows. Give it another try with the whole
42979    # argument.
42980    path="$complete"
42981    arguments="EOL"
42982    new_path="$path"
42983
42984  windows_path="$new_path"
42985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42986    unix_path=`$CYGPATH -u "$windows_path"`
42987    new_path="$unix_path"
42988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42990    new_path="$unix_path"
42991  fi
42992
42993
42994    new_path=`$WHICH "$new_path" 2> /dev/null`
42995    # bat and cmd files are not always considered executable in MSYS causing which
42996    # to not find them
42997    if test "x$new_path" = x \
42998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43000      new_path="$path"
43001
43002  windows_path="$new_path"
43003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43004    unix_path=`$CYGPATH -u "$windows_path"`
43005    new_path="$unix_path"
43006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43008    new_path="$unix_path"
43009  fi
43010
43011    fi
43012
43013    if test "x$new_path" = x; then
43014      # It's still not found. Now this is an unrecoverable error.
43015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43016$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43017      has_space=`$ECHO "$complete" | $GREP " "`
43018      if test "x$has_space" != x; then
43019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43021      fi
43022      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43023    fi
43024  fi
43025
43026  # Now new_path has a complete unix path to the binary
43027  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43028    # Keep paths in /bin as-is, but remove trailing .exe if any
43029    new_path="${new_path/%.exe/}"
43030    # Do not save /bin paths to all_fixpath_prefixes!
43031  else
43032    # Not in mixed or Windows style, start by that.
43033    new_path=`cmd //c echo $new_path`
43034
43035  input_path="$new_path"
43036  # Check if we need to convert this using DOS-style short mode. If the path
43037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43038  # take no chances and rewrite it.
43039  # Note: m4 eats our [], so we need to use [ and ] instead.
43040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43041  if test "x$has_forbidden_chars" != x; then
43042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43044  fi
43045
43046    # Output is in $new_path
43047
43048  windows_path="$new_path"
43049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43050    unix_path=`$CYGPATH -u "$windows_path"`
43051    new_path="$unix_path"
43052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43054    new_path="$unix_path"
43055  fi
43056
43057    # remove trailing .exe if any
43058    new_path="${new_path/%.exe/}"
43059
43060    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43061    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43062  fi
43063
43064    else
43065      # We're on a unix platform. Hooray! :)
43066      # First separate the path from the arguments. This will split at the first
43067      # space.
43068      complete="$OBJCOPY"
43069      path="${complete%% *}"
43070      tmp="$complete EOL"
43071      arguments="${tmp#* }"
43072
43073      # Cannot rely on the command "which" here since it doesn't always work.
43074      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43075      if test -z "$is_absolute_path"; then
43076        # Path to executable is not absolute. Find it.
43077        IFS_save="$IFS"
43078        IFS=:
43079        for p in $PATH; do
43080          if test -f "$p/$path" && test -x "$p/$path"; then
43081            new_path="$p/$path"
43082            break
43083          fi
43084        done
43085        IFS="$IFS_save"
43086      else
43087        # This is an absolute path, we can use it without further modifications.
43088        new_path="$path"
43089      fi
43090
43091      if test "x$new_path" = x; then
43092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43093$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43094        has_space=`$ECHO "$complete" | $GREP " "`
43095        if test "x$has_space" != x; then
43096          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43097$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43098        fi
43099        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43100      fi
43101    fi
43102
43103    # Now join together the path and the arguments once again
43104    if test "x$arguments" != xEOL; then
43105      new_complete="$new_path ${arguments% *}"
43106    else
43107      new_complete="$new_path"
43108    fi
43109
43110    if test "x$complete" != "x$new_complete"; then
43111      OBJCOPY="$new_complete"
43112      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43113$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43114    fi
43115  fi
43116
43117      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43118        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43119        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43120        # - version number is last blank separate word on first line
43121        # - version number formats that have been seen:
43122        #   - <major>.<minor>
43123        #   - <major>.<minor>.<micro>
43124        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43125        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43126         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43127              -e 's/.* //' \
43128              -e '/^[01]\./b bad' \
43129              -e '/^2\./{' \
43130              -e '  s/^2\.//' \
43131              -e '  /^[0-9]$/b bad' \
43132              -e '  /^[0-9]\./b bad' \
43133              -e '  /^1[0-9]$/b bad' \
43134              -e '  /^1[0-9]\./b bad' \
43135              -e '  /^20\./b bad' \
43136              -e '  /^21\.0$/b bad' \
43137              -e '  /^21\.0\./b bad' \
43138              -e '}' \
43139              -e ':good' \
43140              -e 's/.*/VALID_VERSION/p' \
43141              -e 'q' \
43142              -e ':bad' \
43143              -e 's/.*/BAD_VERSION/p' \
43144              -e 'q'`
43145        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43146          OBJCOPY=
43147          { $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
43148$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43149          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43150$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43151          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43152$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43153          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43154$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43155          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43156$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43157        fi
43158      fi
43159    fi
43160  fi
43161
43162
43163
43164  # Publish this variable in the help.
43165
43166
43167  if [ -z "${OBJDUMP+x}" ]; then
43168    # The variable is not set by user, try to locate tool using the code snippet
43169    if test -n "$ac_tool_prefix"; then
43170  for ac_prog in gobjdump objdump
43171  do
43172    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43173set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43175$as_echo_n "checking for $ac_word... " >&6; }
43176if ${ac_cv_prog_OBJDUMP+:} false; then :
43177  $as_echo_n "(cached) " >&6
43178else
43179  if test -n "$OBJDUMP"; then
43180  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43181else
43182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43183for as_dir in $PATH
43184do
43185  IFS=$as_save_IFS
43186  test -z "$as_dir" && as_dir=.
43187    for ac_exec_ext in '' $ac_executable_extensions; do
43188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43189    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43191    break 2
43192  fi
43193done
43194  done
43195IFS=$as_save_IFS
43196
43197fi
43198fi
43199OBJDUMP=$ac_cv_prog_OBJDUMP
43200if test -n "$OBJDUMP"; then
43201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43202$as_echo "$OBJDUMP" >&6; }
43203else
43204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43205$as_echo "no" >&6; }
43206fi
43207
43208
43209    test -n "$OBJDUMP" && break
43210  done
43211fi
43212if test -z "$OBJDUMP"; then
43213  ac_ct_OBJDUMP=$OBJDUMP
43214  for ac_prog in gobjdump objdump
43215do
43216  # Extract the first word of "$ac_prog", so it can be a program name with args.
43217set dummy $ac_prog; ac_word=$2
43218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43219$as_echo_n "checking for $ac_word... " >&6; }
43220if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43221  $as_echo_n "(cached) " >&6
43222else
43223  if test -n "$ac_ct_OBJDUMP"; then
43224  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43225else
43226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43227for as_dir in $PATH
43228do
43229  IFS=$as_save_IFS
43230  test -z "$as_dir" && as_dir=.
43231    for ac_exec_ext in '' $ac_executable_extensions; do
43232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43233    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43235    break 2
43236  fi
43237done
43238  done
43239IFS=$as_save_IFS
43240
43241fi
43242fi
43243ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43244if test -n "$ac_ct_OBJDUMP"; then
43245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43246$as_echo "$ac_ct_OBJDUMP" >&6; }
43247else
43248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43249$as_echo "no" >&6; }
43250fi
43251
43252
43253  test -n "$ac_ct_OBJDUMP" && break
43254done
43255
43256  if test "x$ac_ct_OBJDUMP" = x; then
43257    OBJDUMP=""
43258  else
43259    case $cross_compiling:$ac_tool_warned in
43260yes:)
43261{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43262$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43263ac_tool_warned=yes ;;
43264esac
43265    OBJDUMP=$ac_ct_OBJDUMP
43266  fi
43267fi
43268
43269  else
43270    # The variable is set, but is it from the command line or the environment?
43271
43272    # Try to remove the string !OBJDUMP! from our list.
43273    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43274    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43275      # If it failed, the variable was not from the command line. Ignore it,
43276      # but warn the user (except for BASH, which is always set by the calling BASH).
43277      if test "xOBJDUMP" != xBASH; then
43278        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43279$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43280      fi
43281      # Try to locate tool using the code snippet
43282      if test -n "$ac_tool_prefix"; then
43283  for ac_prog in gobjdump objdump
43284  do
43285    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43286set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43288$as_echo_n "checking for $ac_word... " >&6; }
43289if ${ac_cv_prog_OBJDUMP+:} false; then :
43290  $as_echo_n "(cached) " >&6
43291else
43292  if test -n "$OBJDUMP"; then
43293  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43294else
43295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43296for as_dir in $PATH
43297do
43298  IFS=$as_save_IFS
43299  test -z "$as_dir" && as_dir=.
43300    for ac_exec_ext in '' $ac_executable_extensions; do
43301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43302    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43304    break 2
43305  fi
43306done
43307  done
43308IFS=$as_save_IFS
43309
43310fi
43311fi
43312OBJDUMP=$ac_cv_prog_OBJDUMP
43313if test -n "$OBJDUMP"; then
43314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43315$as_echo "$OBJDUMP" >&6; }
43316else
43317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43318$as_echo "no" >&6; }
43319fi
43320
43321
43322    test -n "$OBJDUMP" && break
43323  done
43324fi
43325if test -z "$OBJDUMP"; then
43326  ac_ct_OBJDUMP=$OBJDUMP
43327  for ac_prog in gobjdump objdump
43328do
43329  # Extract the first word of "$ac_prog", so it can be a program name with args.
43330set dummy $ac_prog; ac_word=$2
43331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43332$as_echo_n "checking for $ac_word... " >&6; }
43333if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43334  $as_echo_n "(cached) " >&6
43335else
43336  if test -n "$ac_ct_OBJDUMP"; then
43337  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43338else
43339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43340for as_dir in $PATH
43341do
43342  IFS=$as_save_IFS
43343  test -z "$as_dir" && as_dir=.
43344    for ac_exec_ext in '' $ac_executable_extensions; do
43345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43346    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43348    break 2
43349  fi
43350done
43351  done
43352IFS=$as_save_IFS
43353
43354fi
43355fi
43356ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43357if test -n "$ac_ct_OBJDUMP"; then
43358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43359$as_echo "$ac_ct_OBJDUMP" >&6; }
43360else
43361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43362$as_echo "no" >&6; }
43363fi
43364
43365
43366  test -n "$ac_ct_OBJDUMP" && break
43367done
43368
43369  if test "x$ac_ct_OBJDUMP" = x; then
43370    OBJDUMP=""
43371  else
43372    case $cross_compiling:$ac_tool_warned in
43373yes:)
43374{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43375$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43376ac_tool_warned=yes ;;
43377esac
43378    OBJDUMP=$ac_ct_OBJDUMP
43379  fi
43380fi
43381
43382    else
43383      # If it succeeded, then it was overridden by the user. We will use it
43384      # for the tool.
43385
43386      # First remove it from the list of overridden variables, so we can test
43387      # for unknown variables in the end.
43388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43389
43390      # Check if we try to supply an empty value
43391      if test "x$OBJDUMP" = x; then
43392        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43393$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43395$as_echo_n "checking for OBJDUMP... " >&6; }
43396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43397$as_echo "disabled" >&6; }
43398      else
43399        # Check if the provided tool contains a complete path.
43400        tool_specified="$OBJDUMP"
43401        tool_basename="${tool_specified##*/}"
43402        if test "x$tool_basename" = "x$tool_specified"; then
43403          # A command without a complete path is provided, search $PATH.
43404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43405$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43406          # Extract the first word of "$tool_basename", so it can be a program name with args.
43407set dummy $tool_basename; ac_word=$2
43408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43409$as_echo_n "checking for $ac_word... " >&6; }
43410if ${ac_cv_path_OBJDUMP+:} false; then :
43411  $as_echo_n "(cached) " >&6
43412else
43413  case $OBJDUMP in
43414  [\\/]* | ?:[\\/]*)
43415  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43416  ;;
43417  *)
43418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43419for as_dir in $PATH
43420do
43421  IFS=$as_save_IFS
43422  test -z "$as_dir" && as_dir=.
43423    for ac_exec_ext in '' $ac_executable_extensions; do
43424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43425    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43427    break 2
43428  fi
43429done
43430  done
43431IFS=$as_save_IFS
43432
43433  ;;
43434esac
43435fi
43436OBJDUMP=$ac_cv_path_OBJDUMP
43437if test -n "$OBJDUMP"; then
43438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43439$as_echo "$OBJDUMP" >&6; }
43440else
43441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43442$as_echo "no" >&6; }
43443fi
43444
43445
43446          if test "x$OBJDUMP" = x; then
43447            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43448          fi
43449        else
43450          # Otherwise we believe it is a complete path. Use it as it is.
43451          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43452$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43453          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43454$as_echo_n "checking for OBJDUMP... " >&6; }
43455          if test ! -x "$tool_specified"; then
43456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43457$as_echo "not found" >&6; }
43458            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43459          fi
43460          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43461$as_echo "$tool_specified" >&6; }
43462        fi
43463      fi
43464    fi
43465
43466  fi
43467
43468
43469  if test "x$OBJDUMP" != x; then
43470    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43471    # bails if argument is missing.
43472
43473  # Only process if variable expands to non-empty
43474
43475  if test "x$OBJDUMP" != x; then
43476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43477
43478  # First separate the path from the arguments. This will split at the first
43479  # space.
43480  complete="$OBJDUMP"
43481  path="${complete%% *}"
43482  tmp="$complete EOL"
43483  arguments="${tmp#* }"
43484
43485  # Input might be given as Windows format, start by converting to
43486  # unix format.
43487  new_path=`$CYGPATH -u "$path"`
43488
43489  # Now try to locate executable using which
43490  new_path=`$WHICH "$new_path" 2> /dev/null`
43491  # bat and cmd files are not always considered executable in cygwin causing which
43492  # to not find them
43493  if test "x$new_path" = x \
43494      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43495      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43496    new_path=`$CYGPATH -u "$path"`
43497  fi
43498  if test "x$new_path" = x; then
43499    # Oops. Which didn't find the executable.
43500    # The splitting of arguments from the executable at a space might have been incorrect,
43501    # since paths with space are more likely in Windows. Give it another try with the whole
43502    # argument.
43503    path="$complete"
43504    arguments="EOL"
43505    new_path=`$CYGPATH -u "$path"`
43506    new_path=`$WHICH "$new_path" 2> /dev/null`
43507    # bat and cmd files are not always considered executable in cygwin causing which
43508    # to not find them
43509    if test "x$new_path" = x \
43510        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43511        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43512      new_path=`$CYGPATH -u "$path"`
43513    fi
43514    if test "x$new_path" = x; then
43515      # It's still not found. Now this is an unrecoverable error.
43516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43517$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43518      has_space=`$ECHO "$complete" | $GREP " "`
43519      if test "x$has_space" != x; then
43520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43522      fi
43523      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43524    fi
43525  fi
43526
43527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43530  # "foo.exe" is OK but "foo" is an error.
43531  #
43532  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43533  # It is also a way to make sure we got the proper file name for the real test later on.
43534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43535  if test "x$test_shortpath" = x; then
43536    # Short path failed, file does not exist as specified.
43537    # Try adding .exe or .cmd
43538    if test -f "${new_path}.exe"; then
43539      input_to_shortpath="${new_path}.exe"
43540    elif test -f "${new_path}.cmd"; then
43541      input_to_shortpath="${new_path}.cmd"
43542    else
43543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43544$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43545      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43546$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43547      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43548    fi
43549  else
43550    input_to_shortpath="$new_path"
43551  fi
43552
43553  # Call helper function which possibly converts this using DOS-style short mode.
43554  # If so, the updated path is stored in $new_path.
43555  new_path="$input_to_shortpath"
43556
43557  input_path="$input_to_shortpath"
43558  # Check if we need to convert this using DOS-style short mode. If the path
43559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43560  # take no chances and rewrite it.
43561  # Note: m4 eats our [], so we need to use [ and ] instead.
43562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43563  if test "x$has_forbidden_chars" != x; then
43564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43568      # Going to short mode and back again did indeed matter. Since short mode is
43569      # case insensitive, let's make it lowercase to improve readability.
43570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43571      # Now convert it back to Unix-style (cygpath)
43572      input_path=`$CYGPATH -u "$shortmode_path"`
43573      new_path="$input_path"
43574    fi
43575  fi
43576
43577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43578  if test "x$test_cygdrive_prefix" = x; then
43579    # As a simple fix, exclude /usr/bin since it's not a real path.
43580    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43582      # a path prefixed by /cygdrive for fixpath to work.
43583      new_path="$CYGWIN_ROOT_PATH$input_path"
43584    fi
43585  fi
43586
43587  # remove trailing .exe if any
43588  new_path="${new_path/%.exe/}"
43589
43590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43591
43592  # First separate the path from the arguments. This will split at the first
43593  # space.
43594  complete="$OBJDUMP"
43595  path="${complete%% *}"
43596  tmp="$complete EOL"
43597  arguments="${tmp#* }"
43598
43599  # Input might be given as Windows format, start by converting to
43600  # unix format.
43601  new_path="$path"
43602
43603  windows_path="$new_path"
43604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43605    unix_path=`$CYGPATH -u "$windows_path"`
43606    new_path="$unix_path"
43607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43609    new_path="$unix_path"
43610  fi
43611
43612
43613  # Now try to locate executable using which
43614  new_path=`$WHICH "$new_path" 2> /dev/null`
43615
43616  if test "x$new_path" = x; then
43617    # Oops. Which didn't find the executable.
43618    # The splitting of arguments from the executable at a space might have been incorrect,
43619    # since paths with space are more likely in Windows. Give it another try with the whole
43620    # argument.
43621    path="$complete"
43622    arguments="EOL"
43623    new_path="$path"
43624
43625  windows_path="$new_path"
43626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43627    unix_path=`$CYGPATH -u "$windows_path"`
43628    new_path="$unix_path"
43629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43631    new_path="$unix_path"
43632  fi
43633
43634
43635    new_path=`$WHICH "$new_path" 2> /dev/null`
43636    # bat and cmd files are not always considered executable in MSYS causing which
43637    # to not find them
43638    if test "x$new_path" = x \
43639        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43640        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43641      new_path="$path"
43642
43643  windows_path="$new_path"
43644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43645    unix_path=`$CYGPATH -u "$windows_path"`
43646    new_path="$unix_path"
43647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43649    new_path="$unix_path"
43650  fi
43651
43652    fi
43653
43654    if test "x$new_path" = x; then
43655      # It's still not found. Now this is an unrecoverable error.
43656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43657$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43658      has_space=`$ECHO "$complete" | $GREP " "`
43659      if test "x$has_space" != x; then
43660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43662      fi
43663      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43664    fi
43665  fi
43666
43667  # Now new_path has a complete unix path to the binary
43668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43669    # Keep paths in /bin as-is, but remove trailing .exe if any
43670    new_path="${new_path/%.exe/}"
43671    # Do not save /bin paths to all_fixpath_prefixes!
43672  else
43673    # Not in mixed or Windows style, start by that.
43674    new_path=`cmd //c echo $new_path`
43675
43676  input_path="$new_path"
43677  # Check if we need to convert this using DOS-style short mode. If the path
43678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43679  # take no chances and rewrite it.
43680  # Note: m4 eats our [], so we need to use [ and ] instead.
43681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43682  if test "x$has_forbidden_chars" != x; then
43683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43685  fi
43686
43687    # Output is in $new_path
43688
43689  windows_path="$new_path"
43690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43691    unix_path=`$CYGPATH -u "$windows_path"`
43692    new_path="$unix_path"
43693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43695    new_path="$unix_path"
43696  fi
43697
43698    # remove trailing .exe if any
43699    new_path="${new_path/%.exe/}"
43700
43701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43703  fi
43704
43705    else
43706      # We're on a unix platform. Hooray! :)
43707      # First separate the path from the arguments. This will split at the first
43708      # space.
43709      complete="$OBJDUMP"
43710      path="${complete%% *}"
43711      tmp="$complete EOL"
43712      arguments="${tmp#* }"
43713
43714      # Cannot rely on the command "which" here since it doesn't always work.
43715      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43716      if test -z "$is_absolute_path"; then
43717        # Path to executable is not absolute. Find it.
43718        IFS_save="$IFS"
43719        IFS=:
43720        for p in $PATH; do
43721          if test -f "$p/$path" && test -x "$p/$path"; then
43722            new_path="$p/$path"
43723            break
43724          fi
43725        done
43726        IFS="$IFS_save"
43727      else
43728        # This is an absolute path, we can use it without further modifications.
43729        new_path="$path"
43730      fi
43731
43732      if test "x$new_path" = x; then
43733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43734$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43735        has_space=`$ECHO "$complete" | $GREP " "`
43736        if test "x$has_space" != x; then
43737          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43738$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43739        fi
43740        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43741      fi
43742    fi
43743
43744    # Now join together the path and the arguments once again
43745    if test "x$arguments" != xEOL; then
43746      new_complete="$new_path ${arguments% *}"
43747    else
43748      new_complete="$new_path"
43749    fi
43750
43751    if test "x$complete" != "x$new_complete"; then
43752      OBJDUMP="$new_complete"
43753      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43754$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43755    fi
43756  fi
43757
43758  fi
43759
43760
43761  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43762  # to remain in place. Otherwise the compiler will not work in some siutations
43763  # in later configure checks.
43764  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43765    PATH="$OLD_PATH"
43766  fi
43767
43768  # Restore the flags to the user specified values.
43769  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43770  CFLAGS="$ORG_CFLAGS"
43771  CXXFLAGS="$ORG_CXXFLAGS"
43772
43773
43774# Finally do some processing after the detection phase
43775
43776  if test "x$COMPILE_TYPE" = "xcross"; then
43777    # Now we need to find a C/C++ compiler that can build executables for the
43778    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43779    # used once. Also, we need to do this without adding a tools dir to the
43780    # path, otherwise we might pick up cross-compilers which don't use standard
43781    # naming.
43782
43783    OLDPATH="$PATH"
43784
43785
43786# Check whether --with-build-devkit was given.
43787if test "${with_build_devkit+set}" = set; then :
43788  withval=$with_build_devkit;
43789fi
43790
43791    if test "x$with_build_devkit" = "xyes"; then
43792      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43793    elif test -n "$with_build_devkit"; then
43794      if test ! -d "$with_build_devkit"; then
43795        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43796      else
43797
43798  # Only process if variable expands to non-empty
43799
43800  if test "x$with_build_devkit" != x; then
43801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43802
43803  # Input might be given as Windows format, start by converting to
43804  # unix format.
43805  path="$with_build_devkit"
43806  new_path=`$CYGPATH -u "$path"`
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 precense.
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    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43818$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43819    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43820  fi
43821
43822  # Call helper function which possibly converts this using DOS-style short mode.
43823  # If so, the updated path is stored in $new_path.
43824
43825  input_path="$new_path"
43826  # Check if we need to convert this using DOS-style short mode. If the path
43827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43828  # take no chances and rewrite it.
43829  # Note: m4 eats our [], so we need to use [ and ] instead.
43830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43831  if test "x$has_forbidden_chars" != x; then
43832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43836      # Going to short mode and back again did indeed matter. Since short mode is
43837      # case insensitive, let's make it lowercase to improve readability.
43838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43839      # Now convert it back to Unix-style (cygpath)
43840      input_path=`$CYGPATH -u "$shortmode_path"`
43841      new_path="$input_path"
43842    fi
43843  fi
43844
43845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43846  if test "x$test_cygdrive_prefix" = x; then
43847    # As a simple fix, exclude /usr/bin since it's not a real path.
43848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43850      # a path prefixed by /cygdrive for fixpath to work.
43851      new_path="$CYGWIN_ROOT_PATH$input_path"
43852    fi
43853  fi
43854
43855
43856  if test "x$path" != "x$new_path"; then
43857    with_build_devkit="$new_path"
43858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43859$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43860  fi
43861
43862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43863
43864  path="$with_build_devkit"
43865  has_colon=`$ECHO $path | $GREP ^.:`
43866  new_path="$path"
43867  if test "x$has_colon" = x; then
43868    # Not in mixed or Windows style, start by that.
43869    new_path=`cmd //c echo $path`
43870  fi
43871
43872
43873  input_path="$new_path"
43874  # Check if we need to convert this using DOS-style short mode. If the path
43875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43876  # take no chances and rewrite it.
43877  # Note: m4 eats our [], so we need to use [ and ] instead.
43878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43879  if test "x$has_forbidden_chars" != x; then
43880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43882  fi
43883
43884
43885  windows_path="$new_path"
43886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43887    unix_path=`$CYGPATH -u "$windows_path"`
43888    new_path="$unix_path"
43889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43891    new_path="$unix_path"
43892  fi
43893
43894  if test "x$path" != "x$new_path"; then
43895    with_build_devkit="$new_path"
43896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43897$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43898  fi
43899
43900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43902
43903    else
43904      # We're on a unix platform. Hooray! :)
43905      path="$with_build_devkit"
43906      has_space=`$ECHO "$path" | $GREP " "`
43907      if test "x$has_space" != x; then
43908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43909$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43911      fi
43912
43913      # Use eval to expand a potential ~
43914      eval path="$path"
43915      if test ! -f "$path" && test ! -d "$path"; then
43916        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43917      fi
43918
43919      if test -d "$path"; then
43920        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43921      else
43922        dir="`$DIRNAME "$path"`"
43923        base="`$BASENAME "$path"`"
43924        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43925      fi
43926    fi
43927  fi
43928
43929        BUILD_DEVKIT_ROOT="$with_build_devkit"
43930        # Check for a meta data info file in the root of the devkit
43931        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43932          # Process devkit.info so that existing devkit variables are not
43933          # modified by this
43934          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43935              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43936              -e "s/\$host/\$build/g" \
43937              $BUILD_DEVKIT_ROOT/devkit.info \
43938              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43939          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43940          # This potentially sets the following:
43941          # A descriptive name of the devkit
43942
43943  if test "x$BUILD_DEVKIT_NAME" = x; then
43944    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43945  fi
43946
43947          # Corresponds to --with-extra-path
43948
43949  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43950    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43951  fi
43952
43953          # Corresponds to --with-toolchain-path
43954
43955  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43956    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43957  fi
43958
43959          # Corresponds to --with-sysroot
43960
43961  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43962    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43963  fi
43964
43965          # Skip the Window specific parts
43966        fi
43967
43968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43969$as_echo_n "checking for build platform devkit... " >&6; }
43970        if test "x$BUILD_DEVKIT_NAME" != x; then
43971          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43972$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43973        else
43974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43975$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43976        fi
43977
43978        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43979
43980  if test "x$BUILD_SYSROOT" != "x"; then
43981    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43982      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43983        # Solaris Studio does not have a concept of sysroot. Instead we must
43984        # make sure the default include and lib dirs are appended to each
43985        # compile and link command line. Must also add -I-xbuiltin to enable
43986        # inlining of system functions and intrinsics.
43987        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43988        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43989            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43990      fi
43991    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43992      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43993      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43994    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43995      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43996      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43997    fi
43998    # Propagate the sysroot args to hotspot
43999    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44000    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44001    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44002    # The global CFLAGS and LDFLAGS variables need these for configure to function
44003    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44004    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44005    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44006    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44007  fi
44008
44009  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44010    # We also need -iframework<path>/System/Library/Frameworks
44011    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44012    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44013    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44014    # set this here so it doesn't have to be peppered throughout the forest
44015    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44016    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44017  fi
44018
44019
44020
44021
44022
44023         # Fallback default of just /bin if DEVKIT_PATH is not defined
44024        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44025          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44026        fi
44027        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44028      fi
44029    fi
44030
44031    # FIXME: we should list the discovered compilers as an exclude pattern!
44032    # If we do that, we can do this detection before POST_DETECTION, and still
44033    # find the build compilers in the tools dir, if needed.
44034
44035
44036
44037  # Publish this variable in the help.
44038
44039
44040  if [ -z "${BUILD_CC+x}" ]; then
44041    # The variable is not set by user, try to locate tool using the code snippet
44042    for ac_prog in cl cc gcc
44043do
44044  # Extract the first word of "$ac_prog", so it can be a program name with args.
44045set dummy $ac_prog; ac_word=$2
44046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44047$as_echo_n "checking for $ac_word... " >&6; }
44048if ${ac_cv_path_BUILD_CC+:} false; then :
44049  $as_echo_n "(cached) " >&6
44050else
44051  case $BUILD_CC in
44052  [\\/]* | ?:[\\/]*)
44053  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44054  ;;
44055  *)
44056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44057for as_dir in $PATH
44058do
44059  IFS=$as_save_IFS
44060  test -z "$as_dir" && as_dir=.
44061    for ac_exec_ext in '' $ac_executable_extensions; do
44062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44063    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44065    break 2
44066  fi
44067done
44068  done
44069IFS=$as_save_IFS
44070
44071  ;;
44072esac
44073fi
44074BUILD_CC=$ac_cv_path_BUILD_CC
44075if test -n "$BUILD_CC"; then
44076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44077$as_echo "$BUILD_CC" >&6; }
44078else
44079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44080$as_echo "no" >&6; }
44081fi
44082
44083
44084  test -n "$BUILD_CC" && break
44085done
44086
44087  else
44088    # The variable is set, but is it from the command line or the environment?
44089
44090    # Try to remove the string !BUILD_CC! from our list.
44091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44093      # If it failed, the variable was not from the command line. Ignore it,
44094      # but warn the user (except for BASH, which is always set by the calling BASH).
44095      if test "xBUILD_CC" != xBASH; then
44096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44097$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44098      fi
44099      # Try to locate tool using the code snippet
44100      for ac_prog in cl cc gcc
44101do
44102  # Extract the first word of "$ac_prog", so it can be a program name with args.
44103set dummy $ac_prog; ac_word=$2
44104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44105$as_echo_n "checking for $ac_word... " >&6; }
44106if ${ac_cv_path_BUILD_CC+:} false; then :
44107  $as_echo_n "(cached) " >&6
44108else
44109  case $BUILD_CC in
44110  [\\/]* | ?:[\\/]*)
44111  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44112  ;;
44113  *)
44114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44115for as_dir in $PATH
44116do
44117  IFS=$as_save_IFS
44118  test -z "$as_dir" && as_dir=.
44119    for ac_exec_ext in '' $ac_executable_extensions; do
44120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44121    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44123    break 2
44124  fi
44125done
44126  done
44127IFS=$as_save_IFS
44128
44129  ;;
44130esac
44131fi
44132BUILD_CC=$ac_cv_path_BUILD_CC
44133if test -n "$BUILD_CC"; then
44134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44135$as_echo "$BUILD_CC" >&6; }
44136else
44137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44138$as_echo "no" >&6; }
44139fi
44140
44141
44142  test -n "$BUILD_CC" && break
44143done
44144
44145    else
44146      # If it succeeded, then it was overridden by the user. We will use it
44147      # for the tool.
44148
44149      # First remove it from the list of overridden variables, so we can test
44150      # for unknown variables in the end.
44151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44152
44153      # Check if we try to supply an empty value
44154      if test "x$BUILD_CC" = x; then
44155        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44156$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44158$as_echo_n "checking for BUILD_CC... " >&6; }
44159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44160$as_echo "disabled" >&6; }
44161      else
44162        # Check if the provided tool contains a complete path.
44163        tool_specified="$BUILD_CC"
44164        tool_basename="${tool_specified##*/}"
44165        if test "x$tool_basename" = "x$tool_specified"; then
44166          # A command without a complete path is provided, search $PATH.
44167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44168$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44169          # Extract the first word of "$tool_basename", so it can be a program name with args.
44170set dummy $tool_basename; ac_word=$2
44171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44172$as_echo_n "checking for $ac_word... " >&6; }
44173if ${ac_cv_path_BUILD_CC+:} false; then :
44174  $as_echo_n "(cached) " >&6
44175else
44176  case $BUILD_CC in
44177  [\\/]* | ?:[\\/]*)
44178  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44179  ;;
44180  *)
44181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44182for as_dir in $PATH
44183do
44184  IFS=$as_save_IFS
44185  test -z "$as_dir" && as_dir=.
44186    for ac_exec_ext in '' $ac_executable_extensions; do
44187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44188    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44190    break 2
44191  fi
44192done
44193  done
44194IFS=$as_save_IFS
44195
44196  ;;
44197esac
44198fi
44199BUILD_CC=$ac_cv_path_BUILD_CC
44200if test -n "$BUILD_CC"; then
44201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44202$as_echo "$BUILD_CC" >&6; }
44203else
44204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44205$as_echo "no" >&6; }
44206fi
44207
44208
44209          if test "x$BUILD_CC" = x; then
44210            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44211          fi
44212        else
44213          # Otherwise we believe it is a complete path. Use it as it is.
44214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44215$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44216          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44217$as_echo_n "checking for BUILD_CC... " >&6; }
44218          if test ! -x "$tool_specified"; then
44219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44220$as_echo "not found" >&6; }
44221            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44222          fi
44223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44224$as_echo "$tool_specified" >&6; }
44225        fi
44226      fi
44227    fi
44228
44229  fi
44230
44231
44232
44233  if test "x$BUILD_CC" = x; then
44234    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44235  fi
44236
44237
44238
44239  # Only process if variable expands to non-empty
44240
44241  if test "x$BUILD_CC" != x; then
44242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44243
44244  # First separate the path from the arguments. This will split at the first
44245  # space.
44246  complete="$BUILD_CC"
44247  path="${complete%% *}"
44248  tmp="$complete EOL"
44249  arguments="${tmp#* }"
44250
44251  # Input might be given as Windows format, start by converting to
44252  # unix format.
44253  new_path=`$CYGPATH -u "$path"`
44254
44255  # Now try to locate executable using which
44256  new_path=`$WHICH "$new_path" 2> /dev/null`
44257  # bat and cmd files are not always considered executable in cygwin causing which
44258  # to not find them
44259  if test "x$new_path" = x \
44260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44262    new_path=`$CYGPATH -u "$path"`
44263  fi
44264  if test "x$new_path" = x; then
44265    # Oops. Which didn't find the executable.
44266    # The splitting of arguments from the executable at a space might have been incorrect,
44267    # since paths with space are more likely in Windows. Give it another try with the whole
44268    # argument.
44269    path="$complete"
44270    arguments="EOL"
44271    new_path=`$CYGPATH -u "$path"`
44272    new_path=`$WHICH "$new_path" 2> /dev/null`
44273    # bat and cmd files are not always considered executable in cygwin causing which
44274    # to not find them
44275    if test "x$new_path" = x \
44276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44278      new_path=`$CYGPATH -u "$path"`
44279    fi
44280    if test "x$new_path" = x; then
44281      # It's still not found. Now this is an unrecoverable error.
44282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44283$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44284      has_space=`$ECHO "$complete" | $GREP " "`
44285      if test "x$has_space" != x; then
44286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44288      fi
44289      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44290    fi
44291  fi
44292
44293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44296  # "foo.exe" is OK but "foo" is an error.
44297  #
44298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44299  # It is also a way to make sure we got the proper file name for the real test later on.
44300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44301  if test "x$test_shortpath" = x; then
44302    # Short path failed, file does not exist as specified.
44303    # Try adding .exe or .cmd
44304    if test -f "${new_path}.exe"; then
44305      input_to_shortpath="${new_path}.exe"
44306    elif test -f "${new_path}.cmd"; then
44307      input_to_shortpath="${new_path}.cmd"
44308    else
44309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44310$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44313      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44314    fi
44315  else
44316    input_to_shortpath="$new_path"
44317  fi
44318
44319  # Call helper function which possibly converts this using DOS-style short mode.
44320  # If so, the updated path is stored in $new_path.
44321  new_path="$input_to_shortpath"
44322
44323  input_path="$input_to_shortpath"
44324  # Check if we need to convert this using DOS-style short mode. If the path
44325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44326  # take no chances and rewrite it.
44327  # Note: m4 eats our [], so we need to use [ and ] instead.
44328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44329  if test "x$has_forbidden_chars" != x; then
44330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44334      # Going to short mode and back again did indeed matter. Since short mode is
44335      # case insensitive, let's make it lowercase to improve readability.
44336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44337      # Now convert it back to Unix-style (cygpath)
44338      input_path=`$CYGPATH -u "$shortmode_path"`
44339      new_path="$input_path"
44340    fi
44341  fi
44342
44343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44344  if test "x$test_cygdrive_prefix" = x; then
44345    # As a simple fix, exclude /usr/bin since it's not a real path.
44346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44348      # a path prefixed by /cygdrive for fixpath to work.
44349      new_path="$CYGWIN_ROOT_PATH$input_path"
44350    fi
44351  fi
44352
44353  # remove trailing .exe if any
44354  new_path="${new_path/%.exe/}"
44355
44356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44357
44358  # First separate the path from the arguments. This will split at the first
44359  # space.
44360  complete="$BUILD_CC"
44361  path="${complete%% *}"
44362  tmp="$complete EOL"
44363  arguments="${tmp#* }"
44364
44365  # Input might be given as Windows format, start by converting to
44366  # unix format.
44367  new_path="$path"
44368
44369  windows_path="$new_path"
44370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44371    unix_path=`$CYGPATH -u "$windows_path"`
44372    new_path="$unix_path"
44373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44375    new_path="$unix_path"
44376  fi
44377
44378
44379  # Now try to locate executable using which
44380  new_path=`$WHICH "$new_path" 2> /dev/null`
44381
44382  if test "x$new_path" = x; then
44383    # Oops. Which didn't find the executable.
44384    # The splitting of arguments from the executable at a space might have been incorrect,
44385    # since paths with space are more likely in Windows. Give it another try with the whole
44386    # argument.
44387    path="$complete"
44388    arguments="EOL"
44389    new_path="$path"
44390
44391  windows_path="$new_path"
44392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44393    unix_path=`$CYGPATH -u "$windows_path"`
44394    new_path="$unix_path"
44395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44397    new_path="$unix_path"
44398  fi
44399
44400
44401    new_path=`$WHICH "$new_path" 2> /dev/null`
44402    # bat and cmd files are not always considered executable in MSYS causing which
44403    # to not find them
44404    if test "x$new_path" = x \
44405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44407      new_path="$path"
44408
44409  windows_path="$new_path"
44410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44411    unix_path=`$CYGPATH -u "$windows_path"`
44412    new_path="$unix_path"
44413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44415    new_path="$unix_path"
44416  fi
44417
44418    fi
44419
44420    if test "x$new_path" = x; then
44421      # It's still not found. Now this is an unrecoverable error.
44422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44423$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44424      has_space=`$ECHO "$complete" | $GREP " "`
44425      if test "x$has_space" != x; then
44426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44428      fi
44429      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44430    fi
44431  fi
44432
44433  # Now new_path has a complete unix path to the binary
44434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44435    # Keep paths in /bin as-is, but remove trailing .exe if any
44436    new_path="${new_path/%.exe/}"
44437    # Do not save /bin paths to all_fixpath_prefixes!
44438  else
44439    # Not in mixed or Windows style, start by that.
44440    new_path=`cmd //c echo $new_path`
44441
44442  input_path="$new_path"
44443  # Check if we need to convert this using DOS-style short mode. If the path
44444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44445  # take no chances and rewrite it.
44446  # Note: m4 eats our [], so we need to use [ and ] instead.
44447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44448  if test "x$has_forbidden_chars" != x; then
44449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44451  fi
44452
44453    # Output is in $new_path
44454
44455  windows_path="$new_path"
44456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44457    unix_path=`$CYGPATH -u "$windows_path"`
44458    new_path="$unix_path"
44459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44461    new_path="$unix_path"
44462  fi
44463
44464    # remove trailing .exe if any
44465    new_path="${new_path/%.exe/}"
44466
44467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44469  fi
44470
44471    else
44472      # We're on a unix platform. Hooray! :)
44473      # First separate the path from the arguments. This will split at the first
44474      # space.
44475      complete="$BUILD_CC"
44476      path="${complete%% *}"
44477      tmp="$complete EOL"
44478      arguments="${tmp#* }"
44479
44480      # Cannot rely on the command "which" here since it doesn't always work.
44481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44482      if test -z "$is_absolute_path"; then
44483        # Path to executable is not absolute. Find it.
44484        IFS_save="$IFS"
44485        IFS=:
44486        for p in $PATH; do
44487          if test -f "$p/$path" && test -x "$p/$path"; then
44488            new_path="$p/$path"
44489            break
44490          fi
44491        done
44492        IFS="$IFS_save"
44493      else
44494        # This is an absolute path, we can use it without further modifications.
44495        new_path="$path"
44496      fi
44497
44498      if test "x$new_path" = x; then
44499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44500$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44501        has_space=`$ECHO "$complete" | $GREP " "`
44502        if test "x$has_space" != x; then
44503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44505        fi
44506        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44507      fi
44508    fi
44509
44510    # Now join together the path and the arguments once again
44511    if test "x$arguments" != xEOL; then
44512      new_complete="$new_path ${arguments% *}"
44513    else
44514      new_complete="$new_path"
44515    fi
44516
44517    if test "x$complete" != "x$new_complete"; then
44518      BUILD_CC="$new_complete"
44519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44520$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44521    fi
44522  fi
44523
44524
44525
44526
44527  # Publish this variable in the help.
44528
44529
44530  if [ -z "${BUILD_CXX+x}" ]; then
44531    # The variable is not set by user, try to locate tool using the code snippet
44532    for ac_prog in cl CC g++
44533do
44534  # Extract the first word of "$ac_prog", so it can be a program name with args.
44535set dummy $ac_prog; ac_word=$2
44536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44537$as_echo_n "checking for $ac_word... " >&6; }
44538if ${ac_cv_path_BUILD_CXX+:} false; then :
44539  $as_echo_n "(cached) " >&6
44540else
44541  case $BUILD_CXX in
44542  [\\/]* | ?:[\\/]*)
44543  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44544  ;;
44545  *)
44546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44547for as_dir in $PATH
44548do
44549  IFS=$as_save_IFS
44550  test -z "$as_dir" && as_dir=.
44551    for ac_exec_ext in '' $ac_executable_extensions; do
44552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44553    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44555    break 2
44556  fi
44557done
44558  done
44559IFS=$as_save_IFS
44560
44561  ;;
44562esac
44563fi
44564BUILD_CXX=$ac_cv_path_BUILD_CXX
44565if test -n "$BUILD_CXX"; then
44566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44567$as_echo "$BUILD_CXX" >&6; }
44568else
44569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44570$as_echo "no" >&6; }
44571fi
44572
44573
44574  test -n "$BUILD_CXX" && break
44575done
44576
44577  else
44578    # The variable is set, but is it from the command line or the environment?
44579
44580    # Try to remove the string !BUILD_CXX! from our list.
44581    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44582    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44583      # If it failed, the variable was not from the command line. Ignore it,
44584      # but warn the user (except for BASH, which is always set by the calling BASH).
44585      if test "xBUILD_CXX" != xBASH; then
44586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44587$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44588      fi
44589      # Try to locate tool using the code snippet
44590      for ac_prog in cl CC g++
44591do
44592  # Extract the first word of "$ac_prog", so it can be a program name with args.
44593set dummy $ac_prog; ac_word=$2
44594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44595$as_echo_n "checking for $ac_word... " >&6; }
44596if ${ac_cv_path_BUILD_CXX+:} false; then :
44597  $as_echo_n "(cached) " >&6
44598else
44599  case $BUILD_CXX in
44600  [\\/]* | ?:[\\/]*)
44601  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44602  ;;
44603  *)
44604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44605for as_dir in $PATH
44606do
44607  IFS=$as_save_IFS
44608  test -z "$as_dir" && as_dir=.
44609    for ac_exec_ext in '' $ac_executable_extensions; do
44610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44611    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44613    break 2
44614  fi
44615done
44616  done
44617IFS=$as_save_IFS
44618
44619  ;;
44620esac
44621fi
44622BUILD_CXX=$ac_cv_path_BUILD_CXX
44623if test -n "$BUILD_CXX"; then
44624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44625$as_echo "$BUILD_CXX" >&6; }
44626else
44627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44628$as_echo "no" >&6; }
44629fi
44630
44631
44632  test -n "$BUILD_CXX" && break
44633done
44634
44635    else
44636      # If it succeeded, then it was overridden by the user. We will use it
44637      # for the tool.
44638
44639      # First remove it from the list of overridden variables, so we can test
44640      # for unknown variables in the end.
44641      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44642
44643      # Check if we try to supply an empty value
44644      if test "x$BUILD_CXX" = x; then
44645        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44646$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44648$as_echo_n "checking for BUILD_CXX... " >&6; }
44649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44650$as_echo "disabled" >&6; }
44651      else
44652        # Check if the provided tool contains a complete path.
44653        tool_specified="$BUILD_CXX"
44654        tool_basename="${tool_specified##*/}"
44655        if test "x$tool_basename" = "x$tool_specified"; then
44656          # A command without a complete path is provided, search $PATH.
44657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44658$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44659          # Extract the first word of "$tool_basename", so it can be a program name with args.
44660set dummy $tool_basename; ac_word=$2
44661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44662$as_echo_n "checking for $ac_word... " >&6; }
44663if ${ac_cv_path_BUILD_CXX+:} false; then :
44664  $as_echo_n "(cached) " >&6
44665else
44666  case $BUILD_CXX in
44667  [\\/]* | ?:[\\/]*)
44668  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44669  ;;
44670  *)
44671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44672for as_dir in $PATH
44673do
44674  IFS=$as_save_IFS
44675  test -z "$as_dir" && as_dir=.
44676    for ac_exec_ext in '' $ac_executable_extensions; do
44677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44678    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44680    break 2
44681  fi
44682done
44683  done
44684IFS=$as_save_IFS
44685
44686  ;;
44687esac
44688fi
44689BUILD_CXX=$ac_cv_path_BUILD_CXX
44690if test -n "$BUILD_CXX"; then
44691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44692$as_echo "$BUILD_CXX" >&6; }
44693else
44694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44695$as_echo "no" >&6; }
44696fi
44697
44698
44699          if test "x$BUILD_CXX" = x; then
44700            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44701          fi
44702        else
44703          # Otherwise we believe it is a complete path. Use it as it is.
44704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44705$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44706          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44707$as_echo_n "checking for BUILD_CXX... " >&6; }
44708          if test ! -x "$tool_specified"; then
44709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44710$as_echo "not found" >&6; }
44711            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44712          fi
44713          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44714$as_echo "$tool_specified" >&6; }
44715        fi
44716      fi
44717    fi
44718
44719  fi
44720
44721
44722
44723  if test "x$BUILD_CXX" = x; then
44724    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44725  fi
44726
44727
44728
44729  # Only process if variable expands to non-empty
44730
44731  if test "x$BUILD_CXX" != x; then
44732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44733
44734  # First separate the path from the arguments. This will split at the first
44735  # space.
44736  complete="$BUILD_CXX"
44737  path="${complete%% *}"
44738  tmp="$complete EOL"
44739  arguments="${tmp#* }"
44740
44741  # Input might be given as Windows format, start by converting to
44742  # unix format.
44743  new_path=`$CYGPATH -u "$path"`
44744
44745  # Now try to locate executable using which
44746  new_path=`$WHICH "$new_path" 2> /dev/null`
44747  # bat and cmd files are not always considered executable in cygwin causing which
44748  # to not find them
44749  if test "x$new_path" = x \
44750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44752    new_path=`$CYGPATH -u "$path"`
44753  fi
44754  if test "x$new_path" = x; then
44755    # Oops. Which didn't find the executable.
44756    # The splitting of arguments from the executable at a space might have been incorrect,
44757    # since paths with space are more likely in Windows. Give it another try with the whole
44758    # argument.
44759    path="$complete"
44760    arguments="EOL"
44761    new_path=`$CYGPATH -u "$path"`
44762    new_path=`$WHICH "$new_path" 2> /dev/null`
44763    # bat and cmd files are not always considered executable in cygwin causing which
44764    # to not find them
44765    if test "x$new_path" = x \
44766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44768      new_path=`$CYGPATH -u "$path"`
44769    fi
44770    if test "x$new_path" = x; then
44771      # It's still not found. Now this is an unrecoverable error.
44772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44773$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44774      has_space=`$ECHO "$complete" | $GREP " "`
44775      if test "x$has_space" != x; then
44776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44778      fi
44779      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44780    fi
44781  fi
44782
44783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44786  # "foo.exe" is OK but "foo" is an error.
44787  #
44788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44789  # It is also a way to make sure we got the proper file name for the real test later on.
44790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44791  if test "x$test_shortpath" = x; then
44792    # Short path failed, file does not exist as specified.
44793    # Try adding .exe or .cmd
44794    if test -f "${new_path}.exe"; then
44795      input_to_shortpath="${new_path}.exe"
44796    elif test -f "${new_path}.cmd"; then
44797      input_to_shortpath="${new_path}.cmd"
44798    else
44799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44800$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44803      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44804    fi
44805  else
44806    input_to_shortpath="$new_path"
44807  fi
44808
44809  # Call helper function which possibly converts this using DOS-style short mode.
44810  # If so, the updated path is stored in $new_path.
44811  new_path="$input_to_shortpath"
44812
44813  input_path="$input_to_shortpath"
44814  # Check if we need to convert this using DOS-style short mode. If the path
44815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44816  # take no chances and rewrite it.
44817  # Note: m4 eats our [], so we need to use [ and ] instead.
44818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44819  if test "x$has_forbidden_chars" != x; then
44820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44824      # Going to short mode and back again did indeed matter. Since short mode is
44825      # case insensitive, let's make it lowercase to improve readability.
44826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44827      # Now convert it back to Unix-style (cygpath)
44828      input_path=`$CYGPATH -u "$shortmode_path"`
44829      new_path="$input_path"
44830    fi
44831  fi
44832
44833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44834  if test "x$test_cygdrive_prefix" = x; then
44835    # As a simple fix, exclude /usr/bin since it's not a real path.
44836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44838      # a path prefixed by /cygdrive for fixpath to work.
44839      new_path="$CYGWIN_ROOT_PATH$input_path"
44840    fi
44841  fi
44842
44843  # remove trailing .exe if any
44844  new_path="${new_path/%.exe/}"
44845
44846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44847
44848  # First separate the path from the arguments. This will split at the first
44849  # space.
44850  complete="$BUILD_CXX"
44851  path="${complete%% *}"
44852  tmp="$complete EOL"
44853  arguments="${tmp#* }"
44854
44855  # Input might be given as Windows format, start by converting to
44856  # unix format.
44857  new_path="$path"
44858
44859  windows_path="$new_path"
44860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44861    unix_path=`$CYGPATH -u "$windows_path"`
44862    new_path="$unix_path"
44863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44865    new_path="$unix_path"
44866  fi
44867
44868
44869  # Now try to locate executable using which
44870  new_path=`$WHICH "$new_path" 2> /dev/null`
44871
44872  if test "x$new_path" = x; then
44873    # Oops. Which didn't find the executable.
44874    # The splitting of arguments from the executable at a space might have been incorrect,
44875    # since paths with space are more likely in Windows. Give it another try with the whole
44876    # argument.
44877    path="$complete"
44878    arguments="EOL"
44879    new_path="$path"
44880
44881  windows_path="$new_path"
44882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44883    unix_path=`$CYGPATH -u "$windows_path"`
44884    new_path="$unix_path"
44885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44887    new_path="$unix_path"
44888  fi
44889
44890
44891    new_path=`$WHICH "$new_path" 2> /dev/null`
44892    # bat and cmd files are not always considered executable in MSYS causing which
44893    # to not find them
44894    if test "x$new_path" = x \
44895        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44896        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44897      new_path="$path"
44898
44899  windows_path="$new_path"
44900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44901    unix_path=`$CYGPATH -u "$windows_path"`
44902    new_path="$unix_path"
44903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44905    new_path="$unix_path"
44906  fi
44907
44908    fi
44909
44910    if test "x$new_path" = x; then
44911      # It's still not found. Now this is an unrecoverable error.
44912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44913$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44914      has_space=`$ECHO "$complete" | $GREP " "`
44915      if test "x$has_space" != x; then
44916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44918      fi
44919      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44920    fi
44921  fi
44922
44923  # Now new_path has a complete unix path to the binary
44924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44925    # Keep paths in /bin as-is, but remove trailing .exe if any
44926    new_path="${new_path/%.exe/}"
44927    # Do not save /bin paths to all_fixpath_prefixes!
44928  else
44929    # Not in mixed or Windows style, start by that.
44930    new_path=`cmd //c echo $new_path`
44931
44932  input_path="$new_path"
44933  # Check if we need to convert this using DOS-style short mode. If the path
44934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44935  # take no chances and rewrite it.
44936  # Note: m4 eats our [], so we need to use [ and ] instead.
44937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44938  if test "x$has_forbidden_chars" != x; then
44939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44941  fi
44942
44943    # Output is in $new_path
44944
44945  windows_path="$new_path"
44946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44947    unix_path=`$CYGPATH -u "$windows_path"`
44948    new_path="$unix_path"
44949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44951    new_path="$unix_path"
44952  fi
44953
44954    # remove trailing .exe if any
44955    new_path="${new_path/%.exe/}"
44956
44957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44959  fi
44960
44961    else
44962      # We're on a unix platform. Hooray! :)
44963      # First separate the path from the arguments. This will split at the first
44964      # space.
44965      complete="$BUILD_CXX"
44966      path="${complete%% *}"
44967      tmp="$complete EOL"
44968      arguments="${tmp#* }"
44969
44970      # Cannot rely on the command "which" here since it doesn't always work.
44971      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44972      if test -z "$is_absolute_path"; then
44973        # Path to executable is not absolute. Find it.
44974        IFS_save="$IFS"
44975        IFS=:
44976        for p in $PATH; do
44977          if test -f "$p/$path" && test -x "$p/$path"; then
44978            new_path="$p/$path"
44979            break
44980          fi
44981        done
44982        IFS="$IFS_save"
44983      else
44984        # This is an absolute path, we can use it without further modifications.
44985        new_path="$path"
44986      fi
44987
44988      if test "x$new_path" = x; then
44989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44990$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44991        has_space=`$ECHO "$complete" | $GREP " "`
44992        if test "x$has_space" != x; then
44993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44995        fi
44996        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44997      fi
44998    fi
44999
45000    # Now join together the path and the arguments once again
45001    if test "x$arguments" != xEOL; then
45002      new_complete="$new_path ${arguments% *}"
45003    else
45004      new_complete="$new_path"
45005    fi
45006
45007    if test "x$complete" != "x$new_complete"; then
45008      BUILD_CXX="$new_complete"
45009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45010$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45011    fi
45012  fi
45013
45014
45015
45016  # Publish this variable in the help.
45017
45018
45019  if [ -z "${BUILD_NM+x}" ]; then
45020    # The variable is not set by user, try to locate tool using the code snippet
45021    for ac_prog in nm gcc-nm
45022do
45023  # Extract the first word of "$ac_prog", so it can be a program name with args.
45024set dummy $ac_prog; ac_word=$2
45025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45026$as_echo_n "checking for $ac_word... " >&6; }
45027if ${ac_cv_path_BUILD_NM+:} false; then :
45028  $as_echo_n "(cached) " >&6
45029else
45030  case $BUILD_NM in
45031  [\\/]* | ?:[\\/]*)
45032  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45033  ;;
45034  *)
45035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45036for as_dir in $PATH
45037do
45038  IFS=$as_save_IFS
45039  test -z "$as_dir" && as_dir=.
45040    for ac_exec_ext in '' $ac_executable_extensions; do
45041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45042    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45044    break 2
45045  fi
45046done
45047  done
45048IFS=$as_save_IFS
45049
45050  ;;
45051esac
45052fi
45053BUILD_NM=$ac_cv_path_BUILD_NM
45054if test -n "$BUILD_NM"; then
45055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45056$as_echo "$BUILD_NM" >&6; }
45057else
45058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45059$as_echo "no" >&6; }
45060fi
45061
45062
45063  test -n "$BUILD_NM" && break
45064done
45065
45066  else
45067    # The variable is set, but is it from the command line or the environment?
45068
45069    # Try to remove the string !BUILD_NM! from our list.
45070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45072      # If it failed, the variable was not from the command line. Ignore it,
45073      # but warn the user (except for BASH, which is always set by the calling BASH).
45074      if test "xBUILD_NM" != xBASH; then
45075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45076$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45077      fi
45078      # Try to locate tool using the code snippet
45079      for ac_prog in nm gcc-nm
45080do
45081  # Extract the first word of "$ac_prog", so it can be a program name with args.
45082set dummy $ac_prog; ac_word=$2
45083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45084$as_echo_n "checking for $ac_word... " >&6; }
45085if ${ac_cv_path_BUILD_NM+:} false; then :
45086  $as_echo_n "(cached) " >&6
45087else
45088  case $BUILD_NM in
45089  [\\/]* | ?:[\\/]*)
45090  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45091  ;;
45092  *)
45093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45094for as_dir in $PATH
45095do
45096  IFS=$as_save_IFS
45097  test -z "$as_dir" && as_dir=.
45098    for ac_exec_ext in '' $ac_executable_extensions; do
45099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45100    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45102    break 2
45103  fi
45104done
45105  done
45106IFS=$as_save_IFS
45107
45108  ;;
45109esac
45110fi
45111BUILD_NM=$ac_cv_path_BUILD_NM
45112if test -n "$BUILD_NM"; then
45113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45114$as_echo "$BUILD_NM" >&6; }
45115else
45116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45117$as_echo "no" >&6; }
45118fi
45119
45120
45121  test -n "$BUILD_NM" && break
45122done
45123
45124    else
45125      # If it succeeded, then it was overridden by the user. We will use it
45126      # for the tool.
45127
45128      # First remove it from the list of overridden variables, so we can test
45129      # for unknown variables in the end.
45130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45131
45132      # Check if we try to supply an empty value
45133      if test "x$BUILD_NM" = x; then
45134        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45135$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45137$as_echo_n "checking for BUILD_NM... " >&6; }
45138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45139$as_echo "disabled" >&6; }
45140      else
45141        # Check if the provided tool contains a complete path.
45142        tool_specified="$BUILD_NM"
45143        tool_basename="${tool_specified##*/}"
45144        if test "x$tool_basename" = "x$tool_specified"; then
45145          # A command without a complete path is provided, search $PATH.
45146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45147$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45148          # Extract the first word of "$tool_basename", so it can be a program name with args.
45149set dummy $tool_basename; ac_word=$2
45150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45151$as_echo_n "checking for $ac_word... " >&6; }
45152if ${ac_cv_path_BUILD_NM+:} false; then :
45153  $as_echo_n "(cached) " >&6
45154else
45155  case $BUILD_NM in
45156  [\\/]* | ?:[\\/]*)
45157  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45158  ;;
45159  *)
45160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45161for as_dir in $PATH
45162do
45163  IFS=$as_save_IFS
45164  test -z "$as_dir" && as_dir=.
45165    for ac_exec_ext in '' $ac_executable_extensions; do
45166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45167    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45169    break 2
45170  fi
45171done
45172  done
45173IFS=$as_save_IFS
45174
45175  ;;
45176esac
45177fi
45178BUILD_NM=$ac_cv_path_BUILD_NM
45179if test -n "$BUILD_NM"; then
45180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45181$as_echo "$BUILD_NM" >&6; }
45182else
45183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45184$as_echo "no" >&6; }
45185fi
45186
45187
45188          if test "x$BUILD_NM" = x; then
45189            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45190          fi
45191        else
45192          # Otherwise we believe it is a complete path. Use it as it is.
45193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45194$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45195          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45196$as_echo_n "checking for BUILD_NM... " >&6; }
45197          if test ! -x "$tool_specified"; then
45198            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45199$as_echo "not found" >&6; }
45200            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45201          fi
45202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45203$as_echo "$tool_specified" >&6; }
45204        fi
45205      fi
45206    fi
45207
45208  fi
45209
45210
45211
45212  # Only process if variable expands to non-empty
45213
45214  if test "x$BUILD_NM" != x; then
45215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45216
45217  # First separate the path from the arguments. This will split at the first
45218  # space.
45219  complete="$BUILD_NM"
45220  path="${complete%% *}"
45221  tmp="$complete EOL"
45222  arguments="${tmp#* }"
45223
45224  # Input might be given as Windows format, start by converting to
45225  # unix format.
45226  new_path=`$CYGPATH -u "$path"`
45227
45228  # Now try to locate executable using which
45229  new_path=`$WHICH "$new_path" 2> /dev/null`
45230  # bat and cmd files are not always considered executable in cygwin causing which
45231  # to not find them
45232  if test "x$new_path" = x \
45233      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45234      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45235    new_path=`$CYGPATH -u "$path"`
45236  fi
45237  if test "x$new_path" = x; then
45238    # Oops. Which didn't find the executable.
45239    # The splitting of arguments from the executable at a space might have been incorrect,
45240    # since paths with space are more likely in Windows. Give it another try with the whole
45241    # argument.
45242    path="$complete"
45243    arguments="EOL"
45244    new_path=`$CYGPATH -u "$path"`
45245    new_path=`$WHICH "$new_path" 2> /dev/null`
45246    # bat and cmd files are not always considered executable in cygwin causing which
45247    # to not find them
45248    if test "x$new_path" = x \
45249        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45250        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45251      new_path=`$CYGPATH -u "$path"`
45252    fi
45253    if test "x$new_path" = x; then
45254      # It's still not found. Now this is an unrecoverable error.
45255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45256$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45257      has_space=`$ECHO "$complete" | $GREP " "`
45258      if test "x$has_space" != x; then
45259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45261      fi
45262      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45263    fi
45264  fi
45265
45266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45269  # "foo.exe" is OK but "foo" is an error.
45270  #
45271  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45272  # It is also a way to make sure we got the proper file name for the real test later on.
45273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45274  if test "x$test_shortpath" = x; then
45275    # Short path failed, file does not exist as specified.
45276    # Try adding .exe or .cmd
45277    if test -f "${new_path}.exe"; then
45278      input_to_shortpath="${new_path}.exe"
45279    elif test -f "${new_path}.cmd"; then
45280      input_to_shortpath="${new_path}.cmd"
45281    else
45282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45283$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45284      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45285$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45286      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45287    fi
45288  else
45289    input_to_shortpath="$new_path"
45290  fi
45291
45292  # Call helper function which possibly converts this using DOS-style short mode.
45293  # If so, the updated path is stored in $new_path.
45294  new_path="$input_to_shortpath"
45295
45296  input_path="$input_to_shortpath"
45297  # Check if we need to convert this using DOS-style short mode. If the path
45298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45299  # take no chances and rewrite it.
45300  # Note: m4 eats our [], so we need to use [ and ] instead.
45301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45302  if test "x$has_forbidden_chars" != x; then
45303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45307      # Going to short mode and back again did indeed matter. Since short mode is
45308      # case insensitive, let's make it lowercase to improve readability.
45309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45310      # Now convert it back to Unix-style (cygpath)
45311      input_path=`$CYGPATH -u "$shortmode_path"`
45312      new_path="$input_path"
45313    fi
45314  fi
45315
45316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45317  if test "x$test_cygdrive_prefix" = x; then
45318    # As a simple fix, exclude /usr/bin since it's not a real path.
45319    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45321      # a path prefixed by /cygdrive for fixpath to work.
45322      new_path="$CYGWIN_ROOT_PATH$input_path"
45323    fi
45324  fi
45325
45326  # remove trailing .exe if any
45327  new_path="${new_path/%.exe/}"
45328
45329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45330
45331  # First separate the path from the arguments. This will split at the first
45332  # space.
45333  complete="$BUILD_NM"
45334  path="${complete%% *}"
45335  tmp="$complete EOL"
45336  arguments="${tmp#* }"
45337
45338  # Input might be given as Windows format, start by converting to
45339  # unix format.
45340  new_path="$path"
45341
45342  windows_path="$new_path"
45343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45344    unix_path=`$CYGPATH -u "$windows_path"`
45345    new_path="$unix_path"
45346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45348    new_path="$unix_path"
45349  fi
45350
45351
45352  # Now try to locate executable using which
45353  new_path=`$WHICH "$new_path" 2> /dev/null`
45354
45355  if test "x$new_path" = x; then
45356    # Oops. Which didn't find the executable.
45357    # The splitting of arguments from the executable at a space might have been incorrect,
45358    # since paths with space are more likely in Windows. Give it another try with the whole
45359    # argument.
45360    path="$complete"
45361    arguments="EOL"
45362    new_path="$path"
45363
45364  windows_path="$new_path"
45365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45366    unix_path=`$CYGPATH -u "$windows_path"`
45367    new_path="$unix_path"
45368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45370    new_path="$unix_path"
45371  fi
45372
45373
45374    new_path=`$WHICH "$new_path" 2> /dev/null`
45375    # bat and cmd files are not always considered executable in MSYS causing which
45376    # to not find them
45377    if test "x$new_path" = x \
45378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45380      new_path="$path"
45381
45382  windows_path="$new_path"
45383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45384    unix_path=`$CYGPATH -u "$windows_path"`
45385    new_path="$unix_path"
45386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45388    new_path="$unix_path"
45389  fi
45390
45391    fi
45392
45393    if test "x$new_path" = x; then
45394      # It's still not found. Now this is an unrecoverable error.
45395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45396$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45397      has_space=`$ECHO "$complete" | $GREP " "`
45398      if test "x$has_space" != x; then
45399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45401      fi
45402      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45403    fi
45404  fi
45405
45406  # Now new_path has a complete unix path to the binary
45407  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45408    # Keep paths in /bin as-is, but remove trailing .exe if any
45409    new_path="${new_path/%.exe/}"
45410    # Do not save /bin paths to all_fixpath_prefixes!
45411  else
45412    # Not in mixed or Windows style, start by that.
45413    new_path=`cmd //c echo $new_path`
45414
45415  input_path="$new_path"
45416  # Check if we need to convert this using DOS-style short mode. If the path
45417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45418  # take no chances and rewrite it.
45419  # Note: m4 eats our [], so we need to use [ and ] instead.
45420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45421  if test "x$has_forbidden_chars" != x; then
45422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45424  fi
45425
45426    # Output is in $new_path
45427
45428  windows_path="$new_path"
45429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45430    unix_path=`$CYGPATH -u "$windows_path"`
45431    new_path="$unix_path"
45432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45434    new_path="$unix_path"
45435  fi
45436
45437    # remove trailing .exe if any
45438    new_path="${new_path/%.exe/}"
45439
45440    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45441    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45442  fi
45443
45444    else
45445      # We're on a unix platform. Hooray! :)
45446      # First separate the path from the arguments. This will split at the first
45447      # space.
45448      complete="$BUILD_NM"
45449      path="${complete%% *}"
45450      tmp="$complete EOL"
45451      arguments="${tmp#* }"
45452
45453      # Cannot rely on the command "which" here since it doesn't always work.
45454      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45455      if test -z "$is_absolute_path"; then
45456        # Path to executable is not absolute. Find it.
45457        IFS_save="$IFS"
45458        IFS=:
45459        for p in $PATH; do
45460          if test -f "$p/$path" && test -x "$p/$path"; then
45461            new_path="$p/$path"
45462            break
45463          fi
45464        done
45465        IFS="$IFS_save"
45466      else
45467        # This is an absolute path, we can use it without further modifications.
45468        new_path="$path"
45469      fi
45470
45471      if test "x$new_path" = x; then
45472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45473$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45474        has_space=`$ECHO "$complete" | $GREP " "`
45475        if test "x$has_space" != x; then
45476          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45477$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45478        fi
45479        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45480      fi
45481    fi
45482
45483    # Now join together the path and the arguments once again
45484    if test "x$arguments" != xEOL; then
45485      new_complete="$new_path ${arguments% *}"
45486    else
45487      new_complete="$new_path"
45488    fi
45489
45490    if test "x$complete" != "x$new_complete"; then
45491      BUILD_NM="$new_complete"
45492      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45493$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45494    fi
45495  fi
45496
45497
45498
45499  # Publish this variable in the help.
45500
45501
45502  if [ -z "${BUILD_AR+x}" ]; then
45503    # The variable is not set by user, try to locate tool using the code snippet
45504    for ac_prog in ar gcc-ar
45505do
45506  # Extract the first word of "$ac_prog", so it can be a program name with args.
45507set dummy $ac_prog; ac_word=$2
45508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45509$as_echo_n "checking for $ac_word... " >&6; }
45510if ${ac_cv_path_BUILD_AR+:} false; then :
45511  $as_echo_n "(cached) " >&6
45512else
45513  case $BUILD_AR in
45514  [\\/]* | ?:[\\/]*)
45515  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45516  ;;
45517  *)
45518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45519for as_dir in $PATH
45520do
45521  IFS=$as_save_IFS
45522  test -z "$as_dir" && as_dir=.
45523    for ac_exec_ext in '' $ac_executable_extensions; do
45524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45525    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45527    break 2
45528  fi
45529done
45530  done
45531IFS=$as_save_IFS
45532
45533  ;;
45534esac
45535fi
45536BUILD_AR=$ac_cv_path_BUILD_AR
45537if test -n "$BUILD_AR"; then
45538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45539$as_echo "$BUILD_AR" >&6; }
45540else
45541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45542$as_echo "no" >&6; }
45543fi
45544
45545
45546  test -n "$BUILD_AR" && break
45547done
45548
45549  else
45550    # The variable is set, but is it from the command line or the environment?
45551
45552    # Try to remove the string !BUILD_AR! from our list.
45553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45555      # If it failed, the variable was not from the command line. Ignore it,
45556      # but warn the user (except for BASH, which is always set by the calling BASH).
45557      if test "xBUILD_AR" != xBASH; then
45558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45559$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45560      fi
45561      # Try to locate tool using the code snippet
45562      for ac_prog in ar gcc-ar
45563do
45564  # Extract the first word of "$ac_prog", so it can be a program name with args.
45565set dummy $ac_prog; ac_word=$2
45566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45567$as_echo_n "checking for $ac_word... " >&6; }
45568if ${ac_cv_path_BUILD_AR+:} false; then :
45569  $as_echo_n "(cached) " >&6
45570else
45571  case $BUILD_AR in
45572  [\\/]* | ?:[\\/]*)
45573  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45574  ;;
45575  *)
45576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45577for as_dir in $PATH
45578do
45579  IFS=$as_save_IFS
45580  test -z "$as_dir" && as_dir=.
45581    for ac_exec_ext in '' $ac_executable_extensions; do
45582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45583    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45585    break 2
45586  fi
45587done
45588  done
45589IFS=$as_save_IFS
45590
45591  ;;
45592esac
45593fi
45594BUILD_AR=$ac_cv_path_BUILD_AR
45595if test -n "$BUILD_AR"; then
45596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45597$as_echo "$BUILD_AR" >&6; }
45598else
45599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45600$as_echo "no" >&6; }
45601fi
45602
45603
45604  test -n "$BUILD_AR" && break
45605done
45606
45607    else
45608      # If it succeeded, then it was overridden by the user. We will use it
45609      # for the tool.
45610
45611      # First remove it from the list of overridden variables, so we can test
45612      # for unknown variables in the end.
45613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45614
45615      # Check if we try to supply an empty value
45616      if test "x$BUILD_AR" = x; then
45617        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45618$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45620$as_echo_n "checking for BUILD_AR... " >&6; }
45621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45622$as_echo "disabled" >&6; }
45623      else
45624        # Check if the provided tool contains a complete path.
45625        tool_specified="$BUILD_AR"
45626        tool_basename="${tool_specified##*/}"
45627        if test "x$tool_basename" = "x$tool_specified"; then
45628          # A command without a complete path is provided, search $PATH.
45629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45630$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45631          # Extract the first word of "$tool_basename", so it can be a program name with args.
45632set dummy $tool_basename; ac_word=$2
45633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45634$as_echo_n "checking for $ac_word... " >&6; }
45635if ${ac_cv_path_BUILD_AR+:} false; then :
45636  $as_echo_n "(cached) " >&6
45637else
45638  case $BUILD_AR in
45639  [\\/]* | ?:[\\/]*)
45640  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45641  ;;
45642  *)
45643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45644for as_dir in $PATH
45645do
45646  IFS=$as_save_IFS
45647  test -z "$as_dir" && as_dir=.
45648    for ac_exec_ext in '' $ac_executable_extensions; do
45649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45650    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45652    break 2
45653  fi
45654done
45655  done
45656IFS=$as_save_IFS
45657
45658  ;;
45659esac
45660fi
45661BUILD_AR=$ac_cv_path_BUILD_AR
45662if test -n "$BUILD_AR"; then
45663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45664$as_echo "$BUILD_AR" >&6; }
45665else
45666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45667$as_echo "no" >&6; }
45668fi
45669
45670
45671          if test "x$BUILD_AR" = x; then
45672            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45673          fi
45674        else
45675          # Otherwise we believe it is a complete path. Use it as it is.
45676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45677$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45678          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45679$as_echo_n "checking for BUILD_AR... " >&6; }
45680          if test ! -x "$tool_specified"; then
45681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45682$as_echo "not found" >&6; }
45683            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45684          fi
45685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45686$as_echo "$tool_specified" >&6; }
45687        fi
45688      fi
45689    fi
45690
45691  fi
45692
45693
45694
45695  # Only process if variable expands to non-empty
45696
45697  if test "x$BUILD_AR" != x; then
45698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45699
45700  # First separate the path from the arguments. This will split at the first
45701  # space.
45702  complete="$BUILD_AR"
45703  path="${complete%% *}"
45704  tmp="$complete EOL"
45705  arguments="${tmp#* }"
45706
45707  # Input might be given as Windows format, start by converting to
45708  # unix format.
45709  new_path=`$CYGPATH -u "$path"`
45710
45711  # Now try to locate executable using which
45712  new_path=`$WHICH "$new_path" 2> /dev/null`
45713  # bat and cmd files are not always considered executable in cygwin causing which
45714  # to not find them
45715  if test "x$new_path" = x \
45716      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45717      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45718    new_path=`$CYGPATH -u "$path"`
45719  fi
45720  if test "x$new_path" = x; then
45721    # Oops. Which didn't find the executable.
45722    # The splitting of arguments from the executable at a space might have been incorrect,
45723    # since paths with space are more likely in Windows. Give it another try with the whole
45724    # argument.
45725    path="$complete"
45726    arguments="EOL"
45727    new_path=`$CYGPATH -u "$path"`
45728    new_path=`$WHICH "$new_path" 2> /dev/null`
45729    # bat and cmd files are not always considered executable in cygwin causing which
45730    # to not find them
45731    if test "x$new_path" = x \
45732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45734      new_path=`$CYGPATH -u "$path"`
45735    fi
45736    if test "x$new_path" = x; then
45737      # It's still not found. Now this is an unrecoverable error.
45738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45739$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45740      has_space=`$ECHO "$complete" | $GREP " "`
45741      if test "x$has_space" != x; then
45742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45744      fi
45745      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45746    fi
45747  fi
45748
45749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45752  # "foo.exe" is OK but "foo" is an error.
45753  #
45754  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45755  # It is also a way to make sure we got the proper file name for the real test later on.
45756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45757  if test "x$test_shortpath" = x; then
45758    # Short path failed, file does not exist as specified.
45759    # Try adding .exe or .cmd
45760    if test -f "${new_path}.exe"; then
45761      input_to_shortpath="${new_path}.exe"
45762    elif test -f "${new_path}.cmd"; then
45763      input_to_shortpath="${new_path}.cmd"
45764    else
45765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45766$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45767      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45768$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45769      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45770    fi
45771  else
45772    input_to_shortpath="$new_path"
45773  fi
45774
45775  # Call helper function which possibly converts this using DOS-style short mode.
45776  # If so, the updated path is stored in $new_path.
45777  new_path="$input_to_shortpath"
45778
45779  input_path="$input_to_shortpath"
45780  # Check if we need to convert this using DOS-style short mode. If the path
45781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45782  # take no chances and rewrite it.
45783  # Note: m4 eats our [], so we need to use [ and ] instead.
45784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45785  if test "x$has_forbidden_chars" != x; then
45786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45790      # Going to short mode and back again did indeed matter. Since short mode is
45791      # case insensitive, let's make it lowercase to improve readability.
45792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45793      # Now convert it back to Unix-style (cygpath)
45794      input_path=`$CYGPATH -u "$shortmode_path"`
45795      new_path="$input_path"
45796    fi
45797  fi
45798
45799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45800  if test "x$test_cygdrive_prefix" = x; then
45801    # As a simple fix, exclude /usr/bin since it's not a real path.
45802    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45804      # a path prefixed by /cygdrive for fixpath to work.
45805      new_path="$CYGWIN_ROOT_PATH$input_path"
45806    fi
45807  fi
45808
45809  # remove trailing .exe if any
45810  new_path="${new_path/%.exe/}"
45811
45812    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45813
45814  # First separate the path from the arguments. This will split at the first
45815  # space.
45816  complete="$BUILD_AR"
45817  path="${complete%% *}"
45818  tmp="$complete EOL"
45819  arguments="${tmp#* }"
45820
45821  # Input might be given as Windows format, start by converting to
45822  # unix format.
45823  new_path="$path"
45824
45825  windows_path="$new_path"
45826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45827    unix_path=`$CYGPATH -u "$windows_path"`
45828    new_path="$unix_path"
45829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45831    new_path="$unix_path"
45832  fi
45833
45834
45835  # Now try to locate executable using which
45836  new_path=`$WHICH "$new_path" 2> /dev/null`
45837
45838  if test "x$new_path" = x; then
45839    # Oops. Which didn't find the executable.
45840    # The splitting of arguments from the executable at a space might have been incorrect,
45841    # since paths with space are more likely in Windows. Give it another try with the whole
45842    # argument.
45843    path="$complete"
45844    arguments="EOL"
45845    new_path="$path"
45846
45847  windows_path="$new_path"
45848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45849    unix_path=`$CYGPATH -u "$windows_path"`
45850    new_path="$unix_path"
45851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45853    new_path="$unix_path"
45854  fi
45855
45856
45857    new_path=`$WHICH "$new_path" 2> /dev/null`
45858    # bat and cmd files are not always considered executable in MSYS causing which
45859    # to not find them
45860    if test "x$new_path" = x \
45861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45863      new_path="$path"
45864
45865  windows_path="$new_path"
45866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45867    unix_path=`$CYGPATH -u "$windows_path"`
45868    new_path="$unix_path"
45869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45871    new_path="$unix_path"
45872  fi
45873
45874    fi
45875
45876    if test "x$new_path" = x; then
45877      # It's still not found. Now this is an unrecoverable error.
45878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45879$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45880      has_space=`$ECHO "$complete" | $GREP " "`
45881      if test "x$has_space" != x; then
45882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45884      fi
45885      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45886    fi
45887  fi
45888
45889  # Now new_path has a complete unix path to the binary
45890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45891    # Keep paths in /bin as-is, but remove trailing .exe if any
45892    new_path="${new_path/%.exe/}"
45893    # Do not save /bin paths to all_fixpath_prefixes!
45894  else
45895    # Not in mixed or Windows style, start by that.
45896    new_path=`cmd //c echo $new_path`
45897
45898  input_path="$new_path"
45899  # Check if we need to convert this using DOS-style short mode. If the path
45900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45901  # take no chances and rewrite it.
45902  # Note: m4 eats our [], so we need to use [ and ] instead.
45903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45904  if test "x$has_forbidden_chars" != x; then
45905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45907  fi
45908
45909    # Output is in $new_path
45910
45911  windows_path="$new_path"
45912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45913    unix_path=`$CYGPATH -u "$windows_path"`
45914    new_path="$unix_path"
45915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45917    new_path="$unix_path"
45918  fi
45919
45920    # remove trailing .exe if any
45921    new_path="${new_path/%.exe/}"
45922
45923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45925  fi
45926
45927    else
45928      # We're on a unix platform. Hooray! :)
45929      # First separate the path from the arguments. This will split at the first
45930      # space.
45931      complete="$BUILD_AR"
45932      path="${complete%% *}"
45933      tmp="$complete EOL"
45934      arguments="${tmp#* }"
45935
45936      # Cannot rely on the command "which" here since it doesn't always work.
45937      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45938      if test -z "$is_absolute_path"; then
45939        # Path to executable is not absolute. Find it.
45940        IFS_save="$IFS"
45941        IFS=:
45942        for p in $PATH; do
45943          if test -f "$p/$path" && test -x "$p/$path"; then
45944            new_path="$p/$path"
45945            break
45946          fi
45947        done
45948        IFS="$IFS_save"
45949      else
45950        # This is an absolute path, we can use it without further modifications.
45951        new_path="$path"
45952      fi
45953
45954      if test "x$new_path" = x; then
45955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45956$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45957        has_space=`$ECHO "$complete" | $GREP " "`
45958        if test "x$has_space" != x; then
45959          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45960$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45961        fi
45962        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45963      fi
45964    fi
45965
45966    # Now join together the path and the arguments once again
45967    if test "x$arguments" != xEOL; then
45968      new_complete="$new_path ${arguments% *}"
45969    else
45970      new_complete="$new_path"
45971    fi
45972
45973    if test "x$complete" != "x$new_complete"; then
45974      BUILD_AR="$new_complete"
45975      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45976$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45977    fi
45978  fi
45979
45980
45981
45982  # Publish this variable in the help.
45983
45984
45985  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45986    # The variable is not set by user, try to locate tool using the code snippet
45987    for ac_prog in objcopy
45988do
45989  # Extract the first word of "$ac_prog", so it can be a program name with args.
45990set dummy $ac_prog; ac_word=$2
45991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45992$as_echo_n "checking for $ac_word... " >&6; }
45993if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45994  $as_echo_n "(cached) " >&6
45995else
45996  case $BUILD_OBJCOPY in
45997  [\\/]* | ?:[\\/]*)
45998  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45999  ;;
46000  *)
46001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46002for as_dir in $PATH
46003do
46004  IFS=$as_save_IFS
46005  test -z "$as_dir" && as_dir=.
46006    for ac_exec_ext in '' $ac_executable_extensions; do
46007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46008    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46010    break 2
46011  fi
46012done
46013  done
46014IFS=$as_save_IFS
46015
46016  ;;
46017esac
46018fi
46019BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46020if test -n "$BUILD_OBJCOPY"; then
46021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46022$as_echo "$BUILD_OBJCOPY" >&6; }
46023else
46024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46025$as_echo "no" >&6; }
46026fi
46027
46028
46029  test -n "$BUILD_OBJCOPY" && break
46030done
46031
46032  else
46033    # The variable is set, but is it from the command line or the environment?
46034
46035    # Try to remove the string !BUILD_OBJCOPY! from our list.
46036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46038      # If it failed, the variable was not from the command line. Ignore it,
46039      # but warn the user (except for BASH, which is always set by the calling BASH).
46040      if test "xBUILD_OBJCOPY" != xBASH; then
46041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46042$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46043      fi
46044      # Try to locate tool using the code snippet
46045      for ac_prog in objcopy
46046do
46047  # Extract the first word of "$ac_prog", so it can be a program name with args.
46048set dummy $ac_prog; ac_word=$2
46049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46050$as_echo_n "checking for $ac_word... " >&6; }
46051if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46052  $as_echo_n "(cached) " >&6
46053else
46054  case $BUILD_OBJCOPY in
46055  [\\/]* | ?:[\\/]*)
46056  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46057  ;;
46058  *)
46059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46060for as_dir in $PATH
46061do
46062  IFS=$as_save_IFS
46063  test -z "$as_dir" && as_dir=.
46064    for ac_exec_ext in '' $ac_executable_extensions; do
46065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46066    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46068    break 2
46069  fi
46070done
46071  done
46072IFS=$as_save_IFS
46073
46074  ;;
46075esac
46076fi
46077BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46078if test -n "$BUILD_OBJCOPY"; then
46079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46080$as_echo "$BUILD_OBJCOPY" >&6; }
46081else
46082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46083$as_echo "no" >&6; }
46084fi
46085
46086
46087  test -n "$BUILD_OBJCOPY" && break
46088done
46089
46090    else
46091      # If it succeeded, then it was overridden by the user. We will use it
46092      # for the tool.
46093
46094      # First remove it from the list of overridden variables, so we can test
46095      # for unknown variables in the end.
46096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46097
46098      # Check if we try to supply an empty value
46099      if test "x$BUILD_OBJCOPY" = x; then
46100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46101$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46103$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46105$as_echo "disabled" >&6; }
46106      else
46107        # Check if the provided tool contains a complete path.
46108        tool_specified="$BUILD_OBJCOPY"
46109        tool_basename="${tool_specified##*/}"
46110        if test "x$tool_basename" = "x$tool_specified"; then
46111          # A command without a complete path is provided, search $PATH.
46112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46113$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46114          # Extract the first word of "$tool_basename", so it can be a program name with args.
46115set dummy $tool_basename; ac_word=$2
46116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46117$as_echo_n "checking for $ac_word... " >&6; }
46118if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46119  $as_echo_n "(cached) " >&6
46120else
46121  case $BUILD_OBJCOPY in
46122  [\\/]* | ?:[\\/]*)
46123  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46124  ;;
46125  *)
46126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46127for as_dir in $PATH
46128do
46129  IFS=$as_save_IFS
46130  test -z "$as_dir" && as_dir=.
46131    for ac_exec_ext in '' $ac_executable_extensions; do
46132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46133    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46135    break 2
46136  fi
46137done
46138  done
46139IFS=$as_save_IFS
46140
46141  ;;
46142esac
46143fi
46144BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46145if test -n "$BUILD_OBJCOPY"; then
46146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46147$as_echo "$BUILD_OBJCOPY" >&6; }
46148else
46149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46150$as_echo "no" >&6; }
46151fi
46152
46153
46154          if test "x$BUILD_OBJCOPY" = x; then
46155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46156          fi
46157        else
46158          # Otherwise we believe it is a complete path. Use it as it is.
46159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46160$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46162$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46163          if test ! -x "$tool_specified"; then
46164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46165$as_echo "not found" >&6; }
46166            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46167          fi
46168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46169$as_echo "$tool_specified" >&6; }
46170        fi
46171      fi
46172    fi
46173
46174  fi
46175
46176
46177
46178  # Only process if variable expands to non-empty
46179
46180  if test "x$BUILD_OBJCOPY" != x; then
46181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46182
46183  # First separate the path from the arguments. This will split at the first
46184  # space.
46185  complete="$BUILD_OBJCOPY"
46186  path="${complete%% *}"
46187  tmp="$complete EOL"
46188  arguments="${tmp#* }"
46189
46190  # Input might be given as Windows format, start by converting to
46191  # unix format.
46192  new_path=`$CYGPATH -u "$path"`
46193
46194  # Now try to locate executable using which
46195  new_path=`$WHICH "$new_path" 2> /dev/null`
46196  # bat and cmd files are not always considered executable in cygwin causing which
46197  # to not find them
46198  if test "x$new_path" = x \
46199      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46200      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46201    new_path=`$CYGPATH -u "$path"`
46202  fi
46203  if test "x$new_path" = x; then
46204    # Oops. Which didn't find the executable.
46205    # The splitting of arguments from the executable at a space might have been incorrect,
46206    # since paths with space are more likely in Windows. Give it another try with the whole
46207    # argument.
46208    path="$complete"
46209    arguments="EOL"
46210    new_path=`$CYGPATH -u "$path"`
46211    new_path=`$WHICH "$new_path" 2> /dev/null`
46212    # bat and cmd files are not always considered executable in cygwin causing which
46213    # to not find them
46214    if test "x$new_path" = x \
46215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46217      new_path=`$CYGPATH -u "$path"`
46218    fi
46219    if test "x$new_path" = x; then
46220      # It's still not found. Now this is an unrecoverable error.
46221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46222$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46223      has_space=`$ECHO "$complete" | $GREP " "`
46224      if test "x$has_space" != x; then
46225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46227      fi
46228      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46229    fi
46230  fi
46231
46232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46235  # "foo.exe" is OK but "foo" is an error.
46236  #
46237  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46238  # It is also a way to make sure we got the proper file name for the real test later on.
46239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46240  if test "x$test_shortpath" = x; then
46241    # Short path failed, file does not exist as specified.
46242    # Try adding .exe or .cmd
46243    if test -f "${new_path}.exe"; then
46244      input_to_shortpath="${new_path}.exe"
46245    elif test -f "${new_path}.cmd"; then
46246      input_to_shortpath="${new_path}.cmd"
46247    else
46248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46249$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46250      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46251$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46252      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46253    fi
46254  else
46255    input_to_shortpath="$new_path"
46256  fi
46257
46258  # Call helper function which possibly converts this using DOS-style short mode.
46259  # If so, the updated path is stored in $new_path.
46260  new_path="$input_to_shortpath"
46261
46262  input_path="$input_to_shortpath"
46263  # Check if we need to convert this using DOS-style short mode. If the path
46264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46265  # take no chances and rewrite it.
46266  # Note: m4 eats our [], so we need to use [ and ] instead.
46267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46268  if test "x$has_forbidden_chars" != x; then
46269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46273      # Going to short mode and back again did indeed matter. Since short mode is
46274      # case insensitive, let's make it lowercase to improve readability.
46275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46276      # Now convert it back to Unix-style (cygpath)
46277      input_path=`$CYGPATH -u "$shortmode_path"`
46278      new_path="$input_path"
46279    fi
46280  fi
46281
46282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46283  if test "x$test_cygdrive_prefix" = x; then
46284    # As a simple fix, exclude /usr/bin since it's not a real path.
46285    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46287      # a path prefixed by /cygdrive for fixpath to work.
46288      new_path="$CYGWIN_ROOT_PATH$input_path"
46289    fi
46290  fi
46291
46292  # remove trailing .exe if any
46293  new_path="${new_path/%.exe/}"
46294
46295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46296
46297  # First separate the path from the arguments. This will split at the first
46298  # space.
46299  complete="$BUILD_OBJCOPY"
46300  path="${complete%% *}"
46301  tmp="$complete EOL"
46302  arguments="${tmp#* }"
46303
46304  # Input might be given as Windows format, start by converting to
46305  # unix format.
46306  new_path="$path"
46307
46308  windows_path="$new_path"
46309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46310    unix_path=`$CYGPATH -u "$windows_path"`
46311    new_path="$unix_path"
46312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46314    new_path="$unix_path"
46315  fi
46316
46317
46318  # Now try to locate executable using which
46319  new_path=`$WHICH "$new_path" 2> /dev/null`
46320
46321  if test "x$new_path" = x; then
46322    # Oops. Which didn't find the executable.
46323    # The splitting of arguments from the executable at a space might have been incorrect,
46324    # since paths with space are more likely in Windows. Give it another try with the whole
46325    # argument.
46326    path="$complete"
46327    arguments="EOL"
46328    new_path="$path"
46329
46330  windows_path="$new_path"
46331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46332    unix_path=`$CYGPATH -u "$windows_path"`
46333    new_path="$unix_path"
46334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46336    new_path="$unix_path"
46337  fi
46338
46339
46340    new_path=`$WHICH "$new_path" 2> /dev/null`
46341    # bat and cmd files are not always considered executable in MSYS causing which
46342    # to not find them
46343    if test "x$new_path" = x \
46344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46346      new_path="$path"
46347
46348  windows_path="$new_path"
46349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46350    unix_path=`$CYGPATH -u "$windows_path"`
46351    new_path="$unix_path"
46352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46354    new_path="$unix_path"
46355  fi
46356
46357    fi
46358
46359    if test "x$new_path" = x; then
46360      # It's still not found. Now this is an unrecoverable error.
46361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46362$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46363      has_space=`$ECHO "$complete" | $GREP " "`
46364      if test "x$has_space" != x; then
46365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46367      fi
46368      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46369    fi
46370  fi
46371
46372  # Now new_path has a complete unix path to the binary
46373  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46374    # Keep paths in /bin as-is, but remove trailing .exe if any
46375    new_path="${new_path/%.exe/}"
46376    # Do not save /bin paths to all_fixpath_prefixes!
46377  else
46378    # Not in mixed or Windows style, start by that.
46379    new_path=`cmd //c echo $new_path`
46380
46381  input_path="$new_path"
46382  # Check if we need to convert this using DOS-style short mode. If the path
46383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46384  # take no chances and rewrite it.
46385  # Note: m4 eats our [], so we need to use [ and ] instead.
46386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46387  if test "x$has_forbidden_chars" != x; then
46388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46390  fi
46391
46392    # Output is in $new_path
46393
46394  windows_path="$new_path"
46395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46396    unix_path=`$CYGPATH -u "$windows_path"`
46397    new_path="$unix_path"
46398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46400    new_path="$unix_path"
46401  fi
46402
46403    # remove trailing .exe if any
46404    new_path="${new_path/%.exe/}"
46405
46406    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46407    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46408  fi
46409
46410    else
46411      # We're on a unix platform. Hooray! :)
46412      # First separate the path from the arguments. This will split at the first
46413      # space.
46414      complete="$BUILD_OBJCOPY"
46415      path="${complete%% *}"
46416      tmp="$complete EOL"
46417      arguments="${tmp#* }"
46418
46419      # Cannot rely on the command "which" here since it doesn't always work.
46420      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46421      if test -z "$is_absolute_path"; then
46422        # Path to executable is not absolute. Find it.
46423        IFS_save="$IFS"
46424        IFS=:
46425        for p in $PATH; do
46426          if test -f "$p/$path" && test -x "$p/$path"; then
46427            new_path="$p/$path"
46428            break
46429          fi
46430        done
46431        IFS="$IFS_save"
46432      else
46433        # This is an absolute path, we can use it without further modifications.
46434        new_path="$path"
46435      fi
46436
46437      if test "x$new_path" = x; then
46438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46439$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46440        has_space=`$ECHO "$complete" | $GREP " "`
46441        if test "x$has_space" != x; then
46442          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46443$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46444        fi
46445        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46446      fi
46447    fi
46448
46449    # Now join together the path and the arguments once again
46450    if test "x$arguments" != xEOL; then
46451      new_complete="$new_path ${arguments% *}"
46452    else
46453      new_complete="$new_path"
46454    fi
46455
46456    if test "x$complete" != "x$new_complete"; then
46457      BUILD_OBJCOPY="$new_complete"
46458      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46459$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46460    fi
46461  fi
46462
46463
46464
46465  # Publish this variable in the help.
46466
46467
46468  if [ -z "${BUILD_STRIP+x}" ]; then
46469    # The variable is not set by user, try to locate tool using the code snippet
46470    for ac_prog in strip
46471do
46472  # Extract the first word of "$ac_prog", so it can be a program name with args.
46473set dummy $ac_prog; ac_word=$2
46474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46475$as_echo_n "checking for $ac_word... " >&6; }
46476if ${ac_cv_path_BUILD_STRIP+:} false; then :
46477  $as_echo_n "(cached) " >&6
46478else
46479  case $BUILD_STRIP in
46480  [\\/]* | ?:[\\/]*)
46481  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46482  ;;
46483  *)
46484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46485for as_dir in $PATH
46486do
46487  IFS=$as_save_IFS
46488  test -z "$as_dir" && as_dir=.
46489    for ac_exec_ext in '' $ac_executable_extensions; do
46490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46491    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46493    break 2
46494  fi
46495done
46496  done
46497IFS=$as_save_IFS
46498
46499  ;;
46500esac
46501fi
46502BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46503if test -n "$BUILD_STRIP"; then
46504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46505$as_echo "$BUILD_STRIP" >&6; }
46506else
46507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46508$as_echo "no" >&6; }
46509fi
46510
46511
46512  test -n "$BUILD_STRIP" && break
46513done
46514
46515  else
46516    # The variable is set, but is it from the command line or the environment?
46517
46518    # Try to remove the string !BUILD_STRIP! from our list.
46519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46521      # If it failed, the variable was not from the command line. Ignore it,
46522      # but warn the user (except for BASH, which is always set by the calling BASH).
46523      if test "xBUILD_STRIP" != xBASH; then
46524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46525$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46526      fi
46527      # Try to locate tool using the code snippet
46528      for ac_prog in strip
46529do
46530  # Extract the first word of "$ac_prog", so it can be a program name with args.
46531set dummy $ac_prog; ac_word=$2
46532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46533$as_echo_n "checking for $ac_word... " >&6; }
46534if ${ac_cv_path_BUILD_STRIP+:} false; then :
46535  $as_echo_n "(cached) " >&6
46536else
46537  case $BUILD_STRIP in
46538  [\\/]* | ?:[\\/]*)
46539  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46540  ;;
46541  *)
46542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46543for as_dir in $PATH
46544do
46545  IFS=$as_save_IFS
46546  test -z "$as_dir" && as_dir=.
46547    for ac_exec_ext in '' $ac_executable_extensions; do
46548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46549    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46551    break 2
46552  fi
46553done
46554  done
46555IFS=$as_save_IFS
46556
46557  ;;
46558esac
46559fi
46560BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46561if test -n "$BUILD_STRIP"; then
46562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46563$as_echo "$BUILD_STRIP" >&6; }
46564else
46565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46566$as_echo "no" >&6; }
46567fi
46568
46569
46570  test -n "$BUILD_STRIP" && break
46571done
46572
46573    else
46574      # If it succeeded, then it was overridden by the user. We will use it
46575      # for the tool.
46576
46577      # First remove it from the list of overridden variables, so we can test
46578      # for unknown variables in the end.
46579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46580
46581      # Check if we try to supply an empty value
46582      if test "x$BUILD_STRIP" = x; then
46583        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46584$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46586$as_echo_n "checking for BUILD_STRIP... " >&6; }
46587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46588$as_echo "disabled" >&6; }
46589      else
46590        # Check if the provided tool contains a complete path.
46591        tool_specified="$BUILD_STRIP"
46592        tool_basename="${tool_specified##*/}"
46593        if test "x$tool_basename" = "x$tool_specified"; then
46594          # A command without a complete path is provided, search $PATH.
46595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46596$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46597          # Extract the first word of "$tool_basename", so it can be a program name with args.
46598set dummy $tool_basename; ac_word=$2
46599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46600$as_echo_n "checking for $ac_word... " >&6; }
46601if ${ac_cv_path_BUILD_STRIP+:} false; then :
46602  $as_echo_n "(cached) " >&6
46603else
46604  case $BUILD_STRIP in
46605  [\\/]* | ?:[\\/]*)
46606  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46607  ;;
46608  *)
46609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46610for as_dir in $PATH
46611do
46612  IFS=$as_save_IFS
46613  test -z "$as_dir" && as_dir=.
46614    for ac_exec_ext in '' $ac_executable_extensions; do
46615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46616    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46618    break 2
46619  fi
46620done
46621  done
46622IFS=$as_save_IFS
46623
46624  ;;
46625esac
46626fi
46627BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46628if test -n "$BUILD_STRIP"; then
46629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46630$as_echo "$BUILD_STRIP" >&6; }
46631else
46632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46633$as_echo "no" >&6; }
46634fi
46635
46636
46637          if test "x$BUILD_STRIP" = x; then
46638            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46639          fi
46640        else
46641          # Otherwise we believe it is a complete path. Use it as it is.
46642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46643$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46644          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46645$as_echo_n "checking for BUILD_STRIP... " >&6; }
46646          if test ! -x "$tool_specified"; then
46647            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46648$as_echo "not found" >&6; }
46649            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46650          fi
46651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46652$as_echo "$tool_specified" >&6; }
46653        fi
46654      fi
46655    fi
46656
46657  fi
46658
46659
46660
46661  # Only process if variable expands to non-empty
46662
46663  if test "x$BUILD_STRIP" != x; then
46664    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46665
46666  # First separate the path from the arguments. This will split at the first
46667  # space.
46668  complete="$BUILD_STRIP"
46669  path="${complete%% *}"
46670  tmp="$complete EOL"
46671  arguments="${tmp#* }"
46672
46673  # Input might be given as Windows format, start by converting to
46674  # unix format.
46675  new_path=`$CYGPATH -u "$path"`
46676
46677  # Now try to locate executable using which
46678  new_path=`$WHICH "$new_path" 2> /dev/null`
46679  # bat and cmd files are not always considered executable in cygwin causing which
46680  # to not find them
46681  if test "x$new_path" = x \
46682      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46683      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46684    new_path=`$CYGPATH -u "$path"`
46685  fi
46686  if test "x$new_path" = x; then
46687    # Oops. Which didn't find the executable.
46688    # The splitting of arguments from the executable at a space might have been incorrect,
46689    # since paths with space are more likely in Windows. Give it another try with the whole
46690    # argument.
46691    path="$complete"
46692    arguments="EOL"
46693    new_path=`$CYGPATH -u "$path"`
46694    new_path=`$WHICH "$new_path" 2> /dev/null`
46695    # bat and cmd files are not always considered executable in cygwin causing which
46696    # to not find them
46697    if test "x$new_path" = x \
46698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46700      new_path=`$CYGPATH -u "$path"`
46701    fi
46702    if test "x$new_path" = x; then
46703      # It's still not found. Now this is an unrecoverable error.
46704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46705$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46706      has_space=`$ECHO "$complete" | $GREP " "`
46707      if test "x$has_space" != x; then
46708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46710      fi
46711      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46712    fi
46713  fi
46714
46715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46718  # "foo.exe" is OK but "foo" is an error.
46719  #
46720  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46721  # It is also a way to make sure we got the proper file name for the real test later on.
46722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46723  if test "x$test_shortpath" = x; then
46724    # Short path failed, file does not exist as specified.
46725    # Try adding .exe or .cmd
46726    if test -f "${new_path}.exe"; then
46727      input_to_shortpath="${new_path}.exe"
46728    elif test -f "${new_path}.cmd"; then
46729      input_to_shortpath="${new_path}.cmd"
46730    else
46731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46732$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46733      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46734$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46735      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46736    fi
46737  else
46738    input_to_shortpath="$new_path"
46739  fi
46740
46741  # Call helper function which possibly converts this using DOS-style short mode.
46742  # If so, the updated path is stored in $new_path.
46743  new_path="$input_to_shortpath"
46744
46745  input_path="$input_to_shortpath"
46746  # Check if we need to convert this using DOS-style short mode. If the path
46747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46748  # take no chances and rewrite it.
46749  # Note: m4 eats our [], so we need to use [ and ] instead.
46750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46751  if test "x$has_forbidden_chars" != x; then
46752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46756      # Going to short mode and back again did indeed matter. Since short mode is
46757      # case insensitive, let's make it lowercase to improve readability.
46758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46759      # Now convert it back to Unix-style (cygpath)
46760      input_path=`$CYGPATH -u "$shortmode_path"`
46761      new_path="$input_path"
46762    fi
46763  fi
46764
46765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46766  if test "x$test_cygdrive_prefix" = x; then
46767    # As a simple fix, exclude /usr/bin since it's not a real path.
46768    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46770      # a path prefixed by /cygdrive for fixpath to work.
46771      new_path="$CYGWIN_ROOT_PATH$input_path"
46772    fi
46773  fi
46774
46775  # remove trailing .exe if any
46776  new_path="${new_path/%.exe/}"
46777
46778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46779
46780  # First separate the path from the arguments. This will split at the first
46781  # space.
46782  complete="$BUILD_STRIP"
46783  path="${complete%% *}"
46784  tmp="$complete EOL"
46785  arguments="${tmp#* }"
46786
46787  # Input might be given as Windows format, start by converting to
46788  # unix format.
46789  new_path="$path"
46790
46791  windows_path="$new_path"
46792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46793    unix_path=`$CYGPATH -u "$windows_path"`
46794    new_path="$unix_path"
46795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46797    new_path="$unix_path"
46798  fi
46799
46800
46801  # Now try to locate executable using which
46802  new_path=`$WHICH "$new_path" 2> /dev/null`
46803
46804  if test "x$new_path" = x; then
46805    # Oops. Which didn't find the executable.
46806    # The splitting of arguments from the executable at a space might have been incorrect,
46807    # since paths with space are more likely in Windows. Give it another try with the whole
46808    # argument.
46809    path="$complete"
46810    arguments="EOL"
46811    new_path="$path"
46812
46813  windows_path="$new_path"
46814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46815    unix_path=`$CYGPATH -u "$windows_path"`
46816    new_path="$unix_path"
46817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46819    new_path="$unix_path"
46820  fi
46821
46822
46823    new_path=`$WHICH "$new_path" 2> /dev/null`
46824    # bat and cmd files are not always considered executable in MSYS causing which
46825    # to not find them
46826    if test "x$new_path" = x \
46827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46829      new_path="$path"
46830
46831  windows_path="$new_path"
46832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46833    unix_path=`$CYGPATH -u "$windows_path"`
46834    new_path="$unix_path"
46835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46837    new_path="$unix_path"
46838  fi
46839
46840    fi
46841
46842    if test "x$new_path" = x; then
46843      # It's still not found. Now this is an unrecoverable error.
46844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46845$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46846      has_space=`$ECHO "$complete" | $GREP " "`
46847      if test "x$has_space" != x; then
46848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46850      fi
46851      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46852    fi
46853  fi
46854
46855  # Now new_path has a complete unix path to the binary
46856  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46857    # Keep paths in /bin as-is, but remove trailing .exe if any
46858    new_path="${new_path/%.exe/}"
46859    # Do not save /bin paths to all_fixpath_prefixes!
46860  else
46861    # Not in mixed or Windows style, start by that.
46862    new_path=`cmd //c echo $new_path`
46863
46864  input_path="$new_path"
46865  # Check if we need to convert this using DOS-style short mode. If the path
46866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46867  # take no chances and rewrite it.
46868  # Note: m4 eats our [], so we need to use [ and ] instead.
46869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46870  if test "x$has_forbidden_chars" != x; then
46871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46873  fi
46874
46875    # Output is in $new_path
46876
46877  windows_path="$new_path"
46878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46879    unix_path=`$CYGPATH -u "$windows_path"`
46880    new_path="$unix_path"
46881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46883    new_path="$unix_path"
46884  fi
46885
46886    # remove trailing .exe if any
46887    new_path="${new_path/%.exe/}"
46888
46889    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46890    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46891  fi
46892
46893    else
46894      # We're on a unix platform. Hooray! :)
46895      # First separate the path from the arguments. This will split at the first
46896      # space.
46897      complete="$BUILD_STRIP"
46898      path="${complete%% *}"
46899      tmp="$complete EOL"
46900      arguments="${tmp#* }"
46901
46902      # Cannot rely on the command "which" here since it doesn't always work.
46903      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46904      if test -z "$is_absolute_path"; then
46905        # Path to executable is not absolute. Find it.
46906        IFS_save="$IFS"
46907        IFS=:
46908        for p in $PATH; do
46909          if test -f "$p/$path" && test -x "$p/$path"; then
46910            new_path="$p/$path"
46911            break
46912          fi
46913        done
46914        IFS="$IFS_save"
46915      else
46916        # This is an absolute path, we can use it without further modifications.
46917        new_path="$path"
46918      fi
46919
46920      if test "x$new_path" = x; then
46921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46922$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46923        has_space=`$ECHO "$complete" | $GREP " "`
46924        if test "x$has_space" != x; then
46925          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46926$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46927        fi
46928        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46929      fi
46930    fi
46931
46932    # Now join together the path and the arguments once again
46933    if test "x$arguments" != xEOL; then
46934      new_complete="$new_path ${arguments% *}"
46935    else
46936      new_complete="$new_path"
46937    fi
46938
46939    if test "x$complete" != "x$new_complete"; then
46940      BUILD_STRIP="$new_complete"
46941      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46942$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46943    fi
46944  fi
46945
46946    # Assume the C compiler is the assembler
46947    BUILD_AS="$BUILD_CC -c"
46948    # Just like for the target compiler, use the compiler as linker
46949    BUILD_LD="$BUILD_CC"
46950    BUILD_LDCXX="$BUILD_CXX"
46951
46952    PATH="$OLDPATH"
46953
46954
46955  COMPILER=$BUILD_CC
46956  COMPILER_NAME=BuildC
46957
46958  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46959    # cc -V output typically looks like
46960    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46961    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46962    # Check that this is likely to be the Solaris Studio cc.
46963    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46964    if test $? -ne 0; then
46965      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46966      { $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
46967$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46968      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46969$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46970      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46971$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46972      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46973    fi
46974    # Remove usage instructions (if present), and
46975    # collapse compiler output into a single line
46976    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46977        $SED -e 's/ *[Uu]sage:.*//'`
46978    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46979        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46980  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46981    # xlc -qversion output typically looks like
46982    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46983    #     Version: 11.01.0000.0015
46984    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46985    # Check that this is likely to be the IBM XL C compiler.
46986    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46987    if test $? -ne 0; then
46988      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46989      { $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
46990$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46991      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46992$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46993      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46994$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46995      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46996    fi
46997    # Collapse compiler output into a single line
46998    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46999    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47000        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47001  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47002    # There is no specific version flag, but all output starts with a version string.
47003    # First line typically looks something like:
47004    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47005    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47006    # Check that this is likely to be Microsoft CL.EXE.
47007    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47008    if test $? -ne 0; then
47009      { $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
47010$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47011      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47012$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47013      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47014    fi
47015    # Collapse compiler output into a single line
47016    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47017    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47018        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47019  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47020    # gcc --version output typically looks like
47021    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47022    #     Copyright (C) 2013 Free Software Foundation, Inc.
47023    #     This is free software; see the source for copying conditions.  There is NO
47024    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47025    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47026    # Check that this is likely to be GCC.
47027    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47028    if test $? -ne 0; then
47029      { $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
47030$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47031      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47032$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47033      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47034    fi
47035    # Remove Copyright and legalese from version string, and
47036    # collapse into a single line
47037    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47038        $SED -e 's/ *Copyright .*//'`
47039    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47040        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47041  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47042    # clang --version output typically looks like
47043    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47044    #    clang version 3.3 (tags/RELEASE_33/final)
47045    # or
47046    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47047    #    Target: x86_64-pc-linux-gnu
47048    #    Thread model: posix
47049    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47050    # Check that this is likely to be clang
47051    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47052    if test $? -ne 0; then
47053      { $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
47054$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47055      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47056$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47057      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47058    fi
47059    # Collapse compiler output into a single line
47060    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47061    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47062        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47063  else
47064      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47065  fi
47066  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47067  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47068  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47069  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47070
47071  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47072$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47073
47074
47075  COMPILER=$BUILD_CXX
47076  COMPILER_NAME=BuildC++
47077
47078  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47079    # cc -V output typically looks like
47080    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47081    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47082    # Check that this is likely to be the Solaris Studio cc.
47083    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47084    if test $? -ne 0; then
47085      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47086      { $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
47087$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47088      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47089$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47090      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47091$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47092      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47093    fi
47094    # Remove usage instructions (if present), and
47095    # collapse compiler output into a single line
47096    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47097        $SED -e 's/ *[Uu]sage:.*//'`
47098    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47099        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47100  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47101    # xlc -qversion output typically looks like
47102    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47103    #     Version: 11.01.0000.0015
47104    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47105    # Check that this is likely to be the IBM XL C compiler.
47106    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47107    if test $? -ne 0; then
47108      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47109      { $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
47110$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47111      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47112$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47113      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47114$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47115      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47116    fi
47117    # Collapse compiler output into a single line
47118    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47119    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47120        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47121  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47122    # There is no specific version flag, but all output starts with a version string.
47123    # First line typically looks something like:
47124    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47125    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47126    # Check that this is likely to be Microsoft CL.EXE.
47127    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47128    if test $? -ne 0; then
47129      { $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
47130$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47131      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47132$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47133      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47134    fi
47135    # Collapse compiler output into a single line
47136    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47137    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47138        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47139  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47140    # gcc --version output typically looks like
47141    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47142    #     Copyright (C) 2013 Free Software Foundation, Inc.
47143    #     This is free software; see the source for copying conditions.  There is NO
47144    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47145    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47146    # Check that this is likely to be GCC.
47147    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47148    if test $? -ne 0; then
47149      { $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
47150$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47151      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47152$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47153      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47154    fi
47155    # Remove Copyright and legalese from version string, and
47156    # collapse into a single line
47157    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47158        $SED -e 's/ *Copyright .*//'`
47159    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47160        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47161  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47162    # clang --version output typically looks like
47163    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47164    #    clang version 3.3 (tags/RELEASE_33/final)
47165    # or
47166    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47167    #    Target: x86_64-pc-linux-gnu
47168    #    Thread model: posix
47169    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47170    # Check that this is likely to be clang
47171    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47172    if test $? -ne 0; then
47173      { $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
47174$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47175      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47176$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47177      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47178    fi
47179    # Collapse compiler output into a single line
47180    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47181    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47182        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47183  else
47184      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47185  fi
47186  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47187  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47188  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47189  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47190
47191  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47192$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47193
47194
47195  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47197$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47198    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47199$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47200  fi
47201
47202  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47203  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47204    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47205$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47206  fi
47207
47208  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47209    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47210$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47211  fi
47212
47213  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47214
47215  else
47216    # If we are not cross compiling, use the normal target compilers for
47217    # building the build platform executables.
47218    BUILD_CC="$CC"
47219    BUILD_CXX="$CXX"
47220    BUILD_LD="$LD"
47221    BUILD_LDCXX="$LDCXX"
47222    BUILD_NM="$NM"
47223    BUILD_AS="$AS"
47224    BUILD_OBJCOPY="$OBJCOPY"
47225    BUILD_STRIP="$STRIP"
47226    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47227    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47228    BUILD_AR="$AR"
47229
47230
47231  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47232    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47233$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47234    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47235$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47236  fi
47237
47238  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47239  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47240    { $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
47241$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;}
47242  fi
47243
47244  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47245    { $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
47246$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47247  fi
47248
47249  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47250
47251  fi
47252
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47265    # For hotspot, we need these in Windows mixed path,
47266    # so rewrite them all. Need added .exe suffix.
47267    HOTSPOT_CXX="$CXX.exe"
47268    HOTSPOT_LD="$LD.exe"
47269    HOTSPOT_MT="$MT.exe"
47270    HOTSPOT_RC="$RC.exe"
47271
47272  unix_path="$HOTSPOT_CXX"
47273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47274    windows_path=`$CYGPATH -m "$unix_path"`
47275    HOTSPOT_CXX="$windows_path"
47276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47277    windows_path=`cmd //c echo $unix_path`
47278    HOTSPOT_CXX="$windows_path"
47279  fi
47280
47281
47282  unix_path="$HOTSPOT_LD"
47283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47284    windows_path=`$CYGPATH -m "$unix_path"`
47285    HOTSPOT_LD="$windows_path"
47286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47287    windows_path=`cmd //c echo $unix_path`
47288    HOTSPOT_LD="$windows_path"
47289  fi
47290
47291
47292  unix_path="$HOTSPOT_MT"
47293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47294    windows_path=`$CYGPATH -m "$unix_path"`
47295    HOTSPOT_MT="$windows_path"
47296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47297    windows_path=`cmd //c echo $unix_path`
47298    HOTSPOT_MT="$windows_path"
47299  fi
47300
47301
47302  unix_path="$HOTSPOT_RC"
47303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47304    windows_path=`$CYGPATH -m "$unix_path"`
47305    HOTSPOT_RC="$windows_path"
47306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47307    windows_path=`cmd //c echo $unix_path`
47308    HOTSPOT_RC="$windows_path"
47309  fi
47310
47311
47312
47313  else
47314    HOTSPOT_CXX="$CXX"
47315    HOTSPOT_LD="$LD"
47316  fi
47317
47318
47319
47320  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47321    USE_CLANG=true
47322  fi
47323
47324
47325
47326
47327
47328  # The package path is used only on macosx?
47329  # FIXME: clean this up, and/or move it elsewhere.
47330  PACKAGE_PATH=/opt/local
47331
47332
47333  # Check for extra potential brokenness.
47334  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47335    # On Windows, double-check that we got the right compiler.
47336    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47337    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47338    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47339      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47340        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
47341      fi
47342    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47343      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47344        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47345      fi
47346    fi
47347  fi
47348
47349  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47350    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47351    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47352    # This is later checked when setting flags.
47353
47354    # "-Og" suppported for GCC 4.8 and later
47355    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403    # Execute function body
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452    # Execute function body
47453
47454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47455$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47456  supports=yes
47457
47458  saved_cflags="$CFLAGS"
47459  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47460  ac_ext=c
47461ac_cpp='$CPP $CPPFLAGS'
47462ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47463ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47464ac_compiler_gnu=$ac_cv_c_compiler_gnu
47465
47466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47467/* end confdefs.h.  */
47468int i;
47469_ACEOF
47470if ac_fn_c_try_compile "$LINENO"; then :
47471
47472else
47473  supports=no
47474fi
47475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47476  ac_ext=cpp
47477ac_cpp='$CXXCPP $CPPFLAGS'
47478ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47479ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47480ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47481
47482  CFLAGS="$saved_cflags"
47483
47484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47485$as_echo "$supports" >&6; }
47486  if test "x$supports" = "xyes" ; then
47487    :
47488    C_COMP_SUPPORTS="yes"
47489  else
47490    :
47491    C_COMP_SUPPORTS="no"
47492  fi
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552    # Execute function body
47553
47554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47555$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47556  supports=yes
47557
47558  saved_cxxflags="$CXXFLAGS"
47559  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47560  ac_ext=cpp
47561ac_cpp='$CXXCPP $CPPFLAGS'
47562ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47563ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47564ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47565
47566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47567/* end confdefs.h.  */
47568int i;
47569_ACEOF
47570if ac_fn_cxx_try_compile "$LINENO"; then :
47571
47572else
47573  supports=no
47574fi
47575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47576  ac_ext=cpp
47577ac_cpp='$CXXCPP $CPPFLAGS'
47578ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47579ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47580ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47581
47582  CXXFLAGS="$saved_cxxflags"
47583
47584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47585$as_echo "$supports" >&6; }
47586  if test "x$supports" = "xyes" ; then
47587    :
47588    CXX_COMP_SUPPORTS="yes"
47589  else
47590    :
47591    CXX_COMP_SUPPORTS="no"
47592  fi
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47607$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47608  supports=no
47609  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47610
47611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47612$as_echo "$supports" >&6; }
47613  if test "x$supports" = "xyes" ; then
47614    :
47615    HAS_CFLAG_OPTIMIZE_DEBUG=true
47616  else
47617    :
47618    HAS_CFLAG_OPTIMIZE_DEBUG=false
47619  fi
47620
47621
47622
47623
47624
47625
47626
47627    # "-z relro" supported in GNU binutils 2.17 and later
47628    LINKER_RELRO_FLAG="-Wl,-z,relro"
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676    # Execute function body
47677
47678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47679$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47680  supports=yes
47681
47682  saved_ldflags="$LDFLAGS"
47683  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47684  ac_ext=c
47685ac_cpp='$CPP $CPPFLAGS'
47686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47688ac_compiler_gnu=$ac_cv_c_compiler_gnu
47689
47690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47691/* end confdefs.h.  */
47692
47693int
47694main ()
47695{
47696
47697  ;
47698  return 0;
47699}
47700_ACEOF
47701if ac_fn_c_try_link "$LINENO"; then :
47702
47703else
47704  supports=no
47705fi
47706rm -f core conftest.err conftest.$ac_objext \
47707    conftest$ac_exeext conftest.$ac_ext
47708  ac_ext=cpp
47709ac_cpp='$CXXCPP $CPPFLAGS'
47710ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47711ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47712ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47713
47714  LDFLAGS="$saved_ldflags"
47715
47716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47717$as_echo "$supports" >&6; }
47718  if test "x$supports" = "xyes" ; then
47719    :
47720    HAS_LINKER_RELRO=true
47721  else
47722    :
47723    HAS_LINKER_RELRO=false
47724  fi
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738    # "-z now" supported in GNU binutils 2.11 and later
47739    LINKER_NOW_FLAG="-Wl,-z,now"
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787    # Execute function body
47788
47789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47790$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47791  supports=yes
47792
47793  saved_ldflags="$LDFLAGS"
47794  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47795  ac_ext=c
47796ac_cpp='$CPP $CPPFLAGS'
47797ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47798ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47799ac_compiler_gnu=$ac_cv_c_compiler_gnu
47800
47801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47802/* end confdefs.h.  */
47803
47804int
47805main ()
47806{
47807
47808  ;
47809  return 0;
47810}
47811_ACEOF
47812if ac_fn_c_try_link "$LINENO"; then :
47813
47814else
47815  supports=no
47816fi
47817rm -f core conftest.err conftest.$ac_objext \
47818    conftest$ac_exeext conftest.$ac_ext
47819  ac_ext=cpp
47820ac_cpp='$CXXCPP $CPPFLAGS'
47821ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47822ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47823ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47824
47825  LDFLAGS="$saved_ldflags"
47826
47827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47828$as_echo "$supports" >&6; }
47829  if test "x$supports" = "xyes" ; then
47830    :
47831    HAS_LINKER_NOW=true
47832  else
47833    :
47834    HAS_LINKER_NOW=false
47835  fi
47836
47837
47838
47839
47840
47841
47842
47843
47844
47845
47846
47847
47848  fi
47849
47850  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47851  # in executable.'
47852  USING_BROKEN_SUSE_LD=no
47853  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47855$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47856    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47857    $ECHO "int main() { }" > main.c
47858    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47860$as_echo "no" >&6; }
47861      USING_BROKEN_SUSE_LD=no
47862    else
47863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47864$as_echo "yes" >&6; }
47865      USING_BROKEN_SUSE_LD=yes
47866    fi
47867    $RM version-script.map main.c a.out
47868  fi
47869
47870
47871  # Setup hotspot lecagy names for toolchains
47872  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47873  if test "x$TOOLCHAIN_TYPE" = xclang; then
47874    HOTSPOT_TOOLCHAIN_TYPE=gcc
47875  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47876    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47877  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47878    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47879  fi
47880
47881
47882
47883# Setup the JTReg Regression Test Harness.
47884
47885
47886# Check whether --with-jtreg was given.
47887if test "${with_jtreg+set}" = set; then :
47888  withval=$with_jtreg;
47889else
47890  with_jtreg=no
47891fi
47892
47893
47894  if test "x$with_jtreg" = xno; then
47895    # jtreg disabled
47896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47897$as_echo_n "checking for jtreg... " >&6; }
47898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47899$as_echo "no" >&6; }
47900  else
47901    if test "x$with_jtreg" != xyes; then
47902      # with path specified.
47903      JT_HOME="$with_jtreg"
47904    fi
47905
47906    if test "x$JT_HOME" != x; then
47907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47908$as_echo_n "checking for jtreg... " >&6; }
47909
47910      # use JT_HOME enviroment var.
47911
47912  # Only process if variable expands to non-empty
47913
47914  if test "x$JT_HOME" != x; then
47915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47916
47917  # Input might be given as Windows format, start by converting to
47918  # unix format.
47919  path="$JT_HOME"
47920  new_path=`$CYGPATH -u "$path"`
47921
47922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47925  # "foo.exe" is OK but "foo" is an error.
47926  #
47927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47928  # It is also a way to make sure we got the proper file name for the real test later on.
47929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47930  if test "x$test_shortpath" = x; then
47931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47932$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47933    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47934  fi
47935
47936  # Call helper function which possibly converts this using DOS-style short mode.
47937  # If so, the updated path is stored in $new_path.
47938
47939  input_path="$new_path"
47940  # Check if we need to convert this using DOS-style short mode. If the path
47941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47942  # take no chances and rewrite it.
47943  # Note: m4 eats our [], so we need to use [ and ] instead.
47944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47945  if test "x$has_forbidden_chars" != x; then
47946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47950      # Going to short mode and back again did indeed matter. Since short mode is
47951      # case insensitive, let's make it lowercase to improve readability.
47952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47953      # Now convert it back to Unix-style (cygpath)
47954      input_path=`$CYGPATH -u "$shortmode_path"`
47955      new_path="$input_path"
47956    fi
47957  fi
47958
47959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47960  if test "x$test_cygdrive_prefix" = x; then
47961    # As a simple fix, exclude /usr/bin since it's not a real path.
47962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47964      # a path prefixed by /cygdrive for fixpath to work.
47965      new_path="$CYGWIN_ROOT_PATH$input_path"
47966    fi
47967  fi
47968
47969
47970  if test "x$path" != "x$new_path"; then
47971    JT_HOME="$new_path"
47972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47973$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47974  fi
47975
47976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47977
47978  path="$JT_HOME"
47979  has_colon=`$ECHO $path | $GREP ^.:`
47980  new_path="$path"
47981  if test "x$has_colon" = x; then
47982    # Not in mixed or Windows style, start by that.
47983    new_path=`cmd //c echo $path`
47984  fi
47985
47986
47987  input_path="$new_path"
47988  # Check if we need to convert this using DOS-style short mode. If the path
47989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47990  # take no chances and rewrite it.
47991  # Note: m4 eats our [], so we need to use [ and ] instead.
47992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47993  if test "x$has_forbidden_chars" != x; then
47994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47996  fi
47997
47998
47999  windows_path="$new_path"
48000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48001    unix_path=`$CYGPATH -u "$windows_path"`
48002    new_path="$unix_path"
48003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48005    new_path="$unix_path"
48006  fi
48007
48008  if test "x$path" != "x$new_path"; then
48009    JT_HOME="$new_path"
48010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48011$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48012  fi
48013
48014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48016
48017    else
48018      # We're on a unix platform. Hooray! :)
48019      path="$JT_HOME"
48020      has_space=`$ECHO "$path" | $GREP " "`
48021      if test "x$has_space" != x; then
48022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48023$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48025      fi
48026
48027      # Use eval to expand a potential ~
48028      eval path="$path"
48029      if test ! -f "$path" && test ! -d "$path"; then
48030        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48031      fi
48032
48033      if test -d "$path"; then
48034        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48035      else
48036        dir="`$DIRNAME "$path"`"
48037        base="`$BASENAME "$path"`"
48038        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48039      fi
48040    fi
48041  fi
48042
48043
48044      # jtreg win32 script works for everybody
48045      JTREGEXE="$JT_HOME/bin/jtreg"
48046
48047      if test ! -f "$JTREGEXE"; then
48048        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48049      fi
48050
48051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48052$as_echo "$JTREGEXE" >&6; }
48053    else
48054      # try to find jtreg on path
48055
48056
48057
48058  # Publish this variable in the help.
48059
48060
48061  if [ -z "${JTREGEXE+x}" ]; then
48062    # The variable is not set by user, try to locate tool using the code snippet
48063    for ac_prog in jtreg
48064do
48065  # Extract the first word of "$ac_prog", so it can be a program name with args.
48066set dummy $ac_prog; ac_word=$2
48067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48068$as_echo_n "checking for $ac_word... " >&6; }
48069if ${ac_cv_path_JTREGEXE+:} false; then :
48070  $as_echo_n "(cached) " >&6
48071else
48072  case $JTREGEXE in
48073  [\\/]* | ?:[\\/]*)
48074  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48075  ;;
48076  *)
48077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48078for as_dir in $PATH
48079do
48080  IFS=$as_save_IFS
48081  test -z "$as_dir" && as_dir=.
48082    for ac_exec_ext in '' $ac_executable_extensions; do
48083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48084    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48086    break 2
48087  fi
48088done
48089  done
48090IFS=$as_save_IFS
48091
48092  ;;
48093esac
48094fi
48095JTREGEXE=$ac_cv_path_JTREGEXE
48096if test -n "$JTREGEXE"; then
48097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48098$as_echo "$JTREGEXE" >&6; }
48099else
48100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48101$as_echo "no" >&6; }
48102fi
48103
48104
48105  test -n "$JTREGEXE" && break
48106done
48107
48108  else
48109    # The variable is set, but is it from the command line or the environment?
48110
48111    # Try to remove the string !JTREGEXE! from our list.
48112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48114      # If it failed, the variable was not from the command line. Ignore it,
48115      # but warn the user (except for BASH, which is always set by the calling BASH).
48116      if test "xJTREGEXE" != xBASH; then
48117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48118$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48119      fi
48120      # Try to locate tool using the code snippet
48121      for ac_prog in jtreg
48122do
48123  # Extract the first word of "$ac_prog", so it can be a program name with args.
48124set dummy $ac_prog; ac_word=$2
48125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48126$as_echo_n "checking for $ac_word... " >&6; }
48127if ${ac_cv_path_JTREGEXE+:} false; then :
48128  $as_echo_n "(cached) " >&6
48129else
48130  case $JTREGEXE in
48131  [\\/]* | ?:[\\/]*)
48132  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48133  ;;
48134  *)
48135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48136for as_dir in $PATH
48137do
48138  IFS=$as_save_IFS
48139  test -z "$as_dir" && as_dir=.
48140    for ac_exec_ext in '' $ac_executable_extensions; do
48141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48142    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48144    break 2
48145  fi
48146done
48147  done
48148IFS=$as_save_IFS
48149
48150  ;;
48151esac
48152fi
48153JTREGEXE=$ac_cv_path_JTREGEXE
48154if test -n "$JTREGEXE"; then
48155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48156$as_echo "$JTREGEXE" >&6; }
48157else
48158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48159$as_echo "no" >&6; }
48160fi
48161
48162
48163  test -n "$JTREGEXE" && break
48164done
48165
48166    else
48167      # If it succeeded, then it was overridden by the user. We will use it
48168      # for the tool.
48169
48170      # First remove it from the list of overridden variables, so we can test
48171      # for unknown variables in the end.
48172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48173
48174      # Check if we try to supply an empty value
48175      if test "x$JTREGEXE" = x; then
48176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48177$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48179$as_echo_n "checking for JTREGEXE... " >&6; }
48180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48181$as_echo "disabled" >&6; }
48182      else
48183        # Check if the provided tool contains a complete path.
48184        tool_specified="$JTREGEXE"
48185        tool_basename="${tool_specified##*/}"
48186        if test "x$tool_basename" = "x$tool_specified"; then
48187          # A command without a complete path is provided, search $PATH.
48188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48189$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48190          # Extract the first word of "$tool_basename", so it can be a program name with args.
48191set dummy $tool_basename; ac_word=$2
48192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48193$as_echo_n "checking for $ac_word... " >&6; }
48194if ${ac_cv_path_JTREGEXE+:} false; then :
48195  $as_echo_n "(cached) " >&6
48196else
48197  case $JTREGEXE in
48198  [\\/]* | ?:[\\/]*)
48199  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48200  ;;
48201  *)
48202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48203for as_dir in $PATH
48204do
48205  IFS=$as_save_IFS
48206  test -z "$as_dir" && as_dir=.
48207    for ac_exec_ext in '' $ac_executable_extensions; do
48208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48209    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48211    break 2
48212  fi
48213done
48214  done
48215IFS=$as_save_IFS
48216
48217  ;;
48218esac
48219fi
48220JTREGEXE=$ac_cv_path_JTREGEXE
48221if test -n "$JTREGEXE"; then
48222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48223$as_echo "$JTREGEXE" >&6; }
48224else
48225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48226$as_echo "no" >&6; }
48227fi
48228
48229
48230          if test "x$JTREGEXE" = x; then
48231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48232          fi
48233        else
48234          # Otherwise we believe it is a complete path. Use it as it is.
48235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48236$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48238$as_echo_n "checking for JTREGEXE... " >&6; }
48239          if test ! -x "$tool_specified"; then
48240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48241$as_echo "not found" >&6; }
48242            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48243          fi
48244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48245$as_echo "$tool_specified" >&6; }
48246        fi
48247      fi
48248    fi
48249
48250  fi
48251
48252
48253
48254  if test "x$JTREGEXE" = x; then
48255    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48256  fi
48257
48258
48259      JT_HOME="`$DIRNAME $JTREGEXE`"
48260    fi
48261  fi
48262
48263
48264
48265
48266
48267
48268  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48269  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48270  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48271  #                              commands produced by the link step (currently AIX only)
48272  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48273    COMPILER_TARGET_BITS_FLAG="-q"
48274    COMPILER_COMMAND_FILE_FLAG="-f"
48275    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48276  else
48277    COMPILER_TARGET_BITS_FLAG="-m"
48278    COMPILER_COMMAND_FILE_FLAG="@"
48279    COMPILER_BINDCMD_FILE_FLAG=""
48280
48281    # The solstudio linker does not support @-files.
48282    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48283      COMPILER_COMMAND_FILE_FLAG=
48284    fi
48285
48286    # Check if @file is supported by gcc
48287    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48288      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48289$as_echo_n "checking if @file is supported by gcc... " >&6; }
48290      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48291      $ECHO "" "--version" > command.file
48292      if $CXX @command.file 2>&5 >&5; then
48293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48294$as_echo "yes" >&6; }
48295        COMPILER_COMMAND_FILE_FLAG="@"
48296      else
48297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48298$as_echo "no" >&6; }
48299        COMPILER_COMMAND_FILE_FLAG=
48300      fi
48301      $RM command.file
48302    fi
48303  fi
48304
48305
48306
48307
48308  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48309  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48310    ARFLAGS="-r"
48311  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48312    ARFLAGS="-X64"
48313  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48314    # lib.exe is used as AR to create static libraries.
48315    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48316  else
48317    ARFLAGS=""
48318  fi
48319
48320
48321  ## Setup strip.
48322  # FIXME: should this really be per platform, or should it be per toolchain type?
48323  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48324  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48325  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48326    STRIPFLAGS="-g"
48327  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48328    STRIPFLAGS="-x"
48329  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48330    STRIPFLAGS="-S"
48331  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48332    STRIPFLAGS="-X32_64"
48333  fi
48334
48335
48336
48337  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48338    CC_OUT_OPTION=-Fo
48339    EXE_OUT_OPTION=-out:
48340    LD_OUT_OPTION=-out:
48341    AR_OUT_OPTION=-out:
48342  else
48343    # The option used to specify the target .o,.a or .so file.
48344    # When compiling, how to specify the to be created object file.
48345    CC_OUT_OPTION='-o$(SPACE)'
48346    # When linking, how to specify the to be created executable.
48347    EXE_OUT_OPTION='-o$(SPACE)'
48348    # When linking, how to specify the to be created dynamically linkable library.
48349    LD_OUT_OPTION='-o$(SPACE)'
48350    # When archiving, how to specify the to be create static archive for object files.
48351    AR_OUT_OPTION='rcs$(SPACE)'
48352  fi
48353
48354
48355
48356
48357
48358  # On Windows, we need to set RC flags.
48359  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48360    RC_FLAGS="-nologo -l0x409"
48361    JVM_RCFLAGS="-nologo"
48362    if test "x$DEBUG_LEVEL" = xrelease; then
48363      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48364      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48365    fi
48366
48367    # The version variables used to create RC_FLAGS may be overridden
48368    # in a custom configure script, or possibly the command line.
48369    # Let those variables be expanded at make time in spec.gmk.
48370    # The \$ are escaped to the shell, and the $(...) variables
48371    # are evaluated by make.
48372    RC_FLAGS="$RC_FLAGS \
48373        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48374        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48375        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48376        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48377        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48378        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48379        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48380
48381    JVM_RCFLAGS="$JVM_RCFLAGS \
48382        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48383        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48384        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48385        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48386        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48387        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48388        -D\"HS_FNAME=jvm.dll\" \
48389        -D\"HS_INTERNAL_NAME=jvm\""
48390  fi
48391
48392
48393
48394  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48395    # silence copyright notice and other headers.
48396    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48397  fi
48398
48399
48400# Now we can test some aspects on the target using configure macros.
48401
48402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48403$as_echo_n "checking for ANSI C header files... " >&6; }
48404if ${ac_cv_header_stdc+:} false; then :
48405  $as_echo_n "(cached) " >&6
48406else
48407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48408/* end confdefs.h.  */
48409#include <stdlib.h>
48410#include <stdarg.h>
48411#include <string.h>
48412#include <float.h>
48413
48414int
48415main ()
48416{
48417
48418  ;
48419  return 0;
48420}
48421_ACEOF
48422if ac_fn_cxx_try_compile "$LINENO"; then :
48423  ac_cv_header_stdc=yes
48424else
48425  ac_cv_header_stdc=no
48426fi
48427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48428
48429if test $ac_cv_header_stdc = yes; then
48430  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48432/* end confdefs.h.  */
48433#include <string.h>
48434
48435_ACEOF
48436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48437  $EGREP "memchr" >/dev/null 2>&1; then :
48438
48439else
48440  ac_cv_header_stdc=no
48441fi
48442rm -f conftest*
48443
48444fi
48445
48446if test $ac_cv_header_stdc = yes; then
48447  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48449/* end confdefs.h.  */
48450#include <stdlib.h>
48451
48452_ACEOF
48453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48454  $EGREP "free" >/dev/null 2>&1; then :
48455
48456else
48457  ac_cv_header_stdc=no
48458fi
48459rm -f conftest*
48460
48461fi
48462
48463if test $ac_cv_header_stdc = yes; then
48464  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48465  if test "$cross_compiling" = yes; then :
48466  :
48467else
48468  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48469/* end confdefs.h.  */
48470#include <ctype.h>
48471#include <stdlib.h>
48472#if ((' ' & 0x0FF) == 0x020)
48473# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48474# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48475#else
48476# define ISLOWER(c) \
48477		   (('a' <= (c) && (c) <= 'i') \
48478		     || ('j' <= (c) && (c) <= 'r') \
48479		     || ('s' <= (c) && (c) <= 'z'))
48480# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48481#endif
48482
48483#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48484int
48485main ()
48486{
48487  int i;
48488  for (i = 0; i < 256; i++)
48489    if (XOR (islower (i), ISLOWER (i))
48490	|| toupper (i) != TOUPPER (i))
48491      return 2;
48492  return 0;
48493}
48494_ACEOF
48495if ac_fn_cxx_try_run "$LINENO"; then :
48496
48497else
48498  ac_cv_header_stdc=no
48499fi
48500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48501  conftest.$ac_objext conftest.beam conftest.$ac_ext
48502fi
48503
48504fi
48505fi
48506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48507$as_echo "$ac_cv_header_stdc" >&6; }
48508if test $ac_cv_header_stdc = yes; then
48509
48510$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48511
48512fi
48513
48514# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48515for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48516		  inttypes.h stdint.h unistd.h
48517do :
48518  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48519ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48520"
48521if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48522  cat >>confdefs.h <<_ACEOF
48523#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48524_ACEOF
48525
48526fi
48527
48528done
48529
48530
48531
48532  ###############################################################################
48533  #
48534  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48535  # (The JVM can use 32 or 64 bit Java pointers but that decision
48536  # is made at runtime.)
48537  #
48538
48539  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48540    # Always specify -m flag on Solaris
48541    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48542
48543  # When we add flags to the "official" CFLAGS etc, we need to
48544  # keep track of these additions in ADDED_CFLAGS etc. These
48545  # will later be checked to make sure only controlled additions
48546  # have been made to CFLAGS etc.
48547  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48548  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48549  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48550
48551  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48552  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48553  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48554
48555  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48556  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48557  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48558
48559  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48560  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48561  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48562
48563  elif test "x$COMPILE_TYPE" = xreduced; then
48564    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48565      # Specify -m if running reduced on unix platforms
48566
48567  # When we add flags to the "official" CFLAGS etc, we need to
48568  # keep track of these additions in ADDED_CFLAGS etc. These
48569  # will later be checked to make sure only controlled additions
48570  # have been made to CFLAGS etc.
48571  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48572  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48573  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48574
48575  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48576  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48577  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48578
48579  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48580  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48581  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48582
48583  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48584  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48585  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48586
48587    fi
48588  fi
48589  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48590    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48591    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48592    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48593  fi
48594
48595  # Make compilation sanity check
48596  for ac_header in stdio.h
48597do :
48598  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48599if test "x$ac_cv_header_stdio_h" = xyes; then :
48600  cat >>confdefs.h <<_ACEOF
48601#define HAVE_STDIO_H 1
48602_ACEOF
48603
48604else
48605
48606    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48607$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48608    if test "x$COMPILE_TYPE" = xreduced; then
48609
48610  # Print a helpful message on how to acquire the necessary build dependency.
48611  # reduced is the help tag: freetype, cups, alsa etc
48612  MISSING_DEPENDENCY=reduced
48613
48614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48615    cygwin_help $MISSING_DEPENDENCY
48616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48617    msys_help $MISSING_DEPENDENCY
48618  else
48619    PKGHANDLER_COMMAND=
48620
48621    case $PKGHANDLER in
48622      apt-get)
48623        apt_help     $MISSING_DEPENDENCY ;;
48624      yum)
48625        yum_help     $MISSING_DEPENDENCY ;;
48626      port)
48627        port_help    $MISSING_DEPENDENCY ;;
48628      pkgutil)
48629        pkgutil_help $MISSING_DEPENDENCY ;;
48630      pkgadd)
48631        pkgadd_help  $MISSING_DEPENDENCY ;;
48632    esac
48633
48634    if test "x$PKGHANDLER_COMMAND" != x; then
48635      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48636    fi
48637  fi
48638
48639      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48640$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48641    elif test "x$COMPILE_TYPE" = xcross; then
48642      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48643$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48644    fi
48645    as_fn_error $? "Cannot continue." "$LINENO" 5
48646
48647fi
48648
48649done
48650
48651
48652  # The cast to long int works around a bug in the HP C Compiler
48653# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48654# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48655# This bug is HP SR number 8606223364.
48656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48657$as_echo_n "checking size of int *... " >&6; }
48658if ${ac_cv_sizeof_int_p+:} false; then :
48659  $as_echo_n "(cached) " >&6
48660else
48661  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48662
48663else
48664  if test "$ac_cv_type_int_p" = yes; then
48665     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48667as_fn_error 77 "cannot compute sizeof (int *)
48668See \`config.log' for more details" "$LINENO" 5; }
48669   else
48670     ac_cv_sizeof_int_p=0
48671   fi
48672fi
48673
48674fi
48675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48676$as_echo "$ac_cv_sizeof_int_p" >&6; }
48677
48678
48679
48680cat >>confdefs.h <<_ACEOF
48681#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48682_ACEOF
48683
48684
48685
48686  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48687  if test "x$ac_cv_sizeof_int_p" = x; then
48688    # The test failed, lets stick to the assumed value.
48689    { $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
48690$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48691  else
48692    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48693
48694    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48695      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48696      # Let's try to implicitely set the compilers target architecture and retry the test
48697      { $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
48698$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;}
48699      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48700$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48701
48702  # When we add flags to the "official" CFLAGS etc, we need to
48703  # keep track of these additions in ADDED_CFLAGS etc. These
48704  # will later be checked to make sure only controlled additions
48705  # have been made to CFLAGS etc.
48706  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48707  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48708  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48709
48710  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48711  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48712  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48713
48714  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48715  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48716  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48717
48718  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48719  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48720  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48721
48722
48723      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48724      unset ac_cv_sizeof_int_p
48725      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48726      cat >>confdefs.h <<_ACEOF
48727#undef SIZEOF_INT_P
48728_ACEOF
48729
48730      # The cast to long int works around a bug in the HP C Compiler
48731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48733# This bug is HP SR number 8606223364.
48734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48735$as_echo_n "checking size of int *... " >&6; }
48736if ${ac_cv_sizeof_int_p+:} false; then :
48737  $as_echo_n "(cached) " >&6
48738else
48739  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48740
48741else
48742  if test "$ac_cv_type_int_p" = yes; then
48743     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48745as_fn_error 77 "cannot compute sizeof (int *)
48746See \`config.log' for more details" "$LINENO" 5; }
48747   else
48748     ac_cv_sizeof_int_p=0
48749   fi
48750fi
48751
48752fi
48753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48754$as_echo "$ac_cv_sizeof_int_p" >&6; }
48755
48756
48757
48758cat >>confdefs.h <<_ACEOF
48759#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48760_ACEOF
48761
48762
48763
48764      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48765
48766      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48767        { $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
48768$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;}
48769        if test "x$COMPILE_TYPE" = xreduced; then
48770
48771  # Print a helpful message on how to acquire the necessary build dependency.
48772  # reduced is the help tag: freetype, cups, alsa etc
48773  MISSING_DEPENDENCY=reduced
48774
48775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48776    cygwin_help $MISSING_DEPENDENCY
48777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48778    msys_help $MISSING_DEPENDENCY
48779  else
48780    PKGHANDLER_COMMAND=
48781
48782    case $PKGHANDLER in
48783      apt-get)
48784        apt_help     $MISSING_DEPENDENCY ;;
48785      yum)
48786        yum_help     $MISSING_DEPENDENCY ;;
48787      port)
48788        port_help    $MISSING_DEPENDENCY ;;
48789      pkgutil)
48790        pkgutil_help $MISSING_DEPENDENCY ;;
48791      pkgadd)
48792        pkgadd_help  $MISSING_DEPENDENCY ;;
48793    esac
48794
48795    if test "x$PKGHANDLER_COMMAND" != x; then
48796      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48797    fi
48798  fi
48799
48800          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48801$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48802        elif test "x$COMPILE_TYPE" = xcross; then
48803          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48804$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48805        fi
48806        as_fn_error $? "Cannot continue." "$LINENO" 5
48807      fi
48808    fi
48809  fi
48810
48811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48812$as_echo_n "checking for target address size... " >&6; }
48813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48814$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48815
48816
48817  ###############################################################################
48818  #
48819  # Is the target little of big endian?
48820  #
48821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48822$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48823if ${ac_cv_c_bigendian+:} false; then :
48824  $as_echo_n "(cached) " >&6
48825else
48826  ac_cv_c_bigendian=unknown
48827    # See if we're dealing with a universal compiler.
48828    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48829/* end confdefs.h.  */
48830#ifndef __APPLE_CC__
48831	       not a universal capable compiler
48832	     #endif
48833	     typedef int dummy;
48834
48835_ACEOF
48836if ac_fn_cxx_try_compile "$LINENO"; then :
48837
48838	# Check for potential -arch flags.  It is not universal unless
48839	# there are at least two -arch flags with different values.
48840	ac_arch=
48841	ac_prev=
48842	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48843	 if test -n "$ac_prev"; then
48844	   case $ac_word in
48845	     i?86 | x86_64 | ppc | ppc64)
48846	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48847		 ac_arch=$ac_word
48848	       else
48849		 ac_cv_c_bigendian=universal
48850		 break
48851	       fi
48852	       ;;
48853	   esac
48854	   ac_prev=
48855	 elif test "x$ac_word" = "x-arch"; then
48856	   ac_prev=arch
48857	 fi
48858       done
48859fi
48860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48861    if test $ac_cv_c_bigendian = unknown; then
48862      # See if sys/param.h defines the BYTE_ORDER macro.
48863      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48864/* end confdefs.h.  */
48865#include <sys/types.h>
48866	     #include <sys/param.h>
48867
48868int
48869main ()
48870{
48871#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48872		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48873		     && LITTLE_ENDIAN)
48874	      bogus endian macros
48875	     #endif
48876
48877  ;
48878  return 0;
48879}
48880_ACEOF
48881if ac_fn_cxx_try_compile "$LINENO"; then :
48882  # It does; now see whether it defined to BIG_ENDIAN or not.
48883	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48884/* end confdefs.h.  */
48885#include <sys/types.h>
48886		#include <sys/param.h>
48887
48888int
48889main ()
48890{
48891#if BYTE_ORDER != BIG_ENDIAN
48892		 not big endian
48893		#endif
48894
48895  ;
48896  return 0;
48897}
48898_ACEOF
48899if ac_fn_cxx_try_compile "$LINENO"; then :
48900  ac_cv_c_bigendian=yes
48901else
48902  ac_cv_c_bigendian=no
48903fi
48904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48905fi
48906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48907    fi
48908    if test $ac_cv_c_bigendian = unknown; then
48909      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48910      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48911/* end confdefs.h.  */
48912#include <limits.h>
48913
48914int
48915main ()
48916{
48917#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48918	      bogus endian macros
48919	     #endif
48920
48921  ;
48922  return 0;
48923}
48924_ACEOF
48925if ac_fn_cxx_try_compile "$LINENO"; then :
48926  # It does; now see whether it defined to _BIG_ENDIAN or not.
48927	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48928/* end confdefs.h.  */
48929#include <limits.h>
48930
48931int
48932main ()
48933{
48934#ifndef _BIG_ENDIAN
48935		 not big endian
48936		#endif
48937
48938  ;
48939  return 0;
48940}
48941_ACEOF
48942if ac_fn_cxx_try_compile "$LINENO"; then :
48943  ac_cv_c_bigendian=yes
48944else
48945  ac_cv_c_bigendian=no
48946fi
48947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48948fi
48949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48950    fi
48951    if test $ac_cv_c_bigendian = unknown; then
48952      # Compile a test program.
48953      if test "$cross_compiling" = yes; then :
48954  # Try to guess by grepping values from an object file.
48955	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48956/* end confdefs.h.  */
48957short int ascii_mm[] =
48958		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48959		short int ascii_ii[] =
48960		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48961		int use_ascii (int i) {
48962		  return ascii_mm[i] + ascii_ii[i];
48963		}
48964		short int ebcdic_ii[] =
48965		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48966		short int ebcdic_mm[] =
48967		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48968		int use_ebcdic (int i) {
48969		  return ebcdic_mm[i] + ebcdic_ii[i];
48970		}
48971		extern int foo;
48972
48973int
48974main ()
48975{
48976return use_ascii (foo) == use_ebcdic (foo);
48977  ;
48978  return 0;
48979}
48980_ACEOF
48981if ac_fn_cxx_try_compile "$LINENO"; then :
48982  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48983	      ac_cv_c_bigendian=yes
48984	    fi
48985	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48986	      if test "$ac_cv_c_bigendian" = unknown; then
48987		ac_cv_c_bigendian=no
48988	      else
48989		# finding both strings is unlikely to happen, but who knows?
48990		ac_cv_c_bigendian=unknown
48991	      fi
48992	    fi
48993fi
48994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48995else
48996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48997/* end confdefs.h.  */
48998$ac_includes_default
48999int
49000main ()
49001{
49002
49003	     /* Are we little or big endian?  From Harbison&Steele.  */
49004	     union
49005	     {
49006	       long int l;
49007	       char c[sizeof (long int)];
49008	     } u;
49009	     u.l = 1;
49010	     return u.c[sizeof (long int) - 1] == 1;
49011
49012  ;
49013  return 0;
49014}
49015_ACEOF
49016if ac_fn_cxx_try_run "$LINENO"; then :
49017  ac_cv_c_bigendian=no
49018else
49019  ac_cv_c_bigendian=yes
49020fi
49021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49022  conftest.$ac_objext conftest.beam conftest.$ac_ext
49023fi
49024
49025    fi
49026fi
49027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49028$as_echo "$ac_cv_c_bigendian" >&6; }
49029 case $ac_cv_c_bigendian in #(
49030   yes)
49031     ENDIAN="big";; #(
49032   no)
49033     ENDIAN="little" ;; #(
49034   universal)
49035     ENDIAN="universal_endianness"
49036     ;; #(
49037   *)
49038     ENDIAN="unknown" ;;
49039 esac
49040
49041
49042  if test "x$ENDIAN" = xuniversal_endianness; then
49043    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49044  fi
49045  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49046    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
49047  fi
49048
49049
49050# Configure flags for the tools
49051
49052  ###############################################################################
49053  #
49054  # How to compile shared libraries.
49055  #
49056
49057  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49058    PICFLAG="-fPIC"
49059    C_FLAG_REORDER=''
49060    CXX_FLAG_REORDER=''
49061
49062    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49063      # Linking is different on MacOSX
49064      if test "x$STATIC_BUILD" = xtrue; then
49065        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49066      else
49067        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49068        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49069      fi
49070      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49071      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49072      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49073      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49074    else
49075      # Default works for linux, might work on other platforms as well.
49076      SHARED_LIBRARY_FLAGS='-shared'
49077      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49078      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49079      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49080      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49081    fi
49082  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49083    C_FLAG_REORDER=''
49084    CXX_FLAG_REORDER=''
49085
49086    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49087      # Linking is different on MacOSX
49088      PICFLAG=''
49089      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49090      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49091      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49092      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49093      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49094
49095      if test "x$STATIC_BUILD" = xfalse; then
49096        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49097      fi
49098    else
49099      # Default works for linux, might work on other platforms as well.
49100      PICFLAG='-fPIC'
49101      SHARED_LIBRARY_FLAGS='-shared'
49102      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49103      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49104      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49105      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49106    fi
49107  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49108    PICFLAG="-KPIC"
49109    C_FLAG_REORDER='-xF'
49110    CXX_FLAG_REORDER='-xF'
49111    SHARED_LIBRARY_FLAGS="-G"
49112    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49113    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49114    SET_SHARED_LIBRARY_NAME='-h $1'
49115    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49116  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49117    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49118    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49119    # will have to patch this single instruction with a call to some out-of-order code which
49120    # does the load from the TOC. This is of course slow. But in that case we also would have
49121    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49122    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49123    # can be patched directly by the linker and does not require a jump to out-of-order code.
49124    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49125    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49126    # loads for accessing a global variable). But there are rumors that this may be seen as a
49127    # 'performance feature' because of improved code locality of the symbols used in a
49128    # compilation unit.
49129    PICFLAG="-qpic"
49130    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49131    C_FLAG_REORDER=''
49132    CXX_FLAG_REORDER=''
49133    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49134    SET_EXECUTABLE_ORIGIN=""
49135    SET_SHARED_LIBRARY_ORIGIN=''
49136    SET_SHARED_LIBRARY_NAME=''
49137    SET_SHARED_LIBRARY_MAPFILE=''
49138  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49139    PICFLAG=""
49140    C_FLAG_REORDER=''
49141    CXX_FLAG_REORDER=''
49142    SHARED_LIBRARY_FLAGS="-dll"
49143    SET_EXECUTABLE_ORIGIN=''
49144    SET_SHARED_LIBRARY_ORIGIN=''
49145    SET_SHARED_LIBRARY_NAME=''
49146    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49147  fi
49148
49149
49150
49151
49152
49153
49154
49155
49156
49157  # The (cross) compiler is now configured, we can now test capabilities
49158  # of the target platform.
49159
49160
49161
49162  ###############################################################################
49163  #
49164  # Setup the opt flags for different compilers
49165  # and different operating systems.
49166  #
49167
49168  # FIXME: this was indirectly the old default, but just inherited.
49169  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49170  #   C_FLAG_DEPS="-MMD -MF"
49171  # fi
49172
49173  # Generate make dependency files
49174  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49175    C_FLAG_DEPS="-MMD -MF"
49176  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49177    C_FLAG_DEPS="-MMD -MF"
49178  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49179    C_FLAG_DEPS="-xMMD -xMF"
49180  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49181    C_FLAG_DEPS="-qmakedep=gcc -MF"
49182  fi
49183  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49184
49185
49186
49187  # Debug symbols
49188  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49189    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49190      # reduce from default "-g2" option to save space
49191      CFLAGS_DEBUG_SYMBOLS="-g1"
49192      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49193    else
49194      CFLAGS_DEBUG_SYMBOLS="-g"
49195      CXXFLAGS_DEBUG_SYMBOLS="-g"
49196    fi
49197  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49198    CFLAGS_DEBUG_SYMBOLS="-g"
49199    CXXFLAGS_DEBUG_SYMBOLS="-g"
49200  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49201    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49202    # -g0 enables debug symbols without disabling inlining.
49203    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49204  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49205    CFLAGS_DEBUG_SYMBOLS="-g"
49206    CXXFLAGS_DEBUG_SYMBOLS="-g"
49207  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49208    CFLAGS_DEBUG_SYMBOLS="-Zi"
49209    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49210  fi
49211
49212
49213
49214  # Debug symbols for JVM_CFLAGS
49215  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49216    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49217    if test "x$DEBUG_LEVEL" = xslowdebug; then
49218      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49219    else
49220      # -g0 does not disable inlining, which -g does.
49221      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49222    fi
49223  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49224    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49225  else
49226    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49227  fi
49228
49229
49230  # bounds, memory and behavior checking options
49231  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49232    case $DEBUG_LEVEL in
49233    release )
49234      # no adjustment
49235      ;;
49236    fastdebug )
49237      # no adjustment
49238      ;;
49239    slowdebug )
49240      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49241      # get's added conditionally on whether we produce debug symbols or not.
49242      # This is most likely not really correct.
49243
49244      # Add runtime stack smashing and undefined behavior checks.
49245      # Not all versions of gcc support -fstack-protector
49246      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289    # Execute function body
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    # Execute function body
49339
49340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49341$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49342  supports=yes
49343
49344  saved_cflags="$CFLAGS"
49345  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49346  ac_ext=c
49347ac_cpp='$CPP $CPPFLAGS'
49348ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49349ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49350ac_compiler_gnu=$ac_cv_c_compiler_gnu
49351
49352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49353/* end confdefs.h.  */
49354int i;
49355_ACEOF
49356if ac_fn_c_try_compile "$LINENO"; then :
49357
49358else
49359  supports=no
49360fi
49361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49362  ac_ext=cpp
49363ac_cpp='$CXXCPP $CPPFLAGS'
49364ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49365ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49366ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49367
49368  CFLAGS="$saved_cflags"
49369
49370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49371$as_echo "$supports" >&6; }
49372  if test "x$supports" = "xyes" ; then
49373    :
49374    C_COMP_SUPPORTS="yes"
49375  else
49376    :
49377    C_COMP_SUPPORTS="no"
49378  fi
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438    # Execute function body
49439
49440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49441$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49442  supports=yes
49443
49444  saved_cxxflags="$CXXFLAGS"
49445  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49446  ac_ext=cpp
49447ac_cpp='$CXXCPP $CPPFLAGS'
49448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49451
49452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49453/* end confdefs.h.  */
49454int i;
49455_ACEOF
49456if ac_fn_cxx_try_compile "$LINENO"; then :
49457
49458else
49459  supports=no
49460fi
49461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49462  ac_ext=cpp
49463ac_cpp='$CXXCPP $CPPFLAGS'
49464ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49465ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49466ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49467
49468  CXXFLAGS="$saved_cxxflags"
49469
49470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49471$as_echo "$supports" >&6; }
49472  if test "x$supports" = "xyes" ; then
49473    :
49474    CXX_COMP_SUPPORTS="yes"
49475  else
49476    :
49477    CXX_COMP_SUPPORTS="no"
49478  fi
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49493$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49494  supports=no
49495  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49496
49497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49498$as_echo "$supports" >&6; }
49499  if test "x$supports" = "xyes" ; then
49500    :
49501
49502  else
49503    :
49504    STACK_PROTECTOR_CFLAG=""
49505  fi
49506
49507
49508
49509
49510
49511
49512
49513      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49514      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49515      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49516        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49517      fi
49518      ;;
49519    esac
49520  fi
49521
49522  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49523    if test "x$DEBUG_LEVEL" != xrelease; then
49524      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49525        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49526      fi
49527    fi
49528  fi
49529
49530  # Optimization levels
49531  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49532    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49533
49534    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49535      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49536      C_O_FLAG_HIGHEST_JVM="-xO4"
49537      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49538      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49539      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49540      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49541      C_O_FLAG_DEBUG_JVM=""
49542      C_O_FLAG_NONE="-xregs=no%frameptr"
49543      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49544      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49545      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49546      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49547      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49548      CXX_O_FLAG_DEBUG_JVM=""
49549      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49550      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49551        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49552        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49553      fi
49554    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49555      C_O_FLAG_HIGHEST_JVM="-xO4"
49556      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49557      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49558      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49559      C_O_FLAG_DEBUG=""
49560      C_O_FLAG_DEBUG_JVM=""
49561      C_O_FLAG_NONE=""
49562      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49563      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49564      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49565      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49566      CXX_O_FLAG_DEBUG=""
49567      CXX_O_FLAG_DEBUG_JVM=""
49568      CXX_O_FLAG_NONE=""
49569    fi
49570  else
49571    # The remaining toolchains share opt flags between CC and CXX;
49572    # setup for C and duplicate afterwards.
49573    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49574      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49575        # On MacOSX we optimize for size, something
49576        # we should do for all platforms?
49577        C_O_FLAG_HIGHEST_JVM="-Os"
49578        C_O_FLAG_HIGHEST="-Os"
49579        C_O_FLAG_HI="-Os"
49580        C_O_FLAG_NORM="-Os"
49581        C_O_FLAG_SIZE="-Os"
49582      else
49583        C_O_FLAG_HIGHEST_JVM="-O3"
49584        C_O_FLAG_HIGHEST="-O3"
49585        C_O_FLAG_HI="-O3"
49586        C_O_FLAG_NORM="-O2"
49587        C_O_FLAG_SIZE="-Os"
49588      fi
49589      C_O_FLAG_DEBUG="-O0"
49590      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49591        C_O_FLAG_DEBUG_JVM=""
49592      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49593        C_O_FLAG_DEBUG_JVM="-O0"
49594      fi
49595      C_O_FLAG_NONE="-O0"
49596    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49597      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49598        # On MacOSX we optimize for size, something
49599        # we should do for all platforms?
49600        C_O_FLAG_HIGHEST_JVM="-Os"
49601        C_O_FLAG_HIGHEST="-Os"
49602        C_O_FLAG_HI="-Os"
49603        C_O_FLAG_NORM="-Os"
49604        C_O_FLAG_SIZE="-Os"
49605      else
49606        C_O_FLAG_HIGHEST_JVM="-O3"
49607        C_O_FLAG_HIGHEST="-O3"
49608        C_O_FLAG_HI="-O3"
49609        C_O_FLAG_NORM="-O2"
49610        C_O_FLAG_SIZE="-Os"
49611      fi
49612      C_O_FLAG_DEBUG="-O0"
49613      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49614        C_O_FLAG_DEBUG_JVM=""
49615      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49616        C_O_FLAG_DEBUG_JVM="-O0"
49617      fi
49618      C_O_FLAG_NONE="-O0"
49619    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49620      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49621      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49622      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49623      C_O_FLAG_NORM="-O2"
49624      C_O_FLAG_DEBUG="-qnoopt"
49625      # FIXME: Value below not verified.
49626      C_O_FLAG_DEBUG_JVM=""
49627      C_O_FLAG_NONE="-qnoopt"
49628    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49629      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49630      C_O_FLAG_HIGHEST="-O2"
49631      C_O_FLAG_HI="-O1"
49632      C_O_FLAG_NORM="-O1"
49633      C_O_FLAG_DEBUG="-Od"
49634      C_O_FLAG_DEBUG_JVM=""
49635      C_O_FLAG_NONE="-Od"
49636      C_O_FLAG_SIZE="-Os"
49637    fi
49638    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49639    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49640    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49641    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49642    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49643    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49644    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49645    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49646  fi
49647
49648  # Adjust optimization flags according to debug level.
49649  case $DEBUG_LEVEL in
49650    release )
49651      # no adjustment
49652      ;;
49653    fastdebug )
49654      # Not quite so much optimization
49655      C_O_FLAG_HI="$C_O_FLAG_NORM"
49656      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49657      ;;
49658    slowdebug )
49659      # Disable optimization
49660      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49661      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49662      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49663      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49664      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49665      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49666      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49667      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49668      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49669      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49670      ;;
49671  esac
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691  # Special extras...
49692  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49693    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49694      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49695      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49696    fi
49697    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49698    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49699  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49700    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49701    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49702  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49703    CXXSTD_CXXFLAG="-std=gnu++98"
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746    # Execute function body
49747
49748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49749$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49750  supports=yes
49751
49752  saved_cxxflags="$CXXFLAGS"
49753  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49754  ac_ext=cpp
49755ac_cpp='$CXXCPP $CPPFLAGS'
49756ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49757ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49758ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49759
49760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49761/* end confdefs.h.  */
49762int i;
49763_ACEOF
49764if ac_fn_cxx_try_compile "$LINENO"; then :
49765
49766else
49767  supports=no
49768fi
49769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49770  ac_ext=cpp
49771ac_cpp='$CXXCPP $CPPFLAGS'
49772ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49773ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49774ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49775
49776  CXXFLAGS="$saved_cxxflags"
49777
49778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49779$as_echo "$supports" >&6; }
49780  if test "x$supports" = "xyes" ; then
49781    :
49782
49783  else
49784    :
49785    CXXSTD_CXXFLAG=""
49786  fi
49787
49788
49789
49790
49791
49792
49793
49794
49795
49796
49797
49798
49799    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49800    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49801
49802  fi
49803  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49804    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49805    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49806  fi
49807
49808  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49809    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49810    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49811  fi
49812
49813  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49814  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49815  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49816
49817  ###############################################################################
49818  #
49819  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49820  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49821  #
49822
49823  # Setup compiler/platform specific flags into
49824  #    CFLAGS_JDK    - C Compiler flags
49825  #    CXXFLAGS_JDK  - C++ Compiler flags
49826  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49827  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49828    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49829    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49830    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49831    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49832      # Force compatibility with i586 on 32 bit intel platforms.
49833      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49834      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49835    fi
49836    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49837        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49838    case $OPENJDK_TARGET_CPU_ARCH in
49839      arm )
49840        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49841        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49842        ;;
49843      ppc )
49844        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49845        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49846        ;;
49847      * )
49848        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49849        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49850        ;;
49851    esac
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906    # Execute function body
49907
49908  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49909  REFERENCE_VERSION=6
49910
49911  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49912    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49913  fi
49914
49915  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49916    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49917  fi
49918
49919  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49920  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49921
49922  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49923    :
49924
49925  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49926  # runs afoul of the more aggressive versions of these optimisations.
49927  # Notably, value range propagation now assumes that the this pointer of C++
49928  # member functions is non-null.
49929  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49930        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49931        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49932$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49933  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49934  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49935
49936  else
49937    :
49938
49939  fi
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49955    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49956
49957    # Restrict the debug information created by Clang to avoid
49958    # too big object files and speed the build up a little bit
49959    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49960    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49961    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49962      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49963        # Force compatibility with i586 on 32 bit intel platforms.
49964        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49965        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49966      fi
49967      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49968      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49969          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49970      case $OPENJDK_TARGET_CPU_ARCH in
49971        ppc )
49972          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49973          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49974          ;;
49975        * )
49976          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49977          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49978          ;;
49979      esac
49980    fi
49981  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49982    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49983    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49984    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49985      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49986    fi
49987
49988    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49989    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49990  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49991    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49992    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49993    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49994  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49995    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49996        -MD -Zc:wchar_t- -W3 -wd4800 \
49997        -DWIN32_LEAN_AND_MEAN \
49998        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49999        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50000        -DWIN32 -DIAL"
50001    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50002      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50003    else
50004      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50005    fi
50006    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50007    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50008    # studio.
50009    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50010      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50011      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50012      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50013    fi
50014  fi
50015
50016  ###############################################################################
50017
50018  # Adjust flags according to debug level.
50019  case $DEBUG_LEVEL in
50020    fastdebug | slowdebug )
50021      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50022      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50023      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50024      ;;
50025    release )
50026      ;;
50027    * )
50028      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50029      ;;
50030  esac
50031
50032  # Set some common defines. These works for all compilers, but assume
50033  # -D is universally accepted.
50034
50035  # Setup endianness
50036  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50037    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50038    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50039    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50040    #   Note: -Dmacro         is the same as    #define macro 1
50041    #         -Dmacro=        is the same as    #define macro
50042    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50043      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50044    else
50045      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50046    fi
50047  else
50048    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50049    # are defined in the system?
50050    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50051      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50052    else
50053      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50054    fi
50055  fi
50056
50057  # Setup target OS define. Use OS target name but in upper case.
50058  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50059  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50060
50061  # Setup target CPU
50062  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50063      $OPENJDK_TARGET_ADD_LP64 \
50064      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50065
50066  # Setup debug/release defines
50067  if test "x$DEBUG_LEVEL" = xrelease; then
50068    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50069    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50070      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50071    fi
50072  else
50073    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50074  fi
50075
50076  # Set some additional per-OS defines.
50077  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50078    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50079    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50080        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50081  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50082    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50083    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50084        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50085  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50086    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50087    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50088    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50089    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50090        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50091        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50092        -fno-omit-frame-pointer"
50093  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50094    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50095    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50096    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50097        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50098        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50099  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50100    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50101  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50102    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50103    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50104  fi
50105
50106  # Set some additional per-CPU defines.
50107  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50108    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50109  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50110    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50111  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50112    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50113      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50114      # fixes `relocation truncated to fit' error for gcc 4.1.
50115      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50116      # Use ppc64 instructions, but schedule for power5
50117      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50118    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50119      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50120    fi
50121  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50122    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50123      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50124      # Little endian machine uses ELFv2 ABI.
50125      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50126      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50127      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50128    fi
50129  fi
50130
50131  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50132    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50133  fi
50134
50135  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50136    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50137      # Solaris does not have _LP64=1 in the old build.
50138      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50139      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50140    fi
50141  fi
50142
50143  # Set JVM_CFLAGS warning handling
50144  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50145    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50146        -Wunused-value -Woverloaded-virtual"
50147
50148    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203    # Execute function body
50204
50205  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50206  REFERENCE_VERSION=4.8
50207
50208  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50209    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50210  fi
50211
50212  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50213    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50214  fi
50215
50216  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50217  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50218
50219  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50220    :
50221
50222            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50223            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50224
50225
50226  else
50227    :
50228
50229  fi
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244    fi
50245    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50246      # Non-zero builds have stricter warnings
50247      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50248    else
50249      if test "x$TOOLCHAIN_TYPE" = xclang; then
50250        # Some versions of llvm do not like -Wundef
50251        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50252      fi
50253    fi
50254  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50255    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50256        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50257  fi
50258
50259  # Additional macosx handling
50260  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50261    # Setting these parameters makes it an error to link to macosx APIs that are
50262    # newer than the given OS version and makes the linked binaries compatible
50263    # even if built on a newer version of the OS.
50264    # The expected format is X.Y.Z
50265    MACOSX_VERSION_MIN=10.7.0
50266
50267
50268    # The macro takes the version with no dots, ex: 1070
50269    # Let the flags variables get resolved in make for easier override on make
50270    # command line.
50271    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50272    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50273  fi
50274
50275  # Setup some hard coded includes
50276  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50277      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50278      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50279      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50280      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50281      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50282
50283  # The shared libraries are compiled using the picflag.
50284  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50285      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50286  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50287      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50288
50289  # Executable flags
50290  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50291  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50292
50293
50294
50295
50296
50297
50298  # Setup LDFLAGS et al.
50299  #
50300
50301  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50302    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50303    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50304    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50305    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50306      LDFLAGS_SAFESH="-safeseh"
50307      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50308      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50309      # NOTE: Old build added -machine. Probably not needed.
50310      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50311    else
50312      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50313    fi
50314  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50315      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50316      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50317        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50318        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50319    fi
50320  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50321    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50322    # We have previously set HAS_GNU_HASH if this is the case
50323    if test -n "$HAS_GNU_HASH"; then
50324      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50325      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50326      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50327    fi
50328      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50329        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50330    fi
50331    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50332      # And since we now know that the linker is gnu, then add -z defs, to forbid
50333      # undefined symbols in object files.
50334      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50335      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50336      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50337      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50338      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50339      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50340        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50341      fi
50342      case $DEBUG_LEVEL in
50343        release )
50344          # tell linker to optimize libraries.
50345          # Should this be supplied to the OSS linker as well?
50346          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50347          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50348          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50349          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50350            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50351          fi
50352          ;;
50353        slowdebug )
50354          # Hotspot always let the linker optimize
50355          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50356          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50357            # do relocations at load
50358            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50359            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50360            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50361          fi
50362          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50363            # mark relocations read only
50364            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50365            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50366            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50367          fi
50368          ;;
50369        fastdebug )
50370          # Hotspot always let the linker optimize
50371          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50372          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50373            # mark relocations read only
50374            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50375            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50376            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50377          fi
50378          ;;
50379        * )
50380          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50381          ;;
50382        esac
50383    fi
50384  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50385    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50386    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50387    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50388    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50389    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50390    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50391      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50392    fi
50393  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50394    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50395    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50396    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50397  fi
50398
50399  # Customize LDFLAGS for executables
50400
50401  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50402
50403  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50404    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50405      LDFLAGS_STACK_SIZE=1048576
50406    else
50407      LDFLAGS_STACK_SIZE=327680
50408    fi
50409    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50410  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50411    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50412  fi
50413
50414  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50415
50416  # Customize LDFLAGS for libs
50417  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50418
50419  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50420  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50421    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50422        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50423    JDKLIB_LIBS=""
50424  else
50425    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50426        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50427
50428    if test "xTARGET" = "xTARGET"; then
50429    # On some platforms (mac) the linker warns about non existing -L dirs.
50430    # Add server first if available. Linking aginst client does not always produce the same results.
50431      # Only add client/minimal dir if client/minimal is being built.
50432    # Default to server for other variants.
50433      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50434        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50435      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50436        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50437      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50438        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50439    else
50440        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50441    fi
50442    elif test "xTARGET" = "xBUILD"; then
50443      # When building a buildjdk, it's always only the server variant
50444      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50445          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50446    fi
50447
50448    JDKLIB_LIBS="-ljava -ljvm"
50449    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50450      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50451    fi
50452
50453  fi
50454
50455LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50456
50457  # Set JVM_LIBS (per os)
50458  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50459    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50460  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50461    # FIXME: This hard-coded path is not really proper.
50462    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50463      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50464    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50465      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50466    fi
50467    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50468        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50469  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50470    JVM_LIBS="$JVM_LIBS -lm"
50471  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50472    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50473  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50474    JVM_LIBS="$JVM_LIBS -lm"
50475  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50476    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50477        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50478        wsock32.lib winmm.lib version.lib psapi.lib"
50479    fi
50480
50481  # Set JVM_ASFLAGS
50482  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50483    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50484      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50485    fi
50486  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50487    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50488  fi
50489
50490  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506  # Special extras...
50507  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50508    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50509      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50510      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50511    fi
50512    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50513    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50514  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50515    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50516    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50517  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50518    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561    # Execute function body
50562
50563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50564$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50565  supports=yes
50566
50567  saved_cxxflags="$CXXFLAGS"
50568  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50569  ac_ext=cpp
50570ac_cpp='$CXXCPP $CPPFLAGS'
50571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50574
50575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50576/* end confdefs.h.  */
50577int i;
50578_ACEOF
50579if ac_fn_cxx_try_compile "$LINENO"; then :
50580
50581else
50582  supports=no
50583fi
50584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50585  ac_ext=cpp
50586ac_cpp='$CXXCPP $CPPFLAGS'
50587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50590
50591  CXXFLAGS="$saved_cxxflags"
50592
50593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50594$as_echo "$supports" >&6; }
50595  if test "x$supports" = "xyes" ; then
50596    :
50597
50598  else
50599    :
50600    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50601  fi
50602
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50615    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50616
50617  fi
50618  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50619    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50620    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50621  fi
50622
50623  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50624    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50625    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50626  fi
50627
50628  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50629  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50630  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50631
50632  ###############################################################################
50633  #
50634  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50635  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50636  #
50637
50638  # Setup compiler/platform specific flags into
50639  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50640  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50641  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50642  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50643    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50644    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50645    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50646    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50647      # Force compatibility with i586 on 32 bit intel platforms.
50648      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50649      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50650    fi
50651    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50652        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50653    case $OPENJDK_BUILD_CPU_ARCH in
50654      arm )
50655        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50656        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50657        ;;
50658      ppc )
50659        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50660        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50661        ;;
50662      * )
50663        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50664        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50665        ;;
50666    esac
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721    # Execute function body
50722
50723  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50724  REFERENCE_VERSION=6
50725
50726  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50727    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50728  fi
50729
50730  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50731    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50732  fi
50733
50734  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50735  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50736
50737  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50738    :
50739
50740  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50741  # runs afoul of the more aggressive versions of these optimisations.
50742  # Notably, value range propagation now assumes that the this pointer of C++
50743  # member functions is non-null.
50744  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50745        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50746        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50747$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50748  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50749  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50750
50751  else
50752    :
50753
50754  fi
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50770    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50771
50772    # Restrict the debug information created by Clang to avoid
50773    # too big object files and speed the build up a little bit
50774    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50775    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50776    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50777      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50778        # Force compatibility with i586 on 32 bit intel platforms.
50779        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50780        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50781      fi
50782      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50783      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50784          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50785      case $OPENJDK_BUILD_CPU_ARCH in
50786        ppc )
50787          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50788          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50789          ;;
50790        * )
50791          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50792          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50793          ;;
50794      esac
50795    fi
50796  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50797    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50798    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50799    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50800      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50801    fi
50802
50803    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50804    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50805  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50806    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50807    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50808    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50809  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50810    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50811        -MD -Zc:wchar_t- -W3 -wd4800 \
50812        -DWIN32_LEAN_AND_MEAN \
50813        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50814        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50815        -DWIN32 -DIAL"
50816    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50817      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50818    else
50819      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50820    fi
50821    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50822    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50823    # studio.
50824    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50825      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50826      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50827      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50828    fi
50829  fi
50830
50831  ###############################################################################
50832
50833  # Adjust flags according to debug level.
50834  case $DEBUG_LEVEL in
50835    fastdebug | slowdebug )
50836      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50837      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50838      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50839      ;;
50840    release )
50841      ;;
50842    * )
50843      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50844      ;;
50845  esac
50846
50847  # Set some common defines. These works for all compilers, but assume
50848  # -D is universally accepted.
50849
50850  # Setup endianness
50851  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50852    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50853    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50854    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50855    #   Note: -Dmacro         is the same as    #define macro 1
50856    #         -Dmacro=        is the same as    #define macro
50857    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50858      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50859    else
50860      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50861    fi
50862  else
50863    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50864    # are defined in the system?
50865    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50866      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50867    else
50868      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50869    fi
50870  fi
50871
50872  # Setup target OS define. Use OS target name but in upper case.
50873  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50874  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50875
50876  # Setup target CPU
50877  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50878      $OPENJDK_BUILD_ADD_LP64 \
50879      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50880
50881  # Setup debug/release defines
50882  if test "x$DEBUG_LEVEL" = xrelease; then
50883    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50884    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50885      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50886    fi
50887  else
50888    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50889  fi
50890
50891  # Set some additional per-OS defines.
50892  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50893    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50894    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50895        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50896  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50897    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50898    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50899        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50900  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50901    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50902    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50903    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50904    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50905        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50906        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50907        -fno-omit-frame-pointer"
50908  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50909    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50910    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50911    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50912        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50913        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50914  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50915    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50916  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50917    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50918    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50919  fi
50920
50921  # Set some additional per-CPU defines.
50922  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50923    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50924  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50925    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50926  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50927    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50928      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50929      # fixes `relocation truncated to fit' error for gcc 4.1.
50930      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50931      # Use ppc64 instructions, but schedule for power5
50932      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50933    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50934      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50935    fi
50936  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50937    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50938      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50939      # Little endian machine uses ELFv2 ABI.
50940      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50941      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50942      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50943    fi
50944  fi
50945
50946  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50947    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50948  fi
50949
50950  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50951    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50952      # Solaris does not have _LP64=1 in the old build.
50953      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50954      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50955    fi
50956  fi
50957
50958  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50959  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50960    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50961        -Wunused-value -Woverloaded-virtual"
50962
50963    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018    # Execute function body
51019
51020  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51021  REFERENCE_VERSION=4.8
51022
51023  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51024    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51025  fi
51026
51027  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51028    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51029  fi
51030
51031  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51032  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51033
51034  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51035    :
51036
51037            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51038            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51039
51040
51041  else
51042    :
51043
51044  fi
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059    fi
51060    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51061      # Non-zero builds have stricter warnings
51062      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51063    else
51064      if test "x$TOOLCHAIN_TYPE" = xclang; then
51065        # Some versions of llvm do not like -Wundef
51066        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51067      fi
51068    fi
51069  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51070    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51071        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51072  fi
51073
51074  # Additional macosx handling
51075  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51076    # Setting these parameters makes it an error to link to macosx APIs that are
51077    # newer than the given OS version and makes the linked binaries compatible
51078    # even if built on a newer version of the OS.
51079    # The expected format is X.Y.Z
51080    MACOSX_VERSION_MIN=10.7.0
51081
51082
51083    # The macro takes the version with no dots, ex: 1070
51084    # Let the flags variables get resolved in make for easier override on make
51085    # command line.
51086    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)"
51087    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51088  fi
51089
51090  # Setup some hard coded includes
51091  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51092      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51093      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51094      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51095      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51096      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51097
51098  # The shared libraries are compiled using the picflag.
51099  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51100      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51101  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51102      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51103
51104  # Executable flags
51105  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51106  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51107
51108
51109
51110
51111
51112
51113  # Setup LDFLAGS et al.
51114  #
51115
51116  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51117    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51118    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51119    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51120    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51121      LDFLAGS_SAFESH="-safeseh"
51122      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51123      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51124      # NOTE: Old build added -machine. Probably not needed.
51125      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51126    else
51127      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51128    fi
51129  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51130      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51131      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51132        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51133        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51134    fi
51135  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51136    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51137    # We have previously set HAS_GNU_HASH if this is the case
51138    if test -n "$HAS_GNU_HASH"; then
51139      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51140      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51141      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51142    fi
51143      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51144        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51145    fi
51146    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51147      # And since we now know that the linker is gnu, then add -z defs, to forbid
51148      # undefined symbols in object files.
51149      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51150      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51151      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51152      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51153      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51154      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51155        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51156      fi
51157      case $DEBUG_LEVEL in
51158        release )
51159          # tell linker to optimize libraries.
51160          # Should this be supplied to the OSS linker as well?
51161          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51162          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51163          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51164          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51165            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51166          fi
51167          ;;
51168        slowdebug )
51169          # Hotspot always let the linker optimize
51170          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51171          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51172            # do relocations at load
51173            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51174            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51175            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51176          fi
51177          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51178            # mark relocations read only
51179            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51180            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51181            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51182          fi
51183          ;;
51184        fastdebug )
51185          # Hotspot always let the linker optimize
51186          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51187          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51188            # mark relocations read only
51189            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51190            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51191            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51192          fi
51193          ;;
51194        * )
51195          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51196          ;;
51197        esac
51198    fi
51199  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51200    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51201    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51202    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51203    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51204    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51205    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51206      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51207    fi
51208  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51209    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51210    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51211    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51212  fi
51213
51214  # Customize LDFLAGS for executables
51215
51216  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51217
51218  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51219    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51220      LDFLAGS_STACK_SIZE=1048576
51221    else
51222      LDFLAGS_STACK_SIZE=327680
51223    fi
51224    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51225  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51226    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51227  fi
51228
51229  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51230
51231  # Customize LDFLAGS for libs
51232  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51233
51234  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51235  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51236    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51237        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51238    OPENJDK_BUILD_JDKLIB_LIBS=""
51239  else
51240    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51241        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51242
51243    if test "xBUILD" = "xTARGET"; then
51244    # On some platforms (mac) the linker warns about non existing -L dirs.
51245    # Add server first if available. Linking aginst client does not always produce the same results.
51246      # Only add client/minimal dir if client/minimal is being built.
51247    # Default to server for other variants.
51248      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51249        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51250      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51251        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51252      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51253        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51254    else
51255        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51256    fi
51257    elif test "xBUILD" = "xBUILD"; then
51258      # When building a buildjdk, it's always only the server variant
51259      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51260          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51261    fi
51262
51263    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51264    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51265      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51266    fi
51267
51268  fi
51269
51270OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51271
51272  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51273  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51274    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51275  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51276    # FIXME: This hard-coded path is not really proper.
51277    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51278      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51279    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51280      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51281    fi
51282    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51283        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51284  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51285    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51286  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51287    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51288  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51289    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51290  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51291    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51292        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51293        wsock32.lib winmm.lib version.lib psapi.lib"
51294    fi
51295
51296  # Set OPENJDK_BUILD_JVM_ASFLAGS
51297  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51298    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51299      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51300    fi
51301  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51302    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51303  fi
51304
51305  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321  # Tests are only ever compiled for TARGET
51322  # Flags for compiling test libraries
51323  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51324  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51325
51326  # Flags for compiling test executables
51327  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51328  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51329
51330
51331
51332
51333
51334
51335  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51336  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51337
51338
51339
51340
51341
51342
51343  # Some Zero and Shark settings.
51344  # ZERO_ARCHFLAG tells the compiler which mode to build for
51345  case "${OPENJDK_TARGET_CPU}" in
51346    s390)
51347      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51348      ;;
51349    *)
51350      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51351  esac
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394    # Execute function body
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443    # Execute function body
51444
51445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51446$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51447  supports=yes
51448
51449  saved_cflags="$CFLAGS"
51450  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51451  ac_ext=c
51452ac_cpp='$CPP $CPPFLAGS'
51453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51455ac_compiler_gnu=$ac_cv_c_compiler_gnu
51456
51457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51458/* end confdefs.h.  */
51459int i;
51460_ACEOF
51461if ac_fn_c_try_compile "$LINENO"; then :
51462
51463else
51464  supports=no
51465fi
51466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51467  ac_ext=cpp
51468ac_cpp='$CXXCPP $CPPFLAGS'
51469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51472
51473  CFLAGS="$saved_cflags"
51474
51475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51476$as_echo "$supports" >&6; }
51477  if test "x$supports" = "xyes" ; then
51478    :
51479    C_COMP_SUPPORTS="yes"
51480  else
51481    :
51482    C_COMP_SUPPORTS="no"
51483  fi
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
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543    # Execute function body
51544
51545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51546$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51547  supports=yes
51548
51549  saved_cxxflags="$CXXFLAGS"
51550  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51551  ac_ext=cpp
51552ac_cpp='$CXXCPP $CPPFLAGS'
51553ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51554ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51555ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51556
51557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51558/* end confdefs.h.  */
51559int i;
51560_ACEOF
51561if ac_fn_cxx_try_compile "$LINENO"; then :
51562
51563else
51564  supports=no
51565fi
51566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51567  ac_ext=cpp
51568ac_cpp='$CXXCPP $CPPFLAGS'
51569ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51570ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51571ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51572
51573  CXXFLAGS="$saved_cxxflags"
51574
51575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51576$as_echo "$supports" >&6; }
51577  if test "x$supports" = "xyes" ; then
51578    :
51579    CXX_COMP_SUPPORTS="yes"
51580  else
51581    :
51582    CXX_COMP_SUPPORTS="no"
51583  fi
51584
51585
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51598$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51599  supports=no
51600  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51601
51602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51603$as_echo "$supports" >&6; }
51604  if test "x$supports" = "xyes" ; then
51605    :
51606
51607  else
51608    :
51609    ZERO_ARCHFLAG=""
51610  fi
51611
51612
51613
51614
51615
51616
51617
51618
51619  # Check that the compiler supports -mX (or -qX on AIX) flags
51620  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668    # Execute function body
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
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    # Execute function body
51718
51719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51720$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51721  supports=yes
51722
51723  saved_cflags="$CFLAGS"
51724  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51725  ac_ext=c
51726ac_cpp='$CPP $CPPFLAGS'
51727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51729ac_compiler_gnu=$ac_cv_c_compiler_gnu
51730
51731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51732/* end confdefs.h.  */
51733int i;
51734_ACEOF
51735if ac_fn_c_try_compile "$LINENO"; then :
51736
51737else
51738  supports=no
51739fi
51740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51741  ac_ext=cpp
51742ac_cpp='$CXXCPP $CPPFLAGS'
51743ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51744ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51745ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51746
51747  CFLAGS="$saved_cflags"
51748
51749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51750$as_echo "$supports" >&6; }
51751  if test "x$supports" = "xyes" ; then
51752    :
51753    C_COMP_SUPPORTS="yes"
51754  else
51755    :
51756    C_COMP_SUPPORTS="no"
51757  fi
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
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    # Execute function body
51818
51819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51820$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51821  supports=yes
51822
51823  saved_cxxflags="$CXXFLAGS"
51824  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51825  ac_ext=cpp
51826ac_cpp='$CXXCPP $CPPFLAGS'
51827ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51828ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51829ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51830
51831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51832/* end confdefs.h.  */
51833int i;
51834_ACEOF
51835if ac_fn_cxx_try_compile "$LINENO"; then :
51836
51837else
51838  supports=no
51839fi
51840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51841  ac_ext=cpp
51842ac_cpp='$CXXCPP $CPPFLAGS'
51843ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51844ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51845ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51846
51847  CXXFLAGS="$saved_cxxflags"
51848
51849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51850$as_echo "$supports" >&6; }
51851  if test "x$supports" = "xyes" ; then
51852    :
51853    CXX_COMP_SUPPORTS="yes"
51854  else
51855    :
51856    CXX_COMP_SUPPORTS="no"
51857  fi
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51872$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51873  supports=no
51874  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51875
51876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51877$as_echo "$supports" >&6; }
51878  if test "x$supports" = "xyes" ; then
51879    :
51880    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51881  else
51882    :
51883    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51884  fi
51885
51886
51887
51888
51889
51890
51891
51892
51893  # Check whether --enable-warnings-as-errors was given.
51894if test "${enable_warnings_as_errors+set}" = set; then :
51895  enableval=$enable_warnings_as_errors;
51896fi
51897
51898
51899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51900$as_echo_n "checking if native warnings are errors... " >&6; }
51901  if test "x$enable_warnings_as_errors" = "xyes"; then
51902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51903$as_echo "yes (explicitely set)" >&6; }
51904    WARNINGS_AS_ERRORS=true
51905  elif test "x$enable_warnings_as_errors" = "xno"; then
51906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51907$as_echo "no" >&6; }
51908    WARNINGS_AS_ERRORS=false
51909  elif test "x$enable_warnings_as_errors" = "x"; then
51910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51911$as_echo "yes (default)" >&6; }
51912    WARNINGS_AS_ERRORS=true
51913  else
51914    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51915  fi
51916
51917  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51918    # Set legacy hotspot variable
51919    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51920  else
51921    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51922  fi
51923
51924
51925
51926
51927  case "${TOOLCHAIN_TYPE}" in
51928    microsoft)
51929      DISABLE_WARNING_PREFIX="-wd"
51930      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51931      ;;
51932    solstudio)
51933      DISABLE_WARNING_PREFIX="-erroff="
51934      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51935      ;;
51936    gcc)
51937      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985    # Execute function body
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034    # Execute function body
52035
52036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52037$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52038  supports=yes
52039
52040  saved_cflags="$CFLAGS"
52041  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52042  ac_ext=c
52043ac_cpp='$CPP $CPPFLAGS'
52044ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52045ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52046ac_compiler_gnu=$ac_cv_c_compiler_gnu
52047
52048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52049/* end confdefs.h.  */
52050int i;
52051_ACEOF
52052if ac_fn_c_try_compile "$LINENO"; then :
52053
52054else
52055  supports=no
52056fi
52057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52058  ac_ext=cpp
52059ac_cpp='$CXXCPP $CPPFLAGS'
52060ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52061ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52062ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52063
52064  CFLAGS="$saved_cflags"
52065
52066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52067$as_echo "$supports" >&6; }
52068  if test "x$supports" = "xyes" ; then
52069    :
52070    C_COMP_SUPPORTS="yes"
52071  else
52072    :
52073    C_COMP_SUPPORTS="no"
52074  fi
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
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134    # Execute function body
52135
52136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52137$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52138  supports=yes
52139
52140  saved_cxxflags="$CXXFLAGS"
52141  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52142  ac_ext=cpp
52143ac_cpp='$CXXCPP $CPPFLAGS'
52144ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52145ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52146ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52147
52148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52149/* end confdefs.h.  */
52150int i;
52151_ACEOF
52152if ac_fn_cxx_try_compile "$LINENO"; then :
52153
52154else
52155  supports=no
52156fi
52157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52158  ac_ext=cpp
52159ac_cpp='$CXXCPP $CPPFLAGS'
52160ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52161ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52162ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52163
52164  CXXFLAGS="$saved_cxxflags"
52165
52166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52167$as_echo "$supports" >&6; }
52168  if test "x$supports" = "xyes" ; then
52169    :
52170    CXX_COMP_SUPPORTS="yes"
52171  else
52172    :
52173    CXX_COMP_SUPPORTS="no"
52174  fi
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52189$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52190  supports=no
52191  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52192
52193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52194$as_echo "$supports" >&6; }
52195  if test "x$supports" = "xyes" ; then
52196    :
52197    GCC_CAN_DISABLE_WARNINGS=true
52198  else
52199    :
52200    GCC_CAN_DISABLE_WARNINGS=false
52201
52202  fi
52203
52204
52205
52206
52207
52208
52209      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52210        DISABLE_WARNING_PREFIX="-Wno-"
52211      else
52212        DISABLE_WARNING_PREFIX=
52213      fi
52214      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52215      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52216      # CFLAGS since any target specific flags will likely not work with the
52217      # build compiler
52218      CC_OLD="$CC"
52219      CXX_OLD="$CXX"
52220      CC="$BUILD_CC"
52221      CXX="$BUILD_CXX"
52222      CFLAGS_OLD="$CFLAGS"
52223      CFLAGS=""
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271    # Execute function body
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320    # Execute function body
52321
52322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52323$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52324  supports=yes
52325
52326  saved_cflags="$CFLAGS"
52327  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52328  ac_ext=c
52329ac_cpp='$CPP $CPPFLAGS'
52330ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52331ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52332ac_compiler_gnu=$ac_cv_c_compiler_gnu
52333
52334  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52335/* end confdefs.h.  */
52336int i;
52337_ACEOF
52338if ac_fn_c_try_compile "$LINENO"; then :
52339
52340else
52341  supports=no
52342fi
52343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52344  ac_ext=cpp
52345ac_cpp='$CXXCPP $CPPFLAGS'
52346ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52347ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52348ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52349
52350  CFLAGS="$saved_cflags"
52351
52352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52353$as_echo "$supports" >&6; }
52354  if test "x$supports" = "xyes" ; then
52355    :
52356    C_COMP_SUPPORTS="yes"
52357  else
52358    :
52359    C_COMP_SUPPORTS="no"
52360  fi
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420    # Execute function body
52421
52422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52423$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52424  supports=yes
52425
52426  saved_cxxflags="$CXXFLAGS"
52427  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52428  ac_ext=cpp
52429ac_cpp='$CXXCPP $CPPFLAGS'
52430ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52431ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52432ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52433
52434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52435/* end confdefs.h.  */
52436int i;
52437_ACEOF
52438if ac_fn_cxx_try_compile "$LINENO"; then :
52439
52440else
52441  supports=no
52442fi
52443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52444  ac_ext=cpp
52445ac_cpp='$CXXCPP $CPPFLAGS'
52446ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52447ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52448ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52449
52450  CXXFLAGS="$saved_cxxflags"
52451
52452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52453$as_echo "$supports" >&6; }
52454  if test "x$supports" = "xyes" ; then
52455    :
52456    CXX_COMP_SUPPORTS="yes"
52457  else
52458    :
52459    CXX_COMP_SUPPORTS="no"
52460  fi
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52475$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52476  supports=no
52477  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52478
52479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52480$as_echo "$supports" >&6; }
52481  if test "x$supports" = "xyes" ; then
52482    :
52483    BUILD_CC_CAN_DISABLE_WARNINGS=true
52484  else
52485    :
52486    BUILD_CC_CAN_DISABLE_WARNINGS=false
52487
52488  fi
52489
52490
52491
52492
52493
52494
52495      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52496        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52497      else
52498        BUILD_CC_DISABLE_WARNING_PREFIX=
52499      fi
52500      CC="$CC_OLD"
52501      CXX="$CXX_OLD"
52502      CFLAGS="$CFLAGS_OLD"
52503      ;;
52504    clang)
52505      DISABLE_WARNING_PREFIX="-Wno-"
52506      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52507      ;;
52508    xlc)
52509      DISABLE_WARNING_PREFIX="-qsuppress="
52510      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52511      ;;
52512  esac
52513
52514
52515
52516
52517
52518# Setup debug symbols (need objcopy from the toolchain for that)
52519
52520  #
52521  # NATIVE_DEBUG_SYMBOLS
52522  # This must be done after the toolchain is setup, since we're looking at objcopy.
52523  #
52524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52525$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52526
52527# Check whether --with-native-debug-symbols was given.
52528if test "${with_native_debug_symbols+set}" = set; then :
52529  withval=$with_native_debug_symbols;
52530        if test "x$OPENJDK_TARGET_OS" = xaix; then
52531          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52532            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52533          fi
52534        fi
52535
52536else
52537
52538        if test "x$OPENJDK_TARGET_OS" = xaix; then
52539          # AIX doesn't support 'zipped' so use 'internal' as default
52540          with_native_debug_symbols="internal"
52541        else
52542          if test "x$STATIC_BUILD" = xtrue; then
52543            with_native_debug_symbols="none"
52544          else
52545            with_native_debug_symbols="zipped"
52546          fi
52547        fi
52548
52549fi
52550
52551  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52553$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52554
52555  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52556
52557    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52558      if test "x$OBJCOPY" = x; then
52559        # enabling of enable-debug-symbols and can't find objcopy
52560        # this is an error
52561        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52562      fi
52563    fi
52564
52565    COMPILE_WITH_DEBUG_SYMBOLS=true
52566    COPY_DEBUG_SYMBOLS=true
52567    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52568
52569    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52570    DEBUG_BINARIES=false
52571    STRIP_POLICY=min_strip
52572
52573  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52574    COMPILE_WITH_DEBUG_SYMBOLS=false
52575    COPY_DEBUG_SYMBOLS=false
52576    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52577
52578    DEBUG_BINARIES=false
52579    STRIP_POLICY=no_strip
52580  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52581    COMPILE_WITH_DEBUG_SYMBOLS=true
52582    COPY_DEBUG_SYMBOLS=false
52583    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52584
52585    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52586    DEBUG_BINARIES=true
52587    STRIP_POLICY=no_strip
52588    STRIP=""
52589
52590  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52591
52592    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52593      if test "x$OBJCOPY" = x; then
52594        # enabling of enable-debug-symbols and can't find objcopy
52595        # this is an error
52596        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52597      fi
52598    fi
52599
52600    COMPILE_WITH_DEBUG_SYMBOLS=true
52601    COPY_DEBUG_SYMBOLS=true
52602    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52603
52604    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52605    DEBUG_BINARIES=false
52606    STRIP_POLICY=min_strip
52607  else
52608    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52609  fi
52610
52611  # --enable-debug-symbols is deprecated.
52612  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52613
52614  # Check whether --enable-debug-symbols was given.
52615if test "${enable_debug_symbols+set}" = set; then :
52616  enableval=$enable_debug_symbols;
52617fi
52618
52619  if test "x$enable_debug_symbols" != x; then
52620    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52621$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52622
52623    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52624      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52625$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52626    fi
52627
52628  fi
52629
52630
52631  # --enable-zip-debug-info is deprecated.
52632  # Please use --with-native-debug-symbols=zipped .
52633
52634  # Check whether --enable-zip-debug-info was given.
52635if test "${enable_zip_debug_info+set}" = set; then :
52636  enableval=$enable_zip_debug_info;
52637fi
52638
52639  if test "x$enable_zip_debug_info" != x; then
52640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52641$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52642
52643    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52644      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52645$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52646    fi
52647
52648  fi
52649
52650
52651
52652
52653
52654
52655  # Legacy values
52656
52657
52658
52659
52660  # Check whether --enable-native-coverage was given.
52661if test "${enable_native_coverage+set}" = set; then :
52662  enableval=$enable_native_coverage;
52663fi
52664
52665  GCOV_ENABLED="false"
52666  if test "x$enable_native_coverage" = "xyes"; then
52667    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52668      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52669$as_echo_n "checking if native coverage is enabled... " >&6; }
52670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52671$as_echo "yes" >&6; }
52672      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52673      GCOV_LDFLAGS="-fprofile-arcs"
52674      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52675      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52676      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52677      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52678      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52679      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52680      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52681      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52682      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52683      GCOV_ENABLED="true"
52684    else
52685      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52686    fi
52687  elif test "x$enable_native_coverage" = "xno"; then
52688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52689$as_echo_n "checking if native coverage is enabled... " >&6; }
52690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52691$as_echo "no" >&6; }
52692  elif test "x$enable_native_coverage" != "x"; then
52693    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52694  fi
52695
52696
52697
52698
52699# Need toolchain to setup dtrace
52700
52701  # Test for dtrace dependencies
52702  # Check whether --enable-dtrace was given.
52703if test "${enable_dtrace+set}" = set; then :
52704  enableval=$enable_dtrace;
52705fi
52706
52707
52708  DTRACE_DEP_MISSING=false
52709
52710  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52711$as_echo_n "checking for dtrace tool... " >&6; }
52712  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52714$as_echo "$DTRACE" >&6; }
52715  else
52716    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52717$as_echo "not found, cannot build dtrace" >&6; }
52718    DTRACE_DEP_MISSING=true
52719  fi
52720
52721  for ac_header in sys/sdt.h
52722do :
52723  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52724if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52725  cat >>confdefs.h <<_ACEOF
52726#define HAVE_SYS_SDT_H 1
52727_ACEOF
52728 DTRACE_HEADERS_OK=yes
52729else
52730  DTRACE_HEADERS_OK=no
52731fi
52732
52733done
52734
52735  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52736    DTRACE_DEP_MISSING=true
52737  fi
52738
52739  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52740$as_echo_n "checking if dtrace should be built... " >&6; }
52741  if test "x$enable_dtrace" = "xyes"; then
52742    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52743      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52744$as_echo "no, missing dependencies" >&6; }
52745
52746  # Print a helpful message on how to acquire the necessary build dependency.
52747  # dtrace is the help tag: freetype, cups, alsa etc
52748  MISSING_DEPENDENCY=dtrace
52749
52750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52751    cygwin_help $MISSING_DEPENDENCY
52752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52753    msys_help $MISSING_DEPENDENCY
52754  else
52755    PKGHANDLER_COMMAND=
52756
52757    case $PKGHANDLER in
52758      apt-get)
52759        apt_help     $MISSING_DEPENDENCY ;;
52760      yum)
52761        yum_help     $MISSING_DEPENDENCY ;;
52762      port)
52763        port_help    $MISSING_DEPENDENCY ;;
52764      pkgutil)
52765        pkgutil_help $MISSING_DEPENDENCY ;;
52766      pkgadd)
52767        pkgadd_help  $MISSING_DEPENDENCY ;;
52768    esac
52769
52770    if test "x$PKGHANDLER_COMMAND" != x; then
52771      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52772    fi
52773  fi
52774
52775      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52776    else
52777      INCLUDE_DTRACE=true
52778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52779$as_echo "yes, forced" >&6; }
52780    fi
52781  elif test "x$enable_dtrace" = "xno"; then
52782    INCLUDE_DTRACE=false
52783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52784$as_echo "no, forced" >&6; }
52785  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52786    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52787      INCLUDE_DTRACE=false
52788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52789$as_echo "no, missing dependencies" >&6; }
52790    else
52791      INCLUDE_DTRACE=true
52792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52793$as_echo "yes, dependencies present" >&6; }
52794    fi
52795  else
52796    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52797  fi
52798
52799
52800
52801  # The user can in some cases supply additional jvm features. For the custom
52802  # variant, this defines the entire variant.
52803
52804# Check whether --with-jvm-features was given.
52805if test "${with_jvm_features+set}" = set; then :
52806  withval=$with_jvm_features;
52807fi
52808
52809  if test "x$with_jvm_features" != x; then
52810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52811$as_echo_n "checking additional JVM features... " >&6; }
52812    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52814$as_echo "$JVM_FEATURES" >&6; }
52815  fi
52816
52817  # Verify that dependencies are met for explicitly set features.
52818  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52819    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52820  fi
52821
52822  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52823    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52824  fi
52825
52826  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52827    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52828  fi
52829
52830  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52831    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52832  fi
52833
52834  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52835    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52836  fi
52837
52838  # Turn on additional features based on other parts of configure
52839  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52840    JVM_FEATURES="$JVM_FEATURES dtrace"
52841  else
52842    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52843      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52844    fi
52845  fi
52846
52847  if test "x$STATIC_BUILD" = "xtrue"; then
52848    JVM_FEATURES="$JVM_FEATURES static-build"
52849  else
52850    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52851      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52852    fi
52853  fi
52854
52855  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52856    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52857      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52858    fi
52859  fi
52860
52861  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52862    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52863      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52864    fi
52865  fi
52866
52867  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52868  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52869      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52870      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52871    JVM_FEATURES_jvmci="jvmci"
52872  else
52873    JVM_FEATURES_jvmci=""
52874  fi
52875
52876  # All variants but minimal (and custom) get these features
52877  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52878
52879  # Enable features depending on variant.
52880  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52881  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52882  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52883  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52884  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52885  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52886  JVM_FEATURES_custom="$JVM_FEATURES"
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896  # Used for verification of Makefiles by check-jvm-feature
52897
52898
52899  # We don't support --with-jvm-interpreter anymore, use zero instead.
52900
52901
52902# Check whether --with-jvm-interpreter was given.
52903if test "${with_jvm_interpreter+set}" = set; then :
52904  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52905$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52906fi
52907
52908
52909
52910
52911  # Check whether --enable-hotspot-gtest was given.
52912if test "${enable_hotspot_gtest+set}" = set; then :
52913  enableval=$enable_hotspot_gtest;
52914fi
52915
52916
52917  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52918    GTEST_DIR_EXISTS="true"
52919  else
52920    GTEST_DIR_EXISTS="false"
52921  fi
52922
52923  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52924$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52925  if test "x$enable_hotspot_gtest" = "xyes"; then
52926    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52928$as_echo "yes, forced" >&6; }
52929      BUILD_GTEST="true"
52930    else
52931      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52932    fi
52933  elif test "x$enable_hotspot_gtest" = "xno"; then
52934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52935$as_echo "no, forced" >&6; }
52936    BUILD_GTEST="false"
52937  elif test "x$enable_hotspot_gtest" = "x"; then
52938    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52940$as_echo "yes" >&6; }
52941      BUILD_GTEST="true"
52942    else
52943      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52944$as_echo "no" >&6; }
52945      BUILD_GTEST="false"
52946    fi
52947  else
52948    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52949  fi
52950
52951
52952
52953
52954###############################################################################
52955#
52956# Check dependencies for external and internal libraries.
52957#
52958###############################################################################
52959
52960# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52961
52962  # When using cygwin or msys, we need a wrapper binary that renames
52963  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52964  # @files and rewrites these too! This wrapper binary is
52965  # called fixpath.
52966  FIXPATH=
52967  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52968    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52969$as_echo_n "checking if fixpath can be created... " >&6; }
52970    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52971    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52972    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52973    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52974      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52975      FIXPATH="$FIXPATH_BIN -c"
52976    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52977      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52978      # @ was chosen as separator to minimize risk of other tools messing around with it
52979      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52980          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52981      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52982      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52983    fi
52984    FIXPATH_SRC_W="$FIXPATH_SRC"
52985    FIXPATH_BIN_W="$FIXPATH_BIN"
52986
52987  unix_path="$FIXPATH_SRC_W"
52988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52989    windows_path=`$CYGPATH -m "$unix_path"`
52990    FIXPATH_SRC_W="$windows_path"
52991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52992    windows_path=`cmd //c echo $unix_path`
52993    FIXPATH_SRC_W="$windows_path"
52994  fi
52995
52996
52997  unix_path="$FIXPATH_BIN_W"
52998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52999    windows_path=`$CYGPATH -m "$unix_path"`
53000    FIXPATH_BIN_W="$windows_path"
53001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53002    windows_path=`cmd //c echo $unix_path`
53003    FIXPATH_BIN_W="$windows_path"
53004  fi
53005
53006    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53007    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53008    cd $FIXPATH_DIR
53009    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53010    cd $CURDIR
53011
53012    if test ! -x $FIXPATH_BIN; then
53013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53014$as_echo "no" >&6; }
53015      cat $FIXPATH_DIR/fixpath1.log
53016      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53017    fi
53018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53019$as_echo "yes" >&6; }
53020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53021$as_echo_n "checking if fixpath.exe works... " >&6; }
53022    cd $FIXPATH_DIR
53023    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53024        > $FIXPATH_DIR/fixpath2.log 2>&1
53025    cd $CURDIR
53026    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53028$as_echo "no" >&6; }
53029      cat $FIXPATH_DIR/fixpath2.log
53030      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53031    fi
53032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53033$as_echo "yes" >&6; }
53034
53035    FIXPATH_DETACH_FLAG="--detach"
53036  fi
53037
53038
53039
53040
53041
53042
53043  # Check if X11 is needed
53044  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53045    # No X11 support on windows or macosx
53046    NEEDS_LIB_X11=false
53047  else
53048    if test "x$SUPPORT_HEADFUL" = xno; then
53049      # No X11 support if building headless-only
53050      NEEDS_LIB_X11=false
53051    else
53052      # All other instances need X11
53053      NEEDS_LIB_X11=true
53054    fi
53055  fi
53056
53057  # Check if cups is needed
53058  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53059    # Windows have a separate print system
53060    NEEDS_LIB_CUPS=false
53061  else
53062    NEEDS_LIB_CUPS=true
53063  fi
53064
53065  # A custom hook may have set this already
53066  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53067    NEEDS_LIB_FREETYPE=true
53068  fi
53069
53070  # Check if alsa is needed
53071  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53072    NEEDS_LIB_ALSA=true
53073  else
53074    NEEDS_LIB_ALSA=false
53075  fi
53076
53077  # Check if ffi is needed
53078  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53079    NEEDS_LIB_FFI=true
53080  else
53081    NEEDS_LIB_FFI=false
53082  fi
53083
53084
53085  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53086  # dynamic build is configured on command line.
53087
53088# Check whether --with-stdc++lib was given.
53089if test "${with_stdc__lib+set}" = set; then :
53090  withval=$with_stdc__lib;
53091        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53092                && test "x$with_stdc__lib" != xdefault; then
53093          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53094        fi
53095
53096else
53097  with_stdc__lib=default
53098
53099fi
53100
53101
53102  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53103    # Test if -lstdc++ works.
53104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53105$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53106    ac_ext=cpp
53107ac_cpp='$CXXCPP $CPPFLAGS'
53108ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53109ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53110ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53111
53112    OLD_CXXFLAGS="$CXXFLAGS"
53113    CXXFLAGS="$CXXFLAGS -lstdc++"
53114    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53115/* end confdefs.h.  */
53116
53117int
53118main ()
53119{
53120return 0;
53121  ;
53122  return 0;
53123}
53124_ACEOF
53125if ac_fn_cxx_try_link "$LINENO"; then :
53126  has_dynamic_libstdcxx=yes
53127else
53128  has_dynamic_libstdcxx=no
53129fi
53130rm -f core conftest.err conftest.$ac_objext \
53131    conftest$ac_exeext conftest.$ac_ext
53132    CXXFLAGS="$OLD_CXXFLAGS"
53133    ac_ext=cpp
53134ac_cpp='$CXXCPP $CPPFLAGS'
53135ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53136ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53137ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53138
53139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53140$as_echo "$has_dynamic_libstdcxx" >&6; }
53141
53142    # Test if stdc++ can be linked statically.
53143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53144$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53145    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53146    ac_ext=cpp
53147ac_cpp='$CXXCPP $CPPFLAGS'
53148ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53149ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53150ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53151
53152    OLD_LIBS="$LIBS"
53153    OLD_CXX="$CXX"
53154    LIBS="$STATIC_STDCXX_FLAGS"
53155    CXX="$CC"
53156    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53157/* end confdefs.h.  */
53158
53159int
53160main ()
53161{
53162return 0;
53163  ;
53164  return 0;
53165}
53166_ACEOF
53167if ac_fn_cxx_try_link "$LINENO"; then :
53168  has_static_libstdcxx=yes
53169else
53170  has_static_libstdcxx=no
53171fi
53172rm -f core conftest.err conftest.$ac_objext \
53173    conftest$ac_exeext conftest.$ac_ext
53174    LIBS="$OLD_LIBS"
53175    CXX="$OLD_CXX"
53176    ac_ext=cpp
53177ac_cpp='$CXXCPP $CPPFLAGS'
53178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53181
53182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53183$as_echo "$has_static_libstdcxx" >&6; }
53184
53185    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53186      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53187    fi
53188
53189    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53190      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53191    fi
53192
53193    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53194      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53195    fi
53196
53197    # If dynamic was requested, it's available since it would fail above otherwise.
53198    # If dynamic wasn't requested, go with static unless it isn't available.
53199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53200$as_echo_n "checking how to link with libstdc++... " >&6; }
53201    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53202      LIBCXX="$LIBCXX -lstdc++"
53203      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53204      JVM_LIBS="-lstdc++ $JVM_LIBS"
53205      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53206      # just use the same setting as for the TARGET toolchain.
53207      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53208      LDCXX="$CXX"
53209      STATIC_CXX_SETTING="STATIC_CXX=false"
53210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53211$as_echo "dynamic" >&6; }
53212    else
53213      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53214      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53215      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53216      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53217      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53218      # just use the same setting as for the TARGET toolchain.
53219      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53220      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53221      LDCXX="$CC"
53222      STATIC_CXX_SETTING="STATIC_CXX=true"
53223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53224$as_echo "static" >&6; }
53225    fi
53226  fi
53227
53228
53229  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53230  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53231    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53232  fi
53233
53234  # TODO better (platform agnostic) test
53235  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53236    LIBCXX="-lstdc++"
53237  fi
53238
53239
53240  # Setup Windows runtime dlls
53241  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53242
53243
53244# Check whether --with-msvcr-dll was given.
53245if test "${with_msvcr_dll+set}" = set; then :
53246  withval=$with_msvcr_dll;
53247fi
53248
53249
53250  if test "x$with_msvcr_dll" != x; then
53251    # If given explicitely by user, do not probe. If not present, fail directly.
53252
53253  DLL_NAME="$MSVCR_NAME"
53254  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53255  METHOD="--with-msvcr-dll"
53256  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53257    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53258$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53259
53260    # Need to check if the found msvcr is correct architecture
53261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53262$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53263    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53265      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53266      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53267      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53268        CORRECT_MSVCR_ARCH="PE32 executable"
53269      else
53270        CORRECT_MSVCR_ARCH="PE32+ executable"
53271      fi
53272    else
53273      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53274        CORRECT_MSVCR_ARCH=386
53275      else
53276        CORRECT_MSVCR_ARCH=x86-64
53277      fi
53278    fi
53279    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53281$as_echo "ok" >&6; }
53282      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53283
53284  # Only process if variable expands to non-empty
53285
53286  if test "x$MSVC_DLL" != x; then
53287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53288
53289  # Input might be given as Windows format, start by converting to
53290  # unix format.
53291  path="$MSVC_DLL"
53292  new_path=`$CYGPATH -u "$path"`
53293
53294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53297  # "foo.exe" is OK but "foo" is an error.
53298  #
53299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53300  # It is also a way to make sure we got the proper file name for the real test later on.
53301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53302  if test "x$test_shortpath" = x; then
53303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53304$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53305    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53306  fi
53307
53308  # Call helper function which possibly converts this using DOS-style short mode.
53309  # If so, the updated path is stored in $new_path.
53310
53311  input_path="$new_path"
53312  # Check if we need to convert this using DOS-style short mode. If the path
53313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53314  # take no chances and rewrite it.
53315  # Note: m4 eats our [], so we need to use [ and ] instead.
53316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53317  if test "x$has_forbidden_chars" != x; then
53318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53322      # Going to short mode and back again did indeed matter. Since short mode is
53323      # case insensitive, let's make it lowercase to improve readability.
53324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53325      # Now convert it back to Unix-style (cygpath)
53326      input_path=`$CYGPATH -u "$shortmode_path"`
53327      new_path="$input_path"
53328    fi
53329  fi
53330
53331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53332  if test "x$test_cygdrive_prefix" = x; then
53333    # As a simple fix, exclude /usr/bin since it's not a real path.
53334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53336      # a path prefixed by /cygdrive for fixpath to work.
53337      new_path="$CYGWIN_ROOT_PATH$input_path"
53338    fi
53339  fi
53340
53341
53342  if test "x$path" != "x$new_path"; then
53343    MSVC_DLL="$new_path"
53344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53345$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53346  fi
53347
53348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53349
53350  path="$MSVC_DLL"
53351  has_colon=`$ECHO $path | $GREP ^.:`
53352  new_path="$path"
53353  if test "x$has_colon" = x; then
53354    # Not in mixed or Windows style, start by that.
53355    new_path=`cmd //c echo $path`
53356  fi
53357
53358
53359  input_path="$new_path"
53360  # Check if we need to convert this using DOS-style short mode. If the path
53361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53362  # take no chances and rewrite it.
53363  # Note: m4 eats our [], so we need to use [ and ] instead.
53364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53365  if test "x$has_forbidden_chars" != x; then
53366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53368  fi
53369
53370
53371  windows_path="$new_path"
53372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53373    unix_path=`$CYGPATH -u "$windows_path"`
53374    new_path="$unix_path"
53375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53377    new_path="$unix_path"
53378  fi
53379
53380  if test "x$path" != "x$new_path"; then
53381    MSVC_DLL="$new_path"
53382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53383$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53384  fi
53385
53386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53388
53389    else
53390      # We're on a unix platform. Hooray! :)
53391      path="$MSVC_DLL"
53392      has_space=`$ECHO "$path" | $GREP " "`
53393      if test "x$has_space" != x; then
53394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53395$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53397      fi
53398
53399      # Use eval to expand a potential ~
53400      eval path="$path"
53401      if test ! -f "$path" && test ! -d "$path"; then
53402        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53403      fi
53404
53405      if test -d "$path"; then
53406        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53407      else
53408        dir="`$DIRNAME "$path"`"
53409        base="`$BASENAME "$path"`"
53410        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53411      fi
53412    fi
53413  fi
53414
53415      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53416$as_echo_n "checking for $DLL_NAME... " >&6; }
53417      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53418$as_echo "$MSVC_DLL" >&6; }
53419    else
53420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53421$as_echo "incorrect, ignoring" >&6; }
53422      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53423$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53424    fi
53425  fi
53426
53427    if test "x$MSVC_DLL" = x; then
53428      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53429    fi
53430    MSVCR_DLL="$MSVC_DLL"
53431  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53432
53433  DLL_NAME="$MSVCR_NAME"
53434  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53435  METHOD="devkit"
53436  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53437    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53438$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53439
53440    # Need to check if the found msvcr is correct architecture
53441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53442$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53443    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53445      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53446      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53447      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53448        CORRECT_MSVCR_ARCH="PE32 executable"
53449      else
53450        CORRECT_MSVCR_ARCH="PE32+ executable"
53451      fi
53452    else
53453      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53454        CORRECT_MSVCR_ARCH=386
53455      else
53456        CORRECT_MSVCR_ARCH=x86-64
53457      fi
53458    fi
53459    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53461$as_echo "ok" >&6; }
53462      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53463
53464  # Only process if variable expands to non-empty
53465
53466  if test "x$MSVC_DLL" != x; then
53467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53468
53469  # Input might be given as Windows format, start by converting to
53470  # unix format.
53471  path="$MSVC_DLL"
53472  new_path=`$CYGPATH -u "$path"`
53473
53474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53477  # "foo.exe" is OK but "foo" is an error.
53478  #
53479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53480  # It is also a way to make sure we got the proper file name for the real test later on.
53481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53482  if test "x$test_shortpath" = x; then
53483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53484$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53485    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53486  fi
53487
53488  # Call helper function which possibly converts this using DOS-style short mode.
53489  # If so, the updated path is stored in $new_path.
53490
53491  input_path="$new_path"
53492  # Check if we need to convert this using DOS-style short mode. If the path
53493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53494  # take no chances and rewrite it.
53495  # Note: m4 eats our [], so we need to use [ and ] instead.
53496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53497  if test "x$has_forbidden_chars" != x; then
53498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53502      # Going to short mode and back again did indeed matter. Since short mode is
53503      # case insensitive, let's make it lowercase to improve readability.
53504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53505      # Now convert it back to Unix-style (cygpath)
53506      input_path=`$CYGPATH -u "$shortmode_path"`
53507      new_path="$input_path"
53508    fi
53509  fi
53510
53511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53512  if test "x$test_cygdrive_prefix" = x; then
53513    # As a simple fix, exclude /usr/bin since it's not a real path.
53514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53516      # a path prefixed by /cygdrive for fixpath to work.
53517      new_path="$CYGWIN_ROOT_PATH$input_path"
53518    fi
53519  fi
53520
53521
53522  if test "x$path" != "x$new_path"; then
53523    MSVC_DLL="$new_path"
53524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53525$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53526  fi
53527
53528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53529
53530  path="$MSVC_DLL"
53531  has_colon=`$ECHO $path | $GREP ^.:`
53532  new_path="$path"
53533  if test "x$has_colon" = x; then
53534    # Not in mixed or Windows style, start by that.
53535    new_path=`cmd //c echo $path`
53536  fi
53537
53538
53539  input_path="$new_path"
53540  # Check if we need to convert this using DOS-style short mode. If the path
53541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53542  # take no chances and rewrite it.
53543  # Note: m4 eats our [], so we need to use [ and ] instead.
53544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53545  if test "x$has_forbidden_chars" != x; then
53546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53548  fi
53549
53550
53551  windows_path="$new_path"
53552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53553    unix_path=`$CYGPATH -u "$windows_path"`
53554    new_path="$unix_path"
53555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53557    new_path="$unix_path"
53558  fi
53559
53560  if test "x$path" != "x$new_path"; then
53561    MSVC_DLL="$new_path"
53562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53563$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53564  fi
53565
53566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53568
53569    else
53570      # We're on a unix platform. Hooray! :)
53571      path="$MSVC_DLL"
53572      has_space=`$ECHO "$path" | $GREP " "`
53573      if test "x$has_space" != x; then
53574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53575$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53577      fi
53578
53579      # Use eval to expand a potential ~
53580      eval path="$path"
53581      if test ! -f "$path" && test ! -d "$path"; then
53582        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53583      fi
53584
53585      if test -d "$path"; then
53586        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53587      else
53588        dir="`$DIRNAME "$path"`"
53589        base="`$BASENAME "$path"`"
53590        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53591      fi
53592    fi
53593  fi
53594
53595      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53596$as_echo_n "checking for $DLL_NAME... " >&6; }
53597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53598$as_echo "$MSVC_DLL" >&6; }
53599    else
53600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53601$as_echo "incorrect, ignoring" >&6; }
53602      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53603$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53604    fi
53605  fi
53606
53607    if test "x$MSVC_DLL" = x; then
53608      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53609    fi
53610    MSVCR_DLL="$MSVC_DLL"
53611  else
53612
53613  DLL_NAME="${MSVCR_NAME}"
53614  MSVC_DLL=
53615
53616  if test "x$MSVC_DLL" = x; then
53617    # Probe: Using well-known location from Visual Studio 10.0
53618    if test "x$VCINSTALLDIR" != x; then
53619      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53620
53621  windows_path="$CYGWIN_VC_INSTALL_DIR"
53622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53623    unix_path=`$CYGPATH -u "$windows_path"`
53624    CYGWIN_VC_INSTALL_DIR="$unix_path"
53625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53627    CYGWIN_VC_INSTALL_DIR="$unix_path"
53628  fi
53629
53630      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53631        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53632      else
53633        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53634      fi
53635      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53636
53637  DLL_NAME="$DLL_NAME"
53638  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53639  METHOD="well-known location in VCINSTALLDIR"
53640  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53641    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53642$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53643
53644    # Need to check if the found msvcr is correct architecture
53645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53646$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53647    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53649      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53650      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53651      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53652        CORRECT_MSVCR_ARCH="PE32 executable"
53653      else
53654        CORRECT_MSVCR_ARCH="PE32+ executable"
53655      fi
53656    else
53657      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53658        CORRECT_MSVCR_ARCH=386
53659      else
53660        CORRECT_MSVCR_ARCH=x86-64
53661      fi
53662    fi
53663    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53665$as_echo "ok" >&6; }
53666      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53667
53668  # Only process if variable expands to non-empty
53669
53670  if test "x$MSVC_DLL" != x; then
53671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53672
53673  # Input might be given as Windows format, start by converting to
53674  # unix format.
53675  path="$MSVC_DLL"
53676  new_path=`$CYGPATH -u "$path"`
53677
53678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53681  # "foo.exe" is OK but "foo" is an error.
53682  #
53683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53684  # It is also a way to make sure we got the proper file name for the real test later on.
53685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53686  if test "x$test_shortpath" = x; then
53687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53688$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53689    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53690  fi
53691
53692  # Call helper function which possibly converts this using DOS-style short mode.
53693  # If so, the updated path is stored in $new_path.
53694
53695  input_path="$new_path"
53696  # Check if we need to convert this using DOS-style short mode. If the path
53697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53698  # take no chances and rewrite it.
53699  # Note: m4 eats our [], so we need to use [ and ] instead.
53700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53701  if test "x$has_forbidden_chars" != x; then
53702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53706      # Going to short mode and back again did indeed matter. Since short mode is
53707      # case insensitive, let's make it lowercase to improve readability.
53708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53709      # Now convert it back to Unix-style (cygpath)
53710      input_path=`$CYGPATH -u "$shortmode_path"`
53711      new_path="$input_path"
53712    fi
53713  fi
53714
53715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53716  if test "x$test_cygdrive_prefix" = x; then
53717    # As a simple fix, exclude /usr/bin since it's not a real path.
53718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53720      # a path prefixed by /cygdrive for fixpath to work.
53721      new_path="$CYGWIN_ROOT_PATH$input_path"
53722    fi
53723  fi
53724
53725
53726  if test "x$path" != "x$new_path"; then
53727    MSVC_DLL="$new_path"
53728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53729$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53730  fi
53731
53732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53733
53734  path="$MSVC_DLL"
53735  has_colon=`$ECHO $path | $GREP ^.:`
53736  new_path="$path"
53737  if test "x$has_colon" = x; then
53738    # Not in mixed or Windows style, start by that.
53739    new_path=`cmd //c echo $path`
53740  fi
53741
53742
53743  input_path="$new_path"
53744  # Check if we need to convert this using DOS-style short mode. If the path
53745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53746  # take no chances and rewrite it.
53747  # Note: m4 eats our [], so we need to use [ and ] instead.
53748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53749  if test "x$has_forbidden_chars" != x; then
53750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53752  fi
53753
53754
53755  windows_path="$new_path"
53756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53757    unix_path=`$CYGPATH -u "$windows_path"`
53758    new_path="$unix_path"
53759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53761    new_path="$unix_path"
53762  fi
53763
53764  if test "x$path" != "x$new_path"; then
53765    MSVC_DLL="$new_path"
53766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53767$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53768  fi
53769
53770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53772
53773    else
53774      # We're on a unix platform. Hooray! :)
53775      path="$MSVC_DLL"
53776      has_space=`$ECHO "$path" | $GREP " "`
53777      if test "x$has_space" != x; then
53778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53779$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53780        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53781      fi
53782
53783      # Use eval to expand a potential ~
53784      eval path="$path"
53785      if test ! -f "$path" && test ! -d "$path"; then
53786        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53787      fi
53788
53789      if test -d "$path"; then
53790        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53791      else
53792        dir="`$DIRNAME "$path"`"
53793        base="`$BASENAME "$path"`"
53794        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53795      fi
53796    fi
53797  fi
53798
53799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53800$as_echo_n "checking for $DLL_NAME... " >&6; }
53801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53802$as_echo "$MSVC_DLL" >&6; }
53803    else
53804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53805$as_echo "incorrect, ignoring" >&6; }
53806      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53807$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53808    fi
53809  fi
53810
53811    fi
53812  fi
53813
53814  if test "x$MSVC_DLL" = x; then
53815    # Probe: Check in the Boot JDK directory.
53816    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53817
53818  DLL_NAME="$DLL_NAME"
53819  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53820  METHOD="well-known location in Boot JDK"
53821  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53822    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53823$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53824
53825    # Need to check if the found msvcr is correct architecture
53826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53827$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53828    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53830      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53831      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53832      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53833        CORRECT_MSVCR_ARCH="PE32 executable"
53834      else
53835        CORRECT_MSVCR_ARCH="PE32+ executable"
53836      fi
53837    else
53838      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53839        CORRECT_MSVCR_ARCH=386
53840      else
53841        CORRECT_MSVCR_ARCH=x86-64
53842      fi
53843    fi
53844    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53846$as_echo "ok" >&6; }
53847      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53848
53849  # Only process if variable expands to non-empty
53850
53851  if test "x$MSVC_DLL" != x; then
53852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53853
53854  # Input might be given as Windows format, start by converting to
53855  # unix format.
53856  path="$MSVC_DLL"
53857  new_path=`$CYGPATH -u "$path"`
53858
53859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53862  # "foo.exe" is OK but "foo" is an error.
53863  #
53864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53865  # It is also a way to make sure we got the proper file name for the real test later on.
53866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53867  if test "x$test_shortpath" = x; then
53868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53869$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53870    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53871  fi
53872
53873  # Call helper function which possibly converts this using DOS-style short mode.
53874  # If so, the updated path is stored in $new_path.
53875
53876  input_path="$new_path"
53877  # Check if we need to convert this using DOS-style short mode. If the path
53878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53879  # take no chances and rewrite it.
53880  # Note: m4 eats our [], so we need to use [ and ] instead.
53881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53882  if test "x$has_forbidden_chars" != x; then
53883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53887      # Going to short mode and back again did indeed matter. Since short mode is
53888      # case insensitive, let's make it lowercase to improve readability.
53889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53890      # Now convert it back to Unix-style (cygpath)
53891      input_path=`$CYGPATH -u "$shortmode_path"`
53892      new_path="$input_path"
53893    fi
53894  fi
53895
53896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53897  if test "x$test_cygdrive_prefix" = x; then
53898    # As a simple fix, exclude /usr/bin since it's not a real path.
53899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53901      # a path prefixed by /cygdrive for fixpath to work.
53902      new_path="$CYGWIN_ROOT_PATH$input_path"
53903    fi
53904  fi
53905
53906
53907  if test "x$path" != "x$new_path"; then
53908    MSVC_DLL="$new_path"
53909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53910$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53911  fi
53912
53913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53914
53915  path="$MSVC_DLL"
53916  has_colon=`$ECHO $path | $GREP ^.:`
53917  new_path="$path"
53918  if test "x$has_colon" = x; then
53919    # Not in mixed or Windows style, start by that.
53920    new_path=`cmd //c echo $path`
53921  fi
53922
53923
53924  input_path="$new_path"
53925  # Check if we need to convert this using DOS-style short mode. If the path
53926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53927  # take no chances and rewrite it.
53928  # Note: m4 eats our [], so we need to use [ and ] instead.
53929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53930  if test "x$has_forbidden_chars" != x; then
53931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53933  fi
53934
53935
53936  windows_path="$new_path"
53937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53938    unix_path=`$CYGPATH -u "$windows_path"`
53939    new_path="$unix_path"
53940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53942    new_path="$unix_path"
53943  fi
53944
53945  if test "x$path" != "x$new_path"; then
53946    MSVC_DLL="$new_path"
53947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53948$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53949  fi
53950
53951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53953
53954    else
53955      # We're on a unix platform. Hooray! :)
53956      path="$MSVC_DLL"
53957      has_space=`$ECHO "$path" | $GREP " "`
53958      if test "x$has_space" != x; then
53959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53960$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53962      fi
53963
53964      # Use eval to expand a potential ~
53965      eval path="$path"
53966      if test ! -f "$path" && test ! -d "$path"; then
53967        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53968      fi
53969
53970      if test -d "$path"; then
53971        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53972      else
53973        dir="`$DIRNAME "$path"`"
53974        base="`$BASENAME "$path"`"
53975        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53976      fi
53977    fi
53978  fi
53979
53980      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53981$as_echo_n "checking for $DLL_NAME... " >&6; }
53982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53983$as_echo "$MSVC_DLL" >&6; }
53984    else
53985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53986$as_echo "incorrect, ignoring" >&6; }
53987      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53988$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53989    fi
53990  fi
53991
53992  fi
53993
53994  if test "x$MSVC_DLL" = x; then
53995    # Probe: Look in the Windows system32 directory
53996    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53997
53998  windows_path="$CYGWIN_SYSTEMROOT"
53999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54000    unix_path=`$CYGPATH -u "$windows_path"`
54001    CYGWIN_SYSTEMROOT="$unix_path"
54002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54004    CYGWIN_SYSTEMROOT="$unix_path"
54005  fi
54006
54007    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54008
54009  DLL_NAME="$DLL_NAME"
54010  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54011  METHOD="well-known location in SYSTEMROOT"
54012  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54013    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54014$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54015
54016    # Need to check if the found msvcr is correct architecture
54017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54018$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54019    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54021      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54022      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54023      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54024        CORRECT_MSVCR_ARCH="PE32 executable"
54025      else
54026        CORRECT_MSVCR_ARCH="PE32+ executable"
54027      fi
54028    else
54029      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54030        CORRECT_MSVCR_ARCH=386
54031      else
54032        CORRECT_MSVCR_ARCH=x86-64
54033      fi
54034    fi
54035    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54036      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54037$as_echo "ok" >&6; }
54038      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54039
54040  # Only process if variable expands to non-empty
54041
54042  if test "x$MSVC_DLL" != x; then
54043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54044
54045  # Input might be given as Windows format, start by converting to
54046  # unix format.
54047  path="$MSVC_DLL"
54048  new_path=`$CYGPATH -u "$path"`
54049
54050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54053  # "foo.exe" is OK but "foo" is an error.
54054  #
54055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54056  # It is also a way to make sure we got the proper file name for the real test later on.
54057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54058  if test "x$test_shortpath" = x; then
54059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54060$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54061    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54062  fi
54063
54064  # Call helper function which possibly converts this using DOS-style short mode.
54065  # If so, the updated path is stored in $new_path.
54066
54067  input_path="$new_path"
54068  # Check if we need to convert this using DOS-style short mode. If the path
54069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54070  # take no chances and rewrite it.
54071  # Note: m4 eats our [], so we need to use [ and ] instead.
54072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54073  if test "x$has_forbidden_chars" != x; then
54074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54078      # Going to short mode and back again did indeed matter. Since short mode is
54079      # case insensitive, let's make it lowercase to improve readability.
54080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54081      # Now convert it back to Unix-style (cygpath)
54082      input_path=`$CYGPATH -u "$shortmode_path"`
54083      new_path="$input_path"
54084    fi
54085  fi
54086
54087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54088  if test "x$test_cygdrive_prefix" = x; then
54089    # As a simple fix, exclude /usr/bin since it's not a real path.
54090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54092      # a path prefixed by /cygdrive for fixpath to work.
54093      new_path="$CYGWIN_ROOT_PATH$input_path"
54094    fi
54095  fi
54096
54097
54098  if test "x$path" != "x$new_path"; then
54099    MSVC_DLL="$new_path"
54100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54101$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54102  fi
54103
54104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54105
54106  path="$MSVC_DLL"
54107  has_colon=`$ECHO $path | $GREP ^.:`
54108  new_path="$path"
54109  if test "x$has_colon" = x; then
54110    # Not in mixed or Windows style, start by that.
54111    new_path=`cmd //c echo $path`
54112  fi
54113
54114
54115  input_path="$new_path"
54116  # Check if we need to convert this using DOS-style short mode. If the path
54117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54118  # take no chances and rewrite it.
54119  # Note: m4 eats our [], so we need to use [ and ] instead.
54120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54121  if test "x$has_forbidden_chars" != x; then
54122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54124  fi
54125
54126
54127  windows_path="$new_path"
54128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54129    unix_path=`$CYGPATH -u "$windows_path"`
54130    new_path="$unix_path"
54131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54133    new_path="$unix_path"
54134  fi
54135
54136  if test "x$path" != "x$new_path"; then
54137    MSVC_DLL="$new_path"
54138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54139$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54140  fi
54141
54142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54144
54145    else
54146      # We're on a unix platform. Hooray! :)
54147      path="$MSVC_DLL"
54148      has_space=`$ECHO "$path" | $GREP " "`
54149      if test "x$has_space" != x; then
54150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54151$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54153      fi
54154
54155      # Use eval to expand a potential ~
54156      eval path="$path"
54157      if test ! -f "$path" && test ! -d "$path"; then
54158        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54159      fi
54160
54161      if test -d "$path"; then
54162        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54163      else
54164        dir="`$DIRNAME "$path"`"
54165        base="`$BASENAME "$path"`"
54166        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54167      fi
54168    fi
54169  fi
54170
54171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54172$as_echo_n "checking for $DLL_NAME... " >&6; }
54173      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54174$as_echo "$MSVC_DLL" >&6; }
54175    else
54176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54177$as_echo "incorrect, ignoring" >&6; }
54178      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54179$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54180    fi
54181  fi
54182
54183  fi
54184
54185  if test "x$MSVC_DLL" = x; then
54186    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54187    if test "x$VS100COMNTOOLS" != x; then
54188      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54189
54190  windows_path="$CYGWIN_VS_TOOLS_DIR"
54191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54192    unix_path=`$CYGPATH -u "$windows_path"`
54193    CYGWIN_VS_TOOLS_DIR="$unix_path"
54194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54196    CYGWIN_VS_TOOLS_DIR="$unix_path"
54197  fi
54198
54199      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54200        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54201	    | $GREP -i /x64/ | $HEAD --lines 1`
54202      else
54203        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54204	    | $GREP -i /x86/ | $HEAD --lines 1`
54205      fi
54206
54207  DLL_NAME="$DLL_NAME"
54208  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54209  METHOD="search of VS100COMNTOOLS"
54210  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54211    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54212$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54213
54214    # Need to check if the found msvcr is correct architecture
54215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54216$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54217    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54219      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54220      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54221      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54222        CORRECT_MSVCR_ARCH="PE32 executable"
54223      else
54224        CORRECT_MSVCR_ARCH="PE32+ executable"
54225      fi
54226    else
54227      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54228        CORRECT_MSVCR_ARCH=386
54229      else
54230        CORRECT_MSVCR_ARCH=x86-64
54231      fi
54232    fi
54233    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54235$as_echo "ok" >&6; }
54236      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54237
54238  # Only process if variable expands to non-empty
54239
54240  if test "x$MSVC_DLL" != x; then
54241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54242
54243  # Input might be given as Windows format, start by converting to
54244  # unix format.
54245  path="$MSVC_DLL"
54246  new_path=`$CYGPATH -u "$path"`
54247
54248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54251  # "foo.exe" is OK but "foo" is an error.
54252  #
54253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54254  # It is also a way to make sure we got the proper file name for the real test later on.
54255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54256  if test "x$test_shortpath" = x; then
54257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54258$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54259    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54260  fi
54261
54262  # Call helper function which possibly converts this using DOS-style short mode.
54263  # If so, the updated path is stored in $new_path.
54264
54265  input_path="$new_path"
54266  # Check if we need to convert this using DOS-style short mode. If the path
54267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54268  # take no chances and rewrite it.
54269  # Note: m4 eats our [], so we need to use [ and ] instead.
54270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54271  if test "x$has_forbidden_chars" != x; then
54272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54276      # Going to short mode and back again did indeed matter. Since short mode is
54277      # case insensitive, let's make it lowercase to improve readability.
54278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54279      # Now convert it back to Unix-style (cygpath)
54280      input_path=`$CYGPATH -u "$shortmode_path"`
54281      new_path="$input_path"
54282    fi
54283  fi
54284
54285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54286  if test "x$test_cygdrive_prefix" = x; then
54287    # As a simple fix, exclude /usr/bin since it's not a real path.
54288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54290      # a path prefixed by /cygdrive for fixpath to work.
54291      new_path="$CYGWIN_ROOT_PATH$input_path"
54292    fi
54293  fi
54294
54295
54296  if test "x$path" != "x$new_path"; then
54297    MSVC_DLL="$new_path"
54298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54299$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54300  fi
54301
54302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54303
54304  path="$MSVC_DLL"
54305  has_colon=`$ECHO $path | $GREP ^.:`
54306  new_path="$path"
54307  if test "x$has_colon" = x; then
54308    # Not in mixed or Windows style, start by that.
54309    new_path=`cmd //c echo $path`
54310  fi
54311
54312
54313  input_path="$new_path"
54314  # Check if we need to convert this using DOS-style short mode. If the path
54315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54316  # take no chances and rewrite it.
54317  # Note: m4 eats our [], so we need to use [ and ] instead.
54318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54319  if test "x$has_forbidden_chars" != x; then
54320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54322  fi
54323
54324
54325  windows_path="$new_path"
54326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54327    unix_path=`$CYGPATH -u "$windows_path"`
54328    new_path="$unix_path"
54329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54331    new_path="$unix_path"
54332  fi
54333
54334  if test "x$path" != "x$new_path"; then
54335    MSVC_DLL="$new_path"
54336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54337$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54338  fi
54339
54340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54342
54343    else
54344      # We're on a unix platform. Hooray! :)
54345      path="$MSVC_DLL"
54346      has_space=`$ECHO "$path" | $GREP " "`
54347      if test "x$has_space" != x; then
54348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54349$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54350        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54351      fi
54352
54353      # Use eval to expand a potential ~
54354      eval path="$path"
54355      if test ! -f "$path" && test ! -d "$path"; then
54356        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54357      fi
54358
54359      if test -d "$path"; then
54360        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54361      else
54362        dir="`$DIRNAME "$path"`"
54363        base="`$BASENAME "$path"`"
54364        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54365      fi
54366    fi
54367  fi
54368
54369      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54370$as_echo_n "checking for $DLL_NAME... " >&6; }
54371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54372$as_echo "$MSVC_DLL" >&6; }
54373    else
54374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54375$as_echo "incorrect, ignoring" >&6; }
54376      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54377$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54378    fi
54379  fi
54380
54381    fi
54382  fi
54383
54384  if test "x$MSVC_DLL" = x; then
54385    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54386    # (This was the original behaviour; kept since it might turn something up)
54387    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54388      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54389        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54390	    | $GREP x64 | $HEAD --lines 1`
54391      else
54392        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54393	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54394        if test "x$POSSIBLE_MSVC_DLL" = x; then
54395          # We're grasping at straws now...
54396          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54397	      | $HEAD --lines 1`
54398        fi
54399      fi
54400
54401
54402  DLL_NAME="$DLL_NAME"
54403  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54404  METHOD="search of VCINSTALLDIR"
54405  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54406    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54407$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54408
54409    # Need to check if the found msvcr is correct architecture
54410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54411$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54412    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54414      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54415      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54416      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54417        CORRECT_MSVCR_ARCH="PE32 executable"
54418      else
54419        CORRECT_MSVCR_ARCH="PE32+ executable"
54420      fi
54421    else
54422      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54423        CORRECT_MSVCR_ARCH=386
54424      else
54425        CORRECT_MSVCR_ARCH=x86-64
54426      fi
54427    fi
54428    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54430$as_echo "ok" >&6; }
54431      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54432
54433  # Only process if variable expands to non-empty
54434
54435  if test "x$MSVC_DLL" != x; then
54436    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54437
54438  # Input might be given as Windows format, start by converting to
54439  # unix format.
54440  path="$MSVC_DLL"
54441  new_path=`$CYGPATH -u "$path"`
54442
54443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54446  # "foo.exe" is OK but "foo" is an error.
54447  #
54448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54449  # It is also a way to make sure we got the proper file name for the real test later on.
54450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54451  if test "x$test_shortpath" = x; then
54452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54453$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54454    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54455  fi
54456
54457  # Call helper function which possibly converts this using DOS-style short mode.
54458  # If so, the updated path is stored in $new_path.
54459
54460  input_path="$new_path"
54461  # Check if we need to convert this using DOS-style short mode. If the path
54462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54463  # take no chances and rewrite it.
54464  # Note: m4 eats our [], so we need to use [ and ] instead.
54465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54466  if test "x$has_forbidden_chars" != x; then
54467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54471      # Going to short mode and back again did indeed matter. Since short mode is
54472      # case insensitive, let's make it lowercase to improve readability.
54473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54474      # Now convert it back to Unix-style (cygpath)
54475      input_path=`$CYGPATH -u "$shortmode_path"`
54476      new_path="$input_path"
54477    fi
54478  fi
54479
54480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54481  if test "x$test_cygdrive_prefix" = x; then
54482    # As a simple fix, exclude /usr/bin since it's not a real path.
54483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54485      # a path prefixed by /cygdrive for fixpath to work.
54486      new_path="$CYGWIN_ROOT_PATH$input_path"
54487    fi
54488  fi
54489
54490
54491  if test "x$path" != "x$new_path"; then
54492    MSVC_DLL="$new_path"
54493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54494$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54495  fi
54496
54497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54498
54499  path="$MSVC_DLL"
54500  has_colon=`$ECHO $path | $GREP ^.:`
54501  new_path="$path"
54502  if test "x$has_colon" = x; then
54503    # Not in mixed or Windows style, start by that.
54504    new_path=`cmd //c echo $path`
54505  fi
54506
54507
54508  input_path="$new_path"
54509  # Check if we need to convert this using DOS-style short mode. If the path
54510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54511  # take no chances and rewrite it.
54512  # Note: m4 eats our [], so we need to use [ and ] instead.
54513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54514  if test "x$has_forbidden_chars" != x; then
54515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54517  fi
54518
54519
54520  windows_path="$new_path"
54521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54522    unix_path=`$CYGPATH -u "$windows_path"`
54523    new_path="$unix_path"
54524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54526    new_path="$unix_path"
54527  fi
54528
54529  if test "x$path" != "x$new_path"; then
54530    MSVC_DLL="$new_path"
54531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54532$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54533  fi
54534
54535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54537
54538    else
54539      # We're on a unix platform. Hooray! :)
54540      path="$MSVC_DLL"
54541      has_space=`$ECHO "$path" | $GREP " "`
54542      if test "x$has_space" != x; then
54543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54544$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54545        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54546      fi
54547
54548      # Use eval to expand a potential ~
54549      eval path="$path"
54550      if test ! -f "$path" && test ! -d "$path"; then
54551        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54552      fi
54553
54554      if test -d "$path"; then
54555        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54556      else
54557        dir="`$DIRNAME "$path"`"
54558        base="`$BASENAME "$path"`"
54559        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54560      fi
54561    fi
54562  fi
54563
54564      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54565$as_echo_n "checking for $DLL_NAME... " >&6; }
54566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54567$as_echo "$MSVC_DLL" >&6; }
54568    else
54569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54570$as_echo "incorrect, ignoring" >&6; }
54571      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54572$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54573    fi
54574  fi
54575
54576    fi
54577  fi
54578
54579  if test "x$MSVC_DLL" = x; then
54580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54581$as_echo_n "checking for $DLL_NAME... " >&6; }
54582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54583$as_echo "no" >&6; }
54584    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54585  fi
54586
54587    MSVCR_DLL="$MSVC_DLL"
54588  fi
54589
54590
54591
54592# Check whether --with-msvcp-dll was given.
54593if test "${with_msvcp_dll+set}" = set; then :
54594  withval=$with_msvcp_dll;
54595fi
54596
54597
54598  if test "x$MSVCP_NAME" != "x"; then
54599    if test "x$with_msvcp_dll" != x; then
54600      # If given explicitely by user, do not probe. If not present, fail directly.
54601
54602  DLL_NAME="$MSVCP_NAME"
54603  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54604  METHOD="--with-msvcp-dll"
54605  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54606    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54607$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54608
54609    # Need to check if the found msvcr is correct architecture
54610    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54611$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54612    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54614      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54615      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54616      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54617        CORRECT_MSVCR_ARCH="PE32 executable"
54618      else
54619        CORRECT_MSVCR_ARCH="PE32+ executable"
54620      fi
54621    else
54622      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54623        CORRECT_MSVCR_ARCH=386
54624      else
54625        CORRECT_MSVCR_ARCH=x86-64
54626      fi
54627    fi
54628    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54630$as_echo "ok" >&6; }
54631      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54632
54633  # Only process if variable expands to non-empty
54634
54635  if test "x$MSVC_DLL" != x; then
54636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54637
54638  # Input might be given as Windows format, start by converting to
54639  # unix format.
54640  path="$MSVC_DLL"
54641  new_path=`$CYGPATH -u "$path"`
54642
54643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54646  # "foo.exe" is OK but "foo" is an error.
54647  #
54648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54649  # It is also a way to make sure we got the proper file name for the real test later on.
54650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54651  if test "x$test_shortpath" = x; then
54652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54653$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54654    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54655  fi
54656
54657  # Call helper function which possibly converts this using DOS-style short mode.
54658  # If so, the updated path is stored in $new_path.
54659
54660  input_path="$new_path"
54661  # Check if we need to convert this using DOS-style short mode. If the path
54662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54663  # take no chances and rewrite it.
54664  # Note: m4 eats our [], so we need to use [ and ] instead.
54665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54666  if test "x$has_forbidden_chars" != x; then
54667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54671      # Going to short mode and back again did indeed matter. Since short mode is
54672      # case insensitive, let's make it lowercase to improve readability.
54673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54674      # Now convert it back to Unix-style (cygpath)
54675      input_path=`$CYGPATH -u "$shortmode_path"`
54676      new_path="$input_path"
54677    fi
54678  fi
54679
54680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54681  if test "x$test_cygdrive_prefix" = x; then
54682    # As a simple fix, exclude /usr/bin since it's not a real path.
54683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54685      # a path prefixed by /cygdrive for fixpath to work.
54686      new_path="$CYGWIN_ROOT_PATH$input_path"
54687    fi
54688  fi
54689
54690
54691  if test "x$path" != "x$new_path"; then
54692    MSVC_DLL="$new_path"
54693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54694$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54695  fi
54696
54697    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54698
54699  path="$MSVC_DLL"
54700  has_colon=`$ECHO $path | $GREP ^.:`
54701  new_path="$path"
54702  if test "x$has_colon" = x; then
54703    # Not in mixed or Windows style, start by that.
54704    new_path=`cmd //c echo $path`
54705  fi
54706
54707
54708  input_path="$new_path"
54709  # Check if we need to convert this using DOS-style short mode. If the path
54710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54711  # take no chances and rewrite it.
54712  # Note: m4 eats our [], so we need to use [ and ] instead.
54713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54714  if test "x$has_forbidden_chars" != x; then
54715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54717  fi
54718
54719
54720  windows_path="$new_path"
54721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54722    unix_path=`$CYGPATH -u "$windows_path"`
54723    new_path="$unix_path"
54724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54726    new_path="$unix_path"
54727  fi
54728
54729  if test "x$path" != "x$new_path"; then
54730    MSVC_DLL="$new_path"
54731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54732$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54733  fi
54734
54735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54737
54738    else
54739      # We're on a unix platform. Hooray! :)
54740      path="$MSVC_DLL"
54741      has_space=`$ECHO "$path" | $GREP " "`
54742      if test "x$has_space" != x; then
54743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54744$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54745        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54746      fi
54747
54748      # Use eval to expand a potential ~
54749      eval path="$path"
54750      if test ! -f "$path" && test ! -d "$path"; then
54751        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54752      fi
54753
54754      if test -d "$path"; then
54755        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54756      else
54757        dir="`$DIRNAME "$path"`"
54758        base="`$BASENAME "$path"`"
54759        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54760      fi
54761    fi
54762  fi
54763
54764      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54765$as_echo_n "checking for $DLL_NAME... " >&6; }
54766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54767$as_echo "$MSVC_DLL" >&6; }
54768    else
54769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54770$as_echo "incorrect, ignoring" >&6; }
54771      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54772$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54773    fi
54774  fi
54775
54776      if test "x$MSVC_DLL" = x; then
54777        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54778      fi
54779      MSVCP_DLL="$MSVC_DLL"
54780    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54781
54782  DLL_NAME="$MSVCP_NAME"
54783  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54784  METHOD="devkit"
54785  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54786    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54787$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54788
54789    # Need to check if the found msvcr is correct architecture
54790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54791$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54792    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54794      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54795      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54796      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54797        CORRECT_MSVCR_ARCH="PE32 executable"
54798      else
54799        CORRECT_MSVCR_ARCH="PE32+ executable"
54800      fi
54801    else
54802      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54803        CORRECT_MSVCR_ARCH=386
54804      else
54805        CORRECT_MSVCR_ARCH=x86-64
54806      fi
54807    fi
54808    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54810$as_echo "ok" >&6; }
54811      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54812
54813  # Only process if variable expands to non-empty
54814
54815  if test "x$MSVC_DLL" != x; then
54816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54817
54818  # Input might be given as Windows format, start by converting to
54819  # unix format.
54820  path="$MSVC_DLL"
54821  new_path=`$CYGPATH -u "$path"`
54822
54823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54826  # "foo.exe" is OK but "foo" is an error.
54827  #
54828  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54829  # It is also a way to make sure we got the proper file name for the real test later on.
54830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54831  if test "x$test_shortpath" = x; then
54832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54833$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54834    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54835  fi
54836
54837  # Call helper function which possibly converts this using DOS-style short mode.
54838  # If so, the updated path is stored in $new_path.
54839
54840  input_path="$new_path"
54841  # Check if we need to convert this using DOS-style short mode. If the path
54842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54843  # take no chances and rewrite it.
54844  # Note: m4 eats our [], so we need to use [ and ] instead.
54845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54846  if test "x$has_forbidden_chars" != x; then
54847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54851      # Going to short mode and back again did indeed matter. Since short mode is
54852      # case insensitive, let's make it lowercase to improve readability.
54853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54854      # Now convert it back to Unix-style (cygpath)
54855      input_path=`$CYGPATH -u "$shortmode_path"`
54856      new_path="$input_path"
54857    fi
54858  fi
54859
54860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54861  if test "x$test_cygdrive_prefix" = x; then
54862    # As a simple fix, exclude /usr/bin since it's not a real path.
54863    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54865      # a path prefixed by /cygdrive for fixpath to work.
54866      new_path="$CYGWIN_ROOT_PATH$input_path"
54867    fi
54868  fi
54869
54870
54871  if test "x$path" != "x$new_path"; then
54872    MSVC_DLL="$new_path"
54873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54874$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54875  fi
54876
54877    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54878
54879  path="$MSVC_DLL"
54880  has_colon=`$ECHO $path | $GREP ^.:`
54881  new_path="$path"
54882  if test "x$has_colon" = x; then
54883    # Not in mixed or Windows style, start by that.
54884    new_path=`cmd //c echo $path`
54885  fi
54886
54887
54888  input_path="$new_path"
54889  # Check if we need to convert this using DOS-style short mode. If the path
54890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54891  # take no chances and rewrite it.
54892  # Note: m4 eats our [], so we need to use [ and ] instead.
54893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54894  if test "x$has_forbidden_chars" != x; then
54895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54897  fi
54898
54899
54900  windows_path="$new_path"
54901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54902    unix_path=`$CYGPATH -u "$windows_path"`
54903    new_path="$unix_path"
54904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54906    new_path="$unix_path"
54907  fi
54908
54909  if test "x$path" != "x$new_path"; then
54910    MSVC_DLL="$new_path"
54911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54912$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54913  fi
54914
54915  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54916  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54917
54918    else
54919      # We're on a unix platform. Hooray! :)
54920      path="$MSVC_DLL"
54921      has_space=`$ECHO "$path" | $GREP " "`
54922      if test "x$has_space" != x; then
54923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54924$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54925        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54926      fi
54927
54928      # Use eval to expand a potential ~
54929      eval path="$path"
54930      if test ! -f "$path" && test ! -d "$path"; then
54931        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54932      fi
54933
54934      if test -d "$path"; then
54935        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54936      else
54937        dir="`$DIRNAME "$path"`"
54938        base="`$BASENAME "$path"`"
54939        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54940      fi
54941    fi
54942  fi
54943
54944      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54945$as_echo_n "checking for $DLL_NAME... " >&6; }
54946      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54947$as_echo "$MSVC_DLL" >&6; }
54948    else
54949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54950$as_echo "incorrect, ignoring" >&6; }
54951      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54952$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54953    fi
54954  fi
54955
54956      if test "x$MSVC_DLL" = x; then
54957        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54958      fi
54959      MSVCP_DLL="$MSVC_DLL"
54960    else
54961
54962  DLL_NAME="${MSVCP_NAME}"
54963  MSVC_DLL=
54964
54965  if test "x$MSVC_DLL" = x; then
54966    # Probe: Using well-known location from Visual Studio 10.0
54967    if test "x$VCINSTALLDIR" != x; then
54968      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54969
54970  windows_path="$CYGWIN_VC_INSTALL_DIR"
54971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54972    unix_path=`$CYGPATH -u "$windows_path"`
54973    CYGWIN_VC_INSTALL_DIR="$unix_path"
54974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54976    CYGWIN_VC_INSTALL_DIR="$unix_path"
54977  fi
54978
54979      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54980        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54981      else
54982        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54983      fi
54984      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54985
54986  DLL_NAME="$DLL_NAME"
54987  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54988  METHOD="well-known location in VCINSTALLDIR"
54989  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54990    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54991$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54992
54993    # Need to check if the found msvcr is correct architecture
54994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54995$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54996    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54998      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54999      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55000      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55001        CORRECT_MSVCR_ARCH="PE32 executable"
55002      else
55003        CORRECT_MSVCR_ARCH="PE32+ executable"
55004      fi
55005    else
55006      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55007        CORRECT_MSVCR_ARCH=386
55008      else
55009        CORRECT_MSVCR_ARCH=x86-64
55010      fi
55011    fi
55012    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55014$as_echo "ok" >&6; }
55015      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55016
55017  # Only process if variable expands to non-empty
55018
55019  if test "x$MSVC_DLL" != x; then
55020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55021
55022  # Input might be given as Windows format, start by converting to
55023  # unix format.
55024  path="$MSVC_DLL"
55025  new_path=`$CYGPATH -u "$path"`
55026
55027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55030  # "foo.exe" is OK but "foo" is an error.
55031  #
55032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55033  # It is also a way to make sure we got the proper file name for the real test later on.
55034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55035  if test "x$test_shortpath" = x; then
55036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55037$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55038    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55039  fi
55040
55041  # Call helper function which possibly converts this using DOS-style short mode.
55042  # If so, the updated path is stored in $new_path.
55043
55044  input_path="$new_path"
55045  # Check if we need to convert this using DOS-style short mode. If the path
55046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55047  # take no chances and rewrite it.
55048  # Note: m4 eats our [], so we need to use [ and ] instead.
55049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55050  if test "x$has_forbidden_chars" != x; then
55051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55055      # Going to short mode and back again did indeed matter. Since short mode is
55056      # case insensitive, let's make it lowercase to improve readability.
55057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55058      # Now convert it back to Unix-style (cygpath)
55059      input_path=`$CYGPATH -u "$shortmode_path"`
55060      new_path="$input_path"
55061    fi
55062  fi
55063
55064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55065  if test "x$test_cygdrive_prefix" = x; then
55066    # As a simple fix, exclude /usr/bin since it's not a real path.
55067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55069      # a path prefixed by /cygdrive for fixpath to work.
55070      new_path="$CYGWIN_ROOT_PATH$input_path"
55071    fi
55072  fi
55073
55074
55075  if test "x$path" != "x$new_path"; then
55076    MSVC_DLL="$new_path"
55077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55078$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55079  fi
55080
55081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55082
55083  path="$MSVC_DLL"
55084  has_colon=`$ECHO $path | $GREP ^.:`
55085  new_path="$path"
55086  if test "x$has_colon" = x; then
55087    # Not in mixed or Windows style, start by that.
55088    new_path=`cmd //c echo $path`
55089  fi
55090
55091
55092  input_path="$new_path"
55093  # Check if we need to convert this using DOS-style short mode. If the path
55094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55095  # take no chances and rewrite it.
55096  # Note: m4 eats our [], so we need to use [ and ] instead.
55097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55098  if test "x$has_forbidden_chars" != x; then
55099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55101  fi
55102
55103
55104  windows_path="$new_path"
55105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55106    unix_path=`$CYGPATH -u "$windows_path"`
55107    new_path="$unix_path"
55108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55110    new_path="$unix_path"
55111  fi
55112
55113  if test "x$path" != "x$new_path"; then
55114    MSVC_DLL="$new_path"
55115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55116$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55117  fi
55118
55119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55121
55122    else
55123      # We're on a unix platform. Hooray! :)
55124      path="$MSVC_DLL"
55125      has_space=`$ECHO "$path" | $GREP " "`
55126      if test "x$has_space" != x; then
55127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55128$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55130      fi
55131
55132      # Use eval to expand a potential ~
55133      eval path="$path"
55134      if test ! -f "$path" && test ! -d "$path"; then
55135        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55136      fi
55137
55138      if test -d "$path"; then
55139        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55140      else
55141        dir="`$DIRNAME "$path"`"
55142        base="`$BASENAME "$path"`"
55143        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55144      fi
55145    fi
55146  fi
55147
55148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55149$as_echo_n "checking for $DLL_NAME... " >&6; }
55150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55151$as_echo "$MSVC_DLL" >&6; }
55152    else
55153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55154$as_echo "incorrect, ignoring" >&6; }
55155      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55156$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55157    fi
55158  fi
55159
55160    fi
55161  fi
55162
55163  if test "x$MSVC_DLL" = x; then
55164    # Probe: Check in the Boot JDK directory.
55165    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55166
55167  DLL_NAME="$DLL_NAME"
55168  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55169  METHOD="well-known location in Boot JDK"
55170  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55171    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55172$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55173
55174    # Need to check if the found msvcr is correct architecture
55175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55176$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55177    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55179      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55180      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55181      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55182        CORRECT_MSVCR_ARCH="PE32 executable"
55183      else
55184        CORRECT_MSVCR_ARCH="PE32+ executable"
55185      fi
55186    else
55187      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55188        CORRECT_MSVCR_ARCH=386
55189      else
55190        CORRECT_MSVCR_ARCH=x86-64
55191      fi
55192    fi
55193    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55195$as_echo "ok" >&6; }
55196      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55197
55198  # Only process if variable expands to non-empty
55199
55200  if test "x$MSVC_DLL" != x; then
55201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55202
55203  # Input might be given as Windows format, start by converting to
55204  # unix format.
55205  path="$MSVC_DLL"
55206  new_path=`$CYGPATH -u "$path"`
55207
55208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55211  # "foo.exe" is OK but "foo" is an error.
55212  #
55213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55214  # It is also a way to make sure we got the proper file name for the real test later on.
55215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55216  if test "x$test_shortpath" = x; then
55217    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55218$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55219    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55220  fi
55221
55222  # Call helper function which possibly converts this using DOS-style short mode.
55223  # If so, the updated path is stored in $new_path.
55224
55225  input_path="$new_path"
55226  # Check if we need to convert this using DOS-style short mode. If the path
55227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55228  # take no chances and rewrite it.
55229  # Note: m4 eats our [], so we need to use [ and ] instead.
55230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55231  if test "x$has_forbidden_chars" != x; then
55232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55236      # Going to short mode and back again did indeed matter. Since short mode is
55237      # case insensitive, let's make it lowercase to improve readability.
55238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55239      # Now convert it back to Unix-style (cygpath)
55240      input_path=`$CYGPATH -u "$shortmode_path"`
55241      new_path="$input_path"
55242    fi
55243  fi
55244
55245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55246  if test "x$test_cygdrive_prefix" = x; then
55247    # As a simple fix, exclude /usr/bin since it's not a real path.
55248    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55250      # a path prefixed by /cygdrive for fixpath to work.
55251      new_path="$CYGWIN_ROOT_PATH$input_path"
55252    fi
55253  fi
55254
55255
55256  if test "x$path" != "x$new_path"; then
55257    MSVC_DLL="$new_path"
55258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55259$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55260  fi
55261
55262    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55263
55264  path="$MSVC_DLL"
55265  has_colon=`$ECHO $path | $GREP ^.:`
55266  new_path="$path"
55267  if test "x$has_colon" = x; then
55268    # Not in mixed or Windows style, start by that.
55269    new_path=`cmd //c echo $path`
55270  fi
55271
55272
55273  input_path="$new_path"
55274  # Check if we need to convert this using DOS-style short mode. If the path
55275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55276  # take no chances and rewrite it.
55277  # Note: m4 eats our [], so we need to use [ and ] instead.
55278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55279  if test "x$has_forbidden_chars" != x; then
55280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55282  fi
55283
55284
55285  windows_path="$new_path"
55286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55287    unix_path=`$CYGPATH -u "$windows_path"`
55288    new_path="$unix_path"
55289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55291    new_path="$unix_path"
55292  fi
55293
55294  if test "x$path" != "x$new_path"; then
55295    MSVC_DLL="$new_path"
55296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55297$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55298  fi
55299
55300  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55301  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55302
55303    else
55304      # We're on a unix platform. Hooray! :)
55305      path="$MSVC_DLL"
55306      has_space=`$ECHO "$path" | $GREP " "`
55307      if test "x$has_space" != x; then
55308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55309$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55310        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55311      fi
55312
55313      # Use eval to expand a potential ~
55314      eval path="$path"
55315      if test ! -f "$path" && test ! -d "$path"; then
55316        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55317      fi
55318
55319      if test -d "$path"; then
55320        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55321      else
55322        dir="`$DIRNAME "$path"`"
55323        base="`$BASENAME "$path"`"
55324        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55325      fi
55326    fi
55327  fi
55328
55329      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55330$as_echo_n "checking for $DLL_NAME... " >&6; }
55331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55332$as_echo "$MSVC_DLL" >&6; }
55333    else
55334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55335$as_echo "incorrect, ignoring" >&6; }
55336      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55337$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55338    fi
55339  fi
55340
55341  fi
55342
55343  if test "x$MSVC_DLL" = x; then
55344    # Probe: Look in the Windows system32 directory
55345    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55346
55347  windows_path="$CYGWIN_SYSTEMROOT"
55348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55349    unix_path=`$CYGPATH -u "$windows_path"`
55350    CYGWIN_SYSTEMROOT="$unix_path"
55351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55353    CYGWIN_SYSTEMROOT="$unix_path"
55354  fi
55355
55356    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55357
55358  DLL_NAME="$DLL_NAME"
55359  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55360  METHOD="well-known location in SYSTEMROOT"
55361  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55362    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55363$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55364
55365    # Need to check if the found msvcr is correct architecture
55366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55367$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55368    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55370      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55371      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55372      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55373        CORRECT_MSVCR_ARCH="PE32 executable"
55374      else
55375        CORRECT_MSVCR_ARCH="PE32+ executable"
55376      fi
55377    else
55378      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55379        CORRECT_MSVCR_ARCH=386
55380      else
55381        CORRECT_MSVCR_ARCH=x86-64
55382      fi
55383    fi
55384    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55386$as_echo "ok" >&6; }
55387      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55388
55389  # Only process if variable expands to non-empty
55390
55391  if test "x$MSVC_DLL" != x; then
55392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55393
55394  # Input might be given as Windows format, start by converting to
55395  # unix format.
55396  path="$MSVC_DLL"
55397  new_path=`$CYGPATH -u "$path"`
55398
55399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55402  # "foo.exe" is OK but "foo" is an error.
55403  #
55404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55405  # It is also a way to make sure we got the proper file name for the real test later on.
55406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55407  if test "x$test_shortpath" = x; then
55408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55409$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55410    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55411  fi
55412
55413  # Call helper function which possibly converts this using DOS-style short mode.
55414  # If so, the updated path is stored in $new_path.
55415
55416  input_path="$new_path"
55417  # Check if we need to convert this using DOS-style short mode. If the path
55418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55419  # take no chances and rewrite it.
55420  # Note: m4 eats our [], so we need to use [ and ] instead.
55421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55422  if test "x$has_forbidden_chars" != x; then
55423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55427      # Going to short mode and back again did indeed matter. Since short mode is
55428      # case insensitive, let's make it lowercase to improve readability.
55429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55430      # Now convert it back to Unix-style (cygpath)
55431      input_path=`$CYGPATH -u "$shortmode_path"`
55432      new_path="$input_path"
55433    fi
55434  fi
55435
55436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55437  if test "x$test_cygdrive_prefix" = x; then
55438    # As a simple fix, exclude /usr/bin since it's not a real path.
55439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55441      # a path prefixed by /cygdrive for fixpath to work.
55442      new_path="$CYGWIN_ROOT_PATH$input_path"
55443    fi
55444  fi
55445
55446
55447  if test "x$path" != "x$new_path"; then
55448    MSVC_DLL="$new_path"
55449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55450$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55451  fi
55452
55453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55454
55455  path="$MSVC_DLL"
55456  has_colon=`$ECHO $path | $GREP ^.:`
55457  new_path="$path"
55458  if test "x$has_colon" = x; then
55459    # Not in mixed or Windows style, start by that.
55460    new_path=`cmd //c echo $path`
55461  fi
55462
55463
55464  input_path="$new_path"
55465  # Check if we need to convert this using DOS-style short mode. If the path
55466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55467  # take no chances and rewrite it.
55468  # Note: m4 eats our [], so we need to use [ and ] instead.
55469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55470  if test "x$has_forbidden_chars" != x; then
55471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55473  fi
55474
55475
55476  windows_path="$new_path"
55477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55478    unix_path=`$CYGPATH -u "$windows_path"`
55479    new_path="$unix_path"
55480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55482    new_path="$unix_path"
55483  fi
55484
55485  if test "x$path" != "x$new_path"; then
55486    MSVC_DLL="$new_path"
55487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55488$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55489  fi
55490
55491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55493
55494    else
55495      # We're on a unix platform. Hooray! :)
55496      path="$MSVC_DLL"
55497      has_space=`$ECHO "$path" | $GREP " "`
55498      if test "x$has_space" != x; then
55499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55500$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55502      fi
55503
55504      # Use eval to expand a potential ~
55505      eval path="$path"
55506      if test ! -f "$path" && test ! -d "$path"; then
55507        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55508      fi
55509
55510      if test -d "$path"; then
55511        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55512      else
55513        dir="`$DIRNAME "$path"`"
55514        base="`$BASENAME "$path"`"
55515        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55516      fi
55517    fi
55518  fi
55519
55520      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55521$as_echo_n "checking for $DLL_NAME... " >&6; }
55522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55523$as_echo "$MSVC_DLL" >&6; }
55524    else
55525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55526$as_echo "incorrect, ignoring" >&6; }
55527      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55528$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55529    fi
55530  fi
55531
55532  fi
55533
55534  if test "x$MSVC_DLL" = x; then
55535    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55536    if test "x$VS100COMNTOOLS" != x; then
55537      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55538
55539  windows_path="$CYGWIN_VS_TOOLS_DIR"
55540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55541    unix_path=`$CYGPATH -u "$windows_path"`
55542    CYGWIN_VS_TOOLS_DIR="$unix_path"
55543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55545    CYGWIN_VS_TOOLS_DIR="$unix_path"
55546  fi
55547
55548      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55549        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55550	    | $GREP -i /x64/ | $HEAD --lines 1`
55551      else
55552        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55553	    | $GREP -i /x86/ | $HEAD --lines 1`
55554      fi
55555
55556  DLL_NAME="$DLL_NAME"
55557  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55558  METHOD="search of VS100COMNTOOLS"
55559  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55560    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55561$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55562
55563    # Need to check if the found msvcr is correct architecture
55564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55565$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55566    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55568      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55569      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55570      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55571        CORRECT_MSVCR_ARCH="PE32 executable"
55572      else
55573        CORRECT_MSVCR_ARCH="PE32+ executable"
55574      fi
55575    else
55576      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55577        CORRECT_MSVCR_ARCH=386
55578      else
55579        CORRECT_MSVCR_ARCH=x86-64
55580      fi
55581    fi
55582    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55584$as_echo "ok" >&6; }
55585      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55586
55587  # Only process if variable expands to non-empty
55588
55589  if test "x$MSVC_DLL" != x; then
55590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55591
55592  # Input might be given as Windows format, start by converting to
55593  # unix format.
55594  path="$MSVC_DLL"
55595  new_path=`$CYGPATH -u "$path"`
55596
55597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55600  # "foo.exe" is OK but "foo" is an error.
55601  #
55602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55603  # It is also a way to make sure we got the proper file name for the real test later on.
55604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55605  if test "x$test_shortpath" = x; then
55606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55607$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55608    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55609  fi
55610
55611  # Call helper function which possibly converts this using DOS-style short mode.
55612  # If so, the updated path is stored in $new_path.
55613
55614  input_path="$new_path"
55615  # Check if we need to convert this using DOS-style short mode. If the path
55616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55617  # take no chances and rewrite it.
55618  # Note: m4 eats our [], so we need to use [ and ] instead.
55619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55620  if test "x$has_forbidden_chars" != x; then
55621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55625      # Going to short mode and back again did indeed matter. Since short mode is
55626      # case insensitive, let's make it lowercase to improve readability.
55627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55628      # Now convert it back to Unix-style (cygpath)
55629      input_path=`$CYGPATH -u "$shortmode_path"`
55630      new_path="$input_path"
55631    fi
55632  fi
55633
55634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55635  if test "x$test_cygdrive_prefix" = x; then
55636    # As a simple fix, exclude /usr/bin since it's not a real path.
55637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55639      # a path prefixed by /cygdrive for fixpath to work.
55640      new_path="$CYGWIN_ROOT_PATH$input_path"
55641    fi
55642  fi
55643
55644
55645  if test "x$path" != "x$new_path"; then
55646    MSVC_DLL="$new_path"
55647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55648$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55649  fi
55650
55651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55652
55653  path="$MSVC_DLL"
55654  has_colon=`$ECHO $path | $GREP ^.:`
55655  new_path="$path"
55656  if test "x$has_colon" = x; then
55657    # Not in mixed or Windows style, start by that.
55658    new_path=`cmd //c echo $path`
55659  fi
55660
55661
55662  input_path="$new_path"
55663  # Check if we need to convert this using DOS-style short mode. If the path
55664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55665  # take no chances and rewrite it.
55666  # Note: m4 eats our [], so we need to use [ and ] instead.
55667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55668  if test "x$has_forbidden_chars" != x; then
55669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55671  fi
55672
55673
55674  windows_path="$new_path"
55675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55676    unix_path=`$CYGPATH -u "$windows_path"`
55677    new_path="$unix_path"
55678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55680    new_path="$unix_path"
55681  fi
55682
55683  if test "x$path" != "x$new_path"; then
55684    MSVC_DLL="$new_path"
55685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55686$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55687  fi
55688
55689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55691
55692    else
55693      # We're on a unix platform. Hooray! :)
55694      path="$MSVC_DLL"
55695      has_space=`$ECHO "$path" | $GREP " "`
55696      if test "x$has_space" != x; then
55697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55698$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55700      fi
55701
55702      # Use eval to expand a potential ~
55703      eval path="$path"
55704      if test ! -f "$path" && test ! -d "$path"; then
55705        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55706      fi
55707
55708      if test -d "$path"; then
55709        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55710      else
55711        dir="`$DIRNAME "$path"`"
55712        base="`$BASENAME "$path"`"
55713        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55714      fi
55715    fi
55716  fi
55717
55718      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55719$as_echo_n "checking for $DLL_NAME... " >&6; }
55720      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55721$as_echo "$MSVC_DLL" >&6; }
55722    else
55723      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55724$as_echo "incorrect, ignoring" >&6; }
55725      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55726$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55727    fi
55728  fi
55729
55730    fi
55731  fi
55732
55733  if test "x$MSVC_DLL" = x; then
55734    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55735    # (This was the original behaviour; kept since it might turn something up)
55736    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55737      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55738        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55739	    | $GREP x64 | $HEAD --lines 1`
55740      else
55741        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55742	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55743        if test "x$POSSIBLE_MSVC_DLL" = x; then
55744          # We're grasping at straws now...
55745          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55746	      | $HEAD --lines 1`
55747        fi
55748      fi
55749
55750
55751  DLL_NAME="$DLL_NAME"
55752  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55753  METHOD="search of VCINSTALLDIR"
55754  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55755    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55756$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55757
55758    # Need to check if the found msvcr is correct architecture
55759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55760$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55761    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55763      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55764      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55765      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55766        CORRECT_MSVCR_ARCH="PE32 executable"
55767      else
55768        CORRECT_MSVCR_ARCH="PE32+ executable"
55769      fi
55770    else
55771      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55772        CORRECT_MSVCR_ARCH=386
55773      else
55774        CORRECT_MSVCR_ARCH=x86-64
55775      fi
55776    fi
55777    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55779$as_echo "ok" >&6; }
55780      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55781
55782  # Only process if variable expands to non-empty
55783
55784  if test "x$MSVC_DLL" != x; then
55785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55786
55787  # Input might be given as Windows format, start by converting to
55788  # unix format.
55789  path="$MSVC_DLL"
55790  new_path=`$CYGPATH -u "$path"`
55791
55792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55795  # "foo.exe" is OK but "foo" is an error.
55796  #
55797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55798  # It is also a way to make sure we got the proper file name for the real test later on.
55799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55800  if test "x$test_shortpath" = x; then
55801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55802$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55803    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55804  fi
55805
55806  # Call helper function which possibly converts this using DOS-style short mode.
55807  # If so, the updated path is stored in $new_path.
55808
55809  input_path="$new_path"
55810  # Check if we need to convert this using DOS-style short mode. If the path
55811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55812  # take no chances and rewrite it.
55813  # Note: m4 eats our [], so we need to use [ and ] instead.
55814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55815  if test "x$has_forbidden_chars" != x; then
55816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55820      # Going to short mode and back again did indeed matter. Since short mode is
55821      # case insensitive, let's make it lowercase to improve readability.
55822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55823      # Now convert it back to Unix-style (cygpath)
55824      input_path=`$CYGPATH -u "$shortmode_path"`
55825      new_path="$input_path"
55826    fi
55827  fi
55828
55829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55830  if test "x$test_cygdrive_prefix" = x; then
55831    # As a simple fix, exclude /usr/bin since it's not a real path.
55832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55834      # a path prefixed by /cygdrive for fixpath to work.
55835      new_path="$CYGWIN_ROOT_PATH$input_path"
55836    fi
55837  fi
55838
55839
55840  if test "x$path" != "x$new_path"; then
55841    MSVC_DLL="$new_path"
55842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55843$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55844  fi
55845
55846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55847
55848  path="$MSVC_DLL"
55849  has_colon=`$ECHO $path | $GREP ^.:`
55850  new_path="$path"
55851  if test "x$has_colon" = x; then
55852    # Not in mixed or Windows style, start by that.
55853    new_path=`cmd //c echo $path`
55854  fi
55855
55856
55857  input_path="$new_path"
55858  # Check if we need to convert this using DOS-style short mode. If the path
55859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55860  # take no chances and rewrite it.
55861  # Note: m4 eats our [], so we need to use [ and ] instead.
55862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55863  if test "x$has_forbidden_chars" != x; then
55864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55866  fi
55867
55868
55869  windows_path="$new_path"
55870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55871    unix_path=`$CYGPATH -u "$windows_path"`
55872    new_path="$unix_path"
55873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55875    new_path="$unix_path"
55876  fi
55877
55878  if test "x$path" != "x$new_path"; then
55879    MSVC_DLL="$new_path"
55880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55881$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55882  fi
55883
55884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55886
55887    else
55888      # We're on a unix platform. Hooray! :)
55889      path="$MSVC_DLL"
55890      has_space=`$ECHO "$path" | $GREP " "`
55891      if test "x$has_space" != x; then
55892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55893$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55895      fi
55896
55897      # Use eval to expand a potential ~
55898      eval path="$path"
55899      if test ! -f "$path" && test ! -d "$path"; then
55900        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55901      fi
55902
55903      if test -d "$path"; then
55904        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55905      else
55906        dir="`$DIRNAME "$path"`"
55907        base="`$BASENAME "$path"`"
55908        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55909      fi
55910    fi
55911  fi
55912
55913      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55914$as_echo_n "checking for $DLL_NAME... " >&6; }
55915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55916$as_echo "$MSVC_DLL" >&6; }
55917    else
55918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55919$as_echo "incorrect, ignoring" >&6; }
55920      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55921$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55922    fi
55923  fi
55924
55925    fi
55926  fi
55927
55928  if test "x$MSVC_DLL" = x; then
55929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55930$as_echo_n "checking for $DLL_NAME... " >&6; }
55931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55932$as_echo "no" >&6; }
55933    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55934  fi
55935
55936      MSVCP_DLL="$MSVC_DLL"
55937    fi
55938
55939  fi
55940
55941  fi
55942
55943
55944  if test "x$NEEDS_LIB_X11" = xfalse; then
55945    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55946      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55947$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55948    fi
55949    X_CFLAGS=
55950    X_LIBS=
55951  else
55952
55953    if test "x${with_x}" = xno; then
55954      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55955    fi
55956
55957    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55958      # The user has specified a X11 base directory. Use it for includes and
55959      # libraries, unless explicitely overridden.
55960      if test "x$x_includes" = xNONE; then
55961        x_includes="${with_x}/include"
55962      fi
55963      if test "x$x_libraries" = xNONE; then
55964        x_libraries="${with_x}/lib"
55965      fi
55966    else
55967      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55968      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55969      # --x-libraries for the sysroot, if that seems to be correct.
55970      if test "x$SYSROOT" != "x"; then
55971        if test "x$x_includes" = xNONE; then
55972          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55973            x_includes="$SYSROOT/usr/X11R6/include"
55974          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55975            x_includes="$SYSROOT/usr/include"
55976          fi
55977        fi
55978        if test "x$x_libraries" = xNONE; then
55979          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55980            x_libraries="$SYSROOT/usr/X11R6/lib"
55981          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55982            x_libraries="$SYSROOT/usr/lib64"
55983          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55984            x_libraries="$SYSROOT/usr/lib"
55985          fi
55986        fi
55987      fi
55988    fi
55989
55990    # Now let autoconf do it's magic
55991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55992$as_echo_n "checking for X... " >&6; }
55993
55994
55995# Check whether --with-x was given.
55996if test "${with_x+set}" = set; then :
55997  withval=$with_x;
55998fi
55999
56000# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56001if test "x$with_x" = xno; then
56002  # The user explicitly disabled X.
56003  have_x=disabled
56004else
56005  case $x_includes,$x_libraries in #(
56006    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56007    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56008  $as_echo_n "(cached) " >&6
56009else
56010  # One or both of the vars are not set, and there is no cached value.
56011ac_x_includes=no ac_x_libraries=no
56012rm -f -r conftest.dir
56013if mkdir conftest.dir; then
56014  cd conftest.dir
56015  cat >Imakefile <<'_ACEOF'
56016incroot:
56017	@echo incroot='${INCROOT}'
56018usrlibdir:
56019	@echo usrlibdir='${USRLIBDIR}'
56020libdir:
56021	@echo libdir='${LIBDIR}'
56022_ACEOF
56023  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56024    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56025    for ac_var in incroot usrlibdir libdir; do
56026      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56027    done
56028    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56029    for ac_extension in a so sl dylib la dll; do
56030      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56031	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56032	ac_im_usrlibdir=$ac_im_libdir; break
56033      fi
56034    done
56035    # Screen out bogus values from the imake configuration.  They are
56036    # bogus both because they are the default anyway, and because
56037    # using them would break gcc on systems where it needs fixed includes.
56038    case $ac_im_incroot in
56039	/usr/include) ac_x_includes= ;;
56040	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56041    esac
56042    case $ac_im_usrlibdir in
56043	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56044	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56045    esac
56046  fi
56047  cd ..
56048  rm -f -r conftest.dir
56049fi
56050
56051# Standard set of common directories for X headers.
56052# Check X11 before X11Rn because it is often a symlink to the current release.
56053ac_x_header_dirs='
56054/usr/X11/include
56055/usr/X11R7/include
56056/usr/X11R6/include
56057/usr/X11R5/include
56058/usr/X11R4/include
56059
56060/usr/include/X11
56061/usr/include/X11R7
56062/usr/include/X11R6
56063/usr/include/X11R5
56064/usr/include/X11R4
56065
56066/usr/local/X11/include
56067/usr/local/X11R7/include
56068/usr/local/X11R6/include
56069/usr/local/X11R5/include
56070/usr/local/X11R4/include
56071
56072/usr/local/include/X11
56073/usr/local/include/X11R7
56074/usr/local/include/X11R6
56075/usr/local/include/X11R5
56076/usr/local/include/X11R4
56077
56078/usr/X386/include
56079/usr/x386/include
56080/usr/XFree86/include/X11
56081
56082/usr/include
56083/usr/local/include
56084/usr/unsupported/include
56085/usr/athena/include
56086/usr/local/x11r5/include
56087/usr/lpp/Xamples/include
56088
56089/usr/openwin/include
56090/usr/openwin/share/include'
56091
56092if test "$ac_x_includes" = no; then
56093  # Guess where to find include files, by looking for Xlib.h.
56094  # First, try using that file with no special directory specified.
56095  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56096/* end confdefs.h.  */
56097#include <X11/Xlib.h>
56098_ACEOF
56099if ac_fn_cxx_try_cpp "$LINENO"; then :
56100  # We can compile using X headers with no special include directory.
56101ac_x_includes=
56102else
56103  for ac_dir in $ac_x_header_dirs; do
56104  if test -r "$ac_dir/X11/Xlib.h"; then
56105    ac_x_includes=$ac_dir
56106    break
56107  fi
56108done
56109fi
56110rm -f conftest.err conftest.i conftest.$ac_ext
56111fi # $ac_x_includes = no
56112
56113if test "$ac_x_libraries" = no; then
56114  # Check for the libraries.
56115  # See if we find them without any special options.
56116  # Don't add to $LIBS permanently.
56117  ac_save_LIBS=$LIBS
56118  LIBS="-lX11 $LIBS"
56119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56120/* end confdefs.h.  */
56121#include <X11/Xlib.h>
56122int
56123main ()
56124{
56125XrmInitialize ()
56126  ;
56127  return 0;
56128}
56129_ACEOF
56130if ac_fn_cxx_try_link "$LINENO"; then :
56131  LIBS=$ac_save_LIBS
56132# We can link X programs with no special library path.
56133ac_x_libraries=
56134else
56135  LIBS=$ac_save_LIBS
56136for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56137do
56138  # Don't even attempt the hair of trying to link an X program!
56139  for ac_extension in a so sl dylib la dll; do
56140    if test -r "$ac_dir/libX11.$ac_extension"; then
56141      ac_x_libraries=$ac_dir
56142      break 2
56143    fi
56144  done
56145done
56146fi
56147rm -f core conftest.err conftest.$ac_objext \
56148    conftest$ac_exeext conftest.$ac_ext
56149fi # $ac_x_libraries = no
56150
56151case $ac_x_includes,$ac_x_libraries in #(
56152  no,* | *,no | *\'*)
56153    # Didn't find X, or a directory has "'" in its name.
56154    ac_cv_have_x="have_x=no";; #(
56155  *)
56156    # Record where we found X for the cache.
56157    ac_cv_have_x="have_x=yes\
56158	ac_x_includes='$ac_x_includes'\
56159	ac_x_libraries='$ac_x_libraries'"
56160esac
56161fi
56162;; #(
56163    *) have_x=yes;;
56164  esac
56165  eval "$ac_cv_have_x"
56166fi # $with_x != no
56167
56168if test "$have_x" != yes; then
56169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56170$as_echo "$have_x" >&6; }
56171  no_x=yes
56172else
56173  # If each of the values was on the command line, it overrides each guess.
56174  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56175  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56176  # Update the cache value to reflect the command line values.
56177  ac_cv_have_x="have_x=yes\
56178	ac_x_includes='$x_includes'\
56179	ac_x_libraries='$x_libraries'"
56180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56181$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56182fi
56183
56184    if test "$no_x" = yes; then
56185  # Not all programs may use this symbol, but it does not hurt to define it.
56186
56187$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56188
56189  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56190else
56191  if test -n "$x_includes"; then
56192    X_CFLAGS="$X_CFLAGS -I$x_includes"
56193  fi
56194
56195  # It would also be nice to do this for all -L options, not just this one.
56196  if test -n "$x_libraries"; then
56197    X_LIBS="$X_LIBS -L$x_libraries"
56198    # For Solaris; some versions of Sun CC require a space after -R and
56199    # others require no space.  Words are not sufficient . . . .
56200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56201$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56202    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56203    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56204    ac_cxx_werror_flag=yes
56205    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56206/* end confdefs.h.  */
56207
56208int
56209main ()
56210{
56211
56212  ;
56213  return 0;
56214}
56215_ACEOF
56216if ac_fn_cxx_try_link "$LINENO"; then :
56217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56218$as_echo "no" >&6; }
56219       X_LIBS="$X_LIBS -R$x_libraries"
56220else
56221  LIBS="$ac_xsave_LIBS -R $x_libraries"
56222       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56223/* end confdefs.h.  */
56224
56225int
56226main ()
56227{
56228
56229  ;
56230  return 0;
56231}
56232_ACEOF
56233if ac_fn_cxx_try_link "$LINENO"; then :
56234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56235$as_echo "yes" >&6; }
56236	  X_LIBS="$X_LIBS -R $x_libraries"
56237else
56238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56239$as_echo "neither works" >&6; }
56240fi
56241rm -f core conftest.err conftest.$ac_objext \
56242    conftest$ac_exeext conftest.$ac_ext
56243fi
56244rm -f core conftest.err conftest.$ac_objext \
56245    conftest$ac_exeext conftest.$ac_ext
56246    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56247    LIBS=$ac_xsave_LIBS
56248  fi
56249
56250  # Check for system-dependent libraries X programs must link with.
56251  # Do this before checking for the system-independent R6 libraries
56252  # (-lICE), since we may need -lsocket or whatever for X linking.
56253
56254  if test "$ISC" = yes; then
56255    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56256  else
56257    # Martyn Johnson says this is needed for Ultrix, if the X
56258    # libraries were built with DECnet support.  And Karl Berry says
56259    # the Alpha needs dnet_stub (dnet does not exist).
56260    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56261    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56262/* end confdefs.h.  */
56263
56264/* Override any GCC internal prototype to avoid an error.
56265   Use char because int might match the return type of a GCC
56266   builtin and then its argument prototype would still apply.  */
56267#ifdef __cplusplus
56268extern "C"
56269#endif
56270char XOpenDisplay ();
56271int
56272main ()
56273{
56274return XOpenDisplay ();
56275  ;
56276  return 0;
56277}
56278_ACEOF
56279if ac_fn_cxx_try_link "$LINENO"; then :
56280
56281else
56282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56283$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56284if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56285  $as_echo_n "(cached) " >&6
56286else
56287  ac_check_lib_save_LIBS=$LIBS
56288LIBS="-ldnet  $LIBS"
56289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56290/* end confdefs.h.  */
56291
56292/* Override any GCC internal prototype to avoid an error.
56293   Use char because int might match the return type of a GCC
56294   builtin and then its argument prototype would still apply.  */
56295#ifdef __cplusplus
56296extern "C"
56297#endif
56298char dnet_ntoa ();
56299int
56300main ()
56301{
56302return dnet_ntoa ();
56303  ;
56304  return 0;
56305}
56306_ACEOF
56307if ac_fn_cxx_try_link "$LINENO"; then :
56308  ac_cv_lib_dnet_dnet_ntoa=yes
56309else
56310  ac_cv_lib_dnet_dnet_ntoa=no
56311fi
56312rm -f core conftest.err conftest.$ac_objext \
56313    conftest$ac_exeext conftest.$ac_ext
56314LIBS=$ac_check_lib_save_LIBS
56315fi
56316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56317$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56318if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56319  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56320fi
56321
56322    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56323      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56324$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56325if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56326  $as_echo_n "(cached) " >&6
56327else
56328  ac_check_lib_save_LIBS=$LIBS
56329LIBS="-ldnet_stub  $LIBS"
56330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56331/* end confdefs.h.  */
56332
56333/* Override any GCC internal prototype to avoid an error.
56334   Use char because int might match the return type of a GCC
56335   builtin and then its argument prototype would still apply.  */
56336#ifdef __cplusplus
56337extern "C"
56338#endif
56339char dnet_ntoa ();
56340int
56341main ()
56342{
56343return dnet_ntoa ();
56344  ;
56345  return 0;
56346}
56347_ACEOF
56348if ac_fn_cxx_try_link "$LINENO"; then :
56349  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56350else
56351  ac_cv_lib_dnet_stub_dnet_ntoa=no
56352fi
56353rm -f core conftest.err conftest.$ac_objext \
56354    conftest$ac_exeext conftest.$ac_ext
56355LIBS=$ac_check_lib_save_LIBS
56356fi
56357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56358$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56359if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56360  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56361fi
56362
56363    fi
56364fi
56365rm -f core conftest.err conftest.$ac_objext \
56366    conftest$ac_exeext conftest.$ac_ext
56367    LIBS="$ac_xsave_LIBS"
56368
56369    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56370    # to get the SysV transport functions.
56371    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56372    # needs -lnsl.
56373    # The nsl library prevents programs from opening the X display
56374    # on Irix 5.2, according to T.E. Dickey.
56375    # The functions gethostbyname, getservbyname, and inet_addr are
56376    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56377    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56378if test "x$ac_cv_func_gethostbyname" = xyes; then :
56379
56380fi
56381
56382    if test $ac_cv_func_gethostbyname = no; then
56383      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56384$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56385if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56386  $as_echo_n "(cached) " >&6
56387else
56388  ac_check_lib_save_LIBS=$LIBS
56389LIBS="-lnsl  $LIBS"
56390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56391/* end confdefs.h.  */
56392
56393/* Override any GCC internal prototype to avoid an error.
56394   Use char because int might match the return type of a GCC
56395   builtin and then its argument prototype would still apply.  */
56396#ifdef __cplusplus
56397extern "C"
56398#endif
56399char gethostbyname ();
56400int
56401main ()
56402{
56403return gethostbyname ();
56404  ;
56405  return 0;
56406}
56407_ACEOF
56408if ac_fn_cxx_try_link "$LINENO"; then :
56409  ac_cv_lib_nsl_gethostbyname=yes
56410else
56411  ac_cv_lib_nsl_gethostbyname=no
56412fi
56413rm -f core conftest.err conftest.$ac_objext \
56414    conftest$ac_exeext conftest.$ac_ext
56415LIBS=$ac_check_lib_save_LIBS
56416fi
56417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56418$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56419if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56420  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56421fi
56422
56423      if test $ac_cv_lib_nsl_gethostbyname = no; then
56424	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56425$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56426if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56427  $as_echo_n "(cached) " >&6
56428else
56429  ac_check_lib_save_LIBS=$LIBS
56430LIBS="-lbsd  $LIBS"
56431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56432/* end confdefs.h.  */
56433
56434/* Override any GCC internal prototype to avoid an error.
56435   Use char because int might match the return type of a GCC
56436   builtin and then its argument prototype would still apply.  */
56437#ifdef __cplusplus
56438extern "C"
56439#endif
56440char gethostbyname ();
56441int
56442main ()
56443{
56444return gethostbyname ();
56445  ;
56446  return 0;
56447}
56448_ACEOF
56449if ac_fn_cxx_try_link "$LINENO"; then :
56450  ac_cv_lib_bsd_gethostbyname=yes
56451else
56452  ac_cv_lib_bsd_gethostbyname=no
56453fi
56454rm -f core conftest.err conftest.$ac_objext \
56455    conftest$ac_exeext conftest.$ac_ext
56456LIBS=$ac_check_lib_save_LIBS
56457fi
56458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56459$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56460if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56461  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56462fi
56463
56464      fi
56465    fi
56466
56467    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56468    # socket/setsockopt and other routines are undefined under SCO ODT
56469    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56470    # on later versions), says Simon Leinen: it contains gethostby*
56471    # variants that don't use the name server (or something).  -lsocket
56472    # must be given before -lnsl if both are needed.  We assume that
56473    # if connect needs -lnsl, so does gethostbyname.
56474    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56475if test "x$ac_cv_func_connect" = xyes; then :
56476
56477fi
56478
56479    if test $ac_cv_func_connect = no; then
56480      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56481$as_echo_n "checking for connect in -lsocket... " >&6; }
56482if ${ac_cv_lib_socket_connect+:} false; then :
56483  $as_echo_n "(cached) " >&6
56484else
56485  ac_check_lib_save_LIBS=$LIBS
56486LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56488/* end confdefs.h.  */
56489
56490/* Override any GCC internal prototype to avoid an error.
56491   Use char because int might match the return type of a GCC
56492   builtin and then its argument prototype would still apply.  */
56493#ifdef __cplusplus
56494extern "C"
56495#endif
56496char connect ();
56497int
56498main ()
56499{
56500return connect ();
56501  ;
56502  return 0;
56503}
56504_ACEOF
56505if ac_fn_cxx_try_link "$LINENO"; then :
56506  ac_cv_lib_socket_connect=yes
56507else
56508  ac_cv_lib_socket_connect=no
56509fi
56510rm -f core conftest.err conftest.$ac_objext \
56511    conftest$ac_exeext conftest.$ac_ext
56512LIBS=$ac_check_lib_save_LIBS
56513fi
56514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56515$as_echo "$ac_cv_lib_socket_connect" >&6; }
56516if test "x$ac_cv_lib_socket_connect" = xyes; then :
56517  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56518fi
56519
56520    fi
56521
56522    # Guillermo Gomez says -lposix is necessary on A/UX.
56523    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56524if test "x$ac_cv_func_remove" = xyes; then :
56525
56526fi
56527
56528    if test $ac_cv_func_remove = no; then
56529      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56530$as_echo_n "checking for remove in -lposix... " >&6; }
56531if ${ac_cv_lib_posix_remove+:} false; then :
56532  $as_echo_n "(cached) " >&6
56533else
56534  ac_check_lib_save_LIBS=$LIBS
56535LIBS="-lposix  $LIBS"
56536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56537/* end confdefs.h.  */
56538
56539/* Override any GCC internal prototype to avoid an error.
56540   Use char because int might match the return type of a GCC
56541   builtin and then its argument prototype would still apply.  */
56542#ifdef __cplusplus
56543extern "C"
56544#endif
56545char remove ();
56546int
56547main ()
56548{
56549return remove ();
56550  ;
56551  return 0;
56552}
56553_ACEOF
56554if ac_fn_cxx_try_link "$LINENO"; then :
56555  ac_cv_lib_posix_remove=yes
56556else
56557  ac_cv_lib_posix_remove=no
56558fi
56559rm -f core conftest.err conftest.$ac_objext \
56560    conftest$ac_exeext conftest.$ac_ext
56561LIBS=$ac_check_lib_save_LIBS
56562fi
56563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56564$as_echo "$ac_cv_lib_posix_remove" >&6; }
56565if test "x$ac_cv_lib_posix_remove" = xyes; then :
56566  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56567fi
56568
56569    fi
56570
56571    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56572    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56573if test "x$ac_cv_func_shmat" = xyes; then :
56574
56575fi
56576
56577    if test $ac_cv_func_shmat = no; then
56578      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56579$as_echo_n "checking for shmat in -lipc... " >&6; }
56580if ${ac_cv_lib_ipc_shmat+:} false; then :
56581  $as_echo_n "(cached) " >&6
56582else
56583  ac_check_lib_save_LIBS=$LIBS
56584LIBS="-lipc  $LIBS"
56585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56586/* end confdefs.h.  */
56587
56588/* Override any GCC internal prototype to avoid an error.
56589   Use char because int might match the return type of a GCC
56590   builtin and then its argument prototype would still apply.  */
56591#ifdef __cplusplus
56592extern "C"
56593#endif
56594char shmat ();
56595int
56596main ()
56597{
56598return shmat ();
56599  ;
56600  return 0;
56601}
56602_ACEOF
56603if ac_fn_cxx_try_link "$LINENO"; then :
56604  ac_cv_lib_ipc_shmat=yes
56605else
56606  ac_cv_lib_ipc_shmat=no
56607fi
56608rm -f core conftest.err conftest.$ac_objext \
56609    conftest$ac_exeext conftest.$ac_ext
56610LIBS=$ac_check_lib_save_LIBS
56611fi
56612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56613$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56614if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56615  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56616fi
56617
56618    fi
56619  fi
56620
56621  # Check for libraries that X11R6 Xt/Xaw programs need.
56622  ac_save_LDFLAGS=$LDFLAGS
56623  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56624  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56625  # check for ICE first), but we must link in the order -lSM -lICE or
56626  # we get undefined symbols.  So assume we have SM if we have ICE.
56627  # These have to be linked with before -lX11, unlike the other
56628  # libraries we check for below, so use a different variable.
56629  # John Interrante, Karl Berry
56630  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56631$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56632if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56633  $as_echo_n "(cached) " >&6
56634else
56635  ac_check_lib_save_LIBS=$LIBS
56636LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56638/* end confdefs.h.  */
56639
56640/* Override any GCC internal prototype to avoid an error.
56641   Use char because int might match the return type of a GCC
56642   builtin and then its argument prototype would still apply.  */
56643#ifdef __cplusplus
56644extern "C"
56645#endif
56646char IceConnectionNumber ();
56647int
56648main ()
56649{
56650return IceConnectionNumber ();
56651  ;
56652  return 0;
56653}
56654_ACEOF
56655if ac_fn_cxx_try_link "$LINENO"; then :
56656  ac_cv_lib_ICE_IceConnectionNumber=yes
56657else
56658  ac_cv_lib_ICE_IceConnectionNumber=no
56659fi
56660rm -f core conftest.err conftest.$ac_objext \
56661    conftest$ac_exeext conftest.$ac_ext
56662LIBS=$ac_check_lib_save_LIBS
56663fi
56664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56665$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56666if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56667  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56668fi
56669
56670  LDFLAGS=$ac_save_LDFLAGS
56671
56672fi
56673
56674
56675    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56676    # this doesn't make sense so we remove it.
56677    if test "x$COMPILE_TYPE" = xcross; then
56678      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56679    fi
56680
56681    if test "x$no_x" = xyes; then
56682
56683  # Print a helpful message on how to acquire the necessary build dependency.
56684  # x11 is the help tag: freetype, cups, alsa etc
56685  MISSING_DEPENDENCY=x11
56686
56687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56688    cygwin_help $MISSING_DEPENDENCY
56689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56690    msys_help $MISSING_DEPENDENCY
56691  else
56692    PKGHANDLER_COMMAND=
56693
56694    case $PKGHANDLER in
56695      apt-get)
56696        apt_help     $MISSING_DEPENDENCY ;;
56697      yum)
56698        yum_help     $MISSING_DEPENDENCY ;;
56699      port)
56700        port_help    $MISSING_DEPENDENCY ;;
56701      pkgutil)
56702        pkgutil_help $MISSING_DEPENDENCY ;;
56703      pkgadd)
56704        pkgadd_help  $MISSING_DEPENDENCY ;;
56705    esac
56706
56707    if test "x$PKGHANDLER_COMMAND" != x; then
56708      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56709    fi
56710  fi
56711
56712      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56713    fi
56714
56715    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56716      OPENWIN_HOME="/usr/openwin"
56717      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56718      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56719          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56720    fi
56721
56722    ac_ext=c
56723ac_cpp='$CPP $CPPFLAGS'
56724ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56725ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56726ac_compiler_gnu=$ac_cv_c_compiler_gnu
56727
56728    OLD_CFLAGS="$CFLAGS"
56729    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56730
56731    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56732    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56733do :
56734  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56735ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56736          # include <X11/Xlib.h>
56737          # include <X11/Xutil.h>
56738
56739
56740"
56741if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56742  cat >>confdefs.h <<_ACEOF
56743#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56744_ACEOF
56745 X11_HEADERS_OK=yes
56746else
56747  X11_HEADERS_OK=no; break
56748fi
56749
56750done
56751
56752
56753    if test "x$X11_HEADERS_OK" = xno; then
56754
56755  # Print a helpful message on how to acquire the necessary build dependency.
56756  # x11 is the help tag: freetype, cups, alsa etc
56757  MISSING_DEPENDENCY=x11
56758
56759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56760    cygwin_help $MISSING_DEPENDENCY
56761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56762    msys_help $MISSING_DEPENDENCY
56763  else
56764    PKGHANDLER_COMMAND=
56765
56766    case $PKGHANDLER in
56767      apt-get)
56768        apt_help     $MISSING_DEPENDENCY ;;
56769      yum)
56770        yum_help     $MISSING_DEPENDENCY ;;
56771      port)
56772        port_help    $MISSING_DEPENDENCY ;;
56773      pkgutil)
56774        pkgutil_help $MISSING_DEPENDENCY ;;
56775      pkgadd)
56776        pkgadd_help  $MISSING_DEPENDENCY ;;
56777    esac
56778
56779    if test "x$PKGHANDLER_COMMAND" != x; then
56780      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56781    fi
56782  fi
56783
56784      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56785    fi
56786
56787    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56788    # defined in libawt_xawt.
56789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56790$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56791    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56792/* end confdefs.h.  */
56793#include <X11/extensions/Xrender.h>
56794int
56795main ()
56796{
56797XLinearGradient x;
56798  ;
56799  return 0;
56800}
56801_ACEOF
56802if ac_fn_c_try_compile "$LINENO"; then :
56803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56804$as_echo "yes" >&6; }
56805else
56806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56807$as_echo "no" >&6; }
56808         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56809fi
56810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56811
56812    CFLAGS="$OLD_CFLAGS"
56813    ac_ext=cpp
56814ac_cpp='$CXXCPP $CPPFLAGS'
56815ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56816ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56817ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56818
56819  fi # NEEDS_LIB_X11
56820
56821
56822
56823
56824
56825
56826# Check whether --with-cups was given.
56827if test "${with_cups+set}" = set; then :
56828  withval=$with_cups;
56829fi
56830
56831
56832# Check whether --with-cups-include was given.
56833if test "${with_cups_include+set}" = set; then :
56834  withval=$with_cups_include;
56835fi
56836
56837
56838  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56839    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56840        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56841      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56842$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56843    fi
56844    CUPS_CFLAGS=
56845  else
56846    CUPS_FOUND=no
56847
56848    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56849      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56850    fi
56851
56852    if test "x${with_cups}" != x; then
56853      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56854$as_echo_n "checking for cups headers... " >&6; }
56855      if test -s "${with_cups}/include/cups/cups.h"; then
56856        CUPS_CFLAGS="-I${with_cups}/include"
56857        CUPS_FOUND=yes
56858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56859$as_echo "$CUPS_FOUND" >&6; }
56860      else
56861        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56862      fi
56863    fi
56864    if test "x${with_cups_include}" != x; then
56865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56866$as_echo_n "checking for cups headers... " >&6; }
56867      if test -s "${with_cups_include}/cups/cups.h"; then
56868        CUPS_CFLAGS="-I${with_cups_include}"
56869        CUPS_FOUND=yes
56870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56871$as_echo "$CUPS_FOUND" >&6; }
56872      else
56873        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56874      fi
56875    fi
56876    if test "x$CUPS_FOUND" = xno; then
56877      # Are the cups headers installed in the default /usr/include location?
56878      for ac_header in cups/cups.h cups/ppd.h
56879do :
56880  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56881ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56882if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56883  cat >>confdefs.h <<_ACEOF
56884#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56885_ACEOF
56886
56887          CUPS_FOUND=yes
56888          CUPS_CFLAGS=
56889          DEFAULT_CUPS=yes
56890
56891fi
56892
56893done
56894
56895    fi
56896    if test "x$CUPS_FOUND" = xno; then
56897
56898  # Print a helpful message on how to acquire the necessary build dependency.
56899  # cups is the help tag: freetype, cups, alsa etc
56900  MISSING_DEPENDENCY=cups
56901
56902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56903    cygwin_help $MISSING_DEPENDENCY
56904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56905    msys_help $MISSING_DEPENDENCY
56906  else
56907    PKGHANDLER_COMMAND=
56908
56909    case $PKGHANDLER in
56910      apt-get)
56911        apt_help     $MISSING_DEPENDENCY ;;
56912      yum)
56913        yum_help     $MISSING_DEPENDENCY ;;
56914      port)
56915        port_help    $MISSING_DEPENDENCY ;;
56916      pkgutil)
56917        pkgutil_help $MISSING_DEPENDENCY ;;
56918      pkgadd)
56919        pkgadd_help  $MISSING_DEPENDENCY ;;
56920    esac
56921
56922    if test "x$PKGHANDLER_COMMAND" != x; then
56923      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56924    fi
56925  fi
56926
56927      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56928    fi
56929  fi
56930
56931
56932
56933
56934
56935# Check whether --with-freetype was given.
56936if test "${with_freetype+set}" = set; then :
56937  withval=$with_freetype;
56938fi
56939
56940
56941# Check whether --with-freetype-include was given.
56942if test "${with_freetype_include+set}" = set; then :
56943  withval=$with_freetype_include;
56944fi
56945
56946
56947# Check whether --with-freetype-lib was given.
56948if test "${with_freetype_lib+set}" = set; then :
56949  withval=$with_freetype_lib;
56950fi
56951
56952
56953# Check whether --with-freetype-src was given.
56954if test "${with_freetype_src+set}" = set; then :
56955  withval=$with_freetype_src;
56956fi
56957
56958  # Check whether --enable-freetype-bundling was given.
56959if test "${enable_freetype_bundling+set}" = set; then :
56960  enableval=$enable_freetype_bundling;
56961fi
56962
56963
56964  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56965  FREETYPE_BASE_NAME=freetype
56966  FREETYPE_CFLAGS=
56967  FREETYPE_LIBS=
56968  FREETYPE_BUNDLE_LIB_PATH=
56969
56970  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56971    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56972        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56973        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56974        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56975      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56976$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56977    fi
56978    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56979      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56980$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56981    fi
56982  else
56983    # freetype is needed to build; go get it!
56984
56985    BUNDLE_FREETYPE="$enable_freetype_bundling"
56986
56987    if  test "x$with_freetype_src" != x; then
56988      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56989        # Try to build freetype if --with-freetype-src was given on Windows
56990
56991  FREETYPE_SRC_PATH="$with_freetype_src"
56992  BUILD_FREETYPE=yes
56993
56994  # Check if the freetype sources are acessible..
56995  if ! test -d $FREETYPE_SRC_PATH; then
56996    { $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
56997$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56998    BUILD_FREETYPE=no
56999  fi
57000  # ..and contain a vc2010 project file
57001  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57002  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57003    { $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
57004$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57005    BUILD_FREETYPE=no
57006  fi
57007  # Now check if configure found a version of 'msbuild.exe'
57008  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57009    { $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
57010$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;}
57011    BUILD_FREETYPE=no
57012  fi
57013
57014  # Ready to go..
57015  if test "x$BUILD_FREETYPE" = xyes; then
57016    # msbuild requires trailing slashes for output directories
57017    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57018    freetype_lib_path_unix="$freetype_lib_path"
57019    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57020
57021  unix_path="$vcxproj_path"
57022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57023    windows_path=`$CYGPATH -m "$unix_path"`
57024    vcxproj_path="$windows_path"
57025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57026    windows_path=`cmd //c echo $unix_path`
57027    vcxproj_path="$windows_path"
57028  fi
57029
57030
57031  unix_path="$freetype_lib_path"
57032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57033    windows_path=`$CYGPATH -m "$unix_path"`
57034    freetype_lib_path="$windows_path"
57035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57036    windows_path=`cmd //c echo $unix_path`
57037    freetype_lib_path="$windows_path"
57038  fi
57039
57040
57041  unix_path="$freetype_obj_path"
57042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57043    windows_path=`$CYGPATH -m "$unix_path"`
57044    freetype_obj_path="$windows_path"
57045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57046    windows_path=`cmd //c echo $unix_path`
57047    freetype_obj_path="$windows_path"
57048  fi
57049
57050    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57051      freetype_platform=x64
57052    else
57053      freetype_platform=win32
57054    fi
57055
57056    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57057    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57058    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57059    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57060    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57061$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57062
57063    # First we try to build the freetype.dll
57064    $ECHO -e "@echo off\n"\
57065        "$MSBUILD $vcxproj_path "\
57066        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57067        "/p:Configuration=\"Release Multithreaded\" "\
57068        "/p:Platform=$freetype_platform "\
57069        "/p:ConfigurationType=DynamicLibrary "\
57070        "/p:TargetName=freetype "\
57071        "/p:OutDir=\"$freetype_lib_path\" "\
57072        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57073    cmd /c freetype.bat
57074
57075    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57076      # If that succeeds we also build freetype.lib
57077      $ECHO -e "@echo off\n"\
57078          "$MSBUILD $vcxproj_path "\
57079          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57080          "/p:Configuration=\"Release Multithreaded\" "\
57081          "/p:Platform=$freetype_platform "\
57082          "/p:ConfigurationType=StaticLibrary "\
57083          "/p:TargetName=freetype "\
57084          "/p:OutDir=\"$freetype_lib_path\" "\
57085          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57086      cmd /c freetype.bat
57087
57088      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57089        # Once we build both, lib and dll, set freetype lib and include path appropriately
57090        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57091        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57092        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57093$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57094      else
57095        BUILD_FREETYPE=no
57096      fi
57097    else
57098      BUILD_FREETYPE=no
57099    fi
57100  fi
57101
57102        if test "x$BUILD_FREETYPE" = xyes; then
57103          # Okay, we built it. Check that it works.
57104
57105  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57106  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57107  METHOD="--with-freetype-src"
57108
57109  # Let's start with an optimistic view of the world :-)
57110  FOUND_FREETYPE=yes
57111
57112  # First look for the canonical freetype main include file ft2build.h.
57113  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57114    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57115    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57116    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57117      # Fail.
57118      FOUND_FREETYPE=no
57119    fi
57120  fi
57121
57122  if test "x$FOUND_FREETYPE" = xyes; then
57123    # Include file found, let's continue the sanity check.
57124    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57125$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57126
57127    # Reset to default value
57128    FREETYPE_BASE_NAME=freetype
57129    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57130    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57131      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57132          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57133        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57134        # for the .6 version explicitly.
57135        FREETYPE_BASE_NAME=freetype.6
57136        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57137        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57138$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57139      else
57140        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57141$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57142        FOUND_FREETYPE=no
57143      fi
57144    else
57145      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57146        # On Windows, we will need both .lib and .dll file.
57147        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57148          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57149$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57150          FOUND_FREETYPE=no
57151        fi
57152      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57153          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57154        # Found lib in isa dir, use that instead.
57155        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57156        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57157$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57158      fi
57159    fi
57160  fi
57161
57162  if test "x$FOUND_FREETYPE" = xyes; then
57163
57164  # Only process if variable expands to non-empty
57165
57166  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57168
57169  # Input might be given as Windows format, start by converting to
57170  # unix format.
57171  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57172  new_path=`$CYGPATH -u "$path"`
57173
57174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57177  # "foo.exe" is OK but "foo" is an error.
57178  #
57179  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57180  # It is also a way to make sure we got the proper file name for the real test later on.
57181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57182  if test "x$test_shortpath" = x; then
57183    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57184$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57185    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57186  fi
57187
57188  # Call helper function which possibly converts this using DOS-style short mode.
57189  # If so, the updated path is stored in $new_path.
57190
57191  input_path="$new_path"
57192  # Check if we need to convert this using DOS-style short mode. If the path
57193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57194  # take no chances and rewrite it.
57195  # Note: m4 eats our [], so we need to use [ and ] instead.
57196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57197  if test "x$has_forbidden_chars" != x; then
57198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57202      # Going to short mode and back again did indeed matter. Since short mode is
57203      # case insensitive, let's make it lowercase to improve readability.
57204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57205      # Now convert it back to Unix-style (cygpath)
57206      input_path=`$CYGPATH -u "$shortmode_path"`
57207      new_path="$input_path"
57208    fi
57209  fi
57210
57211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57212  if test "x$test_cygdrive_prefix" = x; then
57213    # As a simple fix, exclude /usr/bin since it's not a real path.
57214    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57216      # a path prefixed by /cygdrive for fixpath to work.
57217      new_path="$CYGWIN_ROOT_PATH$input_path"
57218    fi
57219  fi
57220
57221
57222  if test "x$path" != "x$new_path"; then
57223    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57225$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57226  fi
57227
57228    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57229
57230  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57231  has_colon=`$ECHO $path | $GREP ^.:`
57232  new_path="$path"
57233  if test "x$has_colon" = x; then
57234    # Not in mixed or Windows style, start by that.
57235    new_path=`cmd //c echo $path`
57236  fi
57237
57238
57239  input_path="$new_path"
57240  # Check if we need to convert this using DOS-style short mode. If the path
57241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57242  # take no chances and rewrite it.
57243  # Note: m4 eats our [], so we need to use [ and ] instead.
57244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57245  if test "x$has_forbidden_chars" != x; then
57246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57248  fi
57249
57250
57251  windows_path="$new_path"
57252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57253    unix_path=`$CYGPATH -u "$windows_path"`
57254    new_path="$unix_path"
57255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57257    new_path="$unix_path"
57258  fi
57259
57260  if test "x$path" != "x$new_path"; then
57261    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57263$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57264  fi
57265
57266  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57267  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57268
57269    else
57270      # We're on a unix platform. Hooray! :)
57271      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57272      has_space=`$ECHO "$path" | $GREP " "`
57273      if test "x$has_space" != x; then
57274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57275$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57276        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57277      fi
57278
57279      # Use eval to expand a potential ~
57280      eval path="$path"
57281      if test ! -f "$path" && test ! -d "$path"; then
57282        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57283      fi
57284
57285      if test -d "$path"; then
57286        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57287      else
57288        dir="`$DIRNAME "$path"`"
57289        base="`$BASENAME "$path"`"
57290        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57291      fi
57292    fi
57293  fi
57294
57295
57296  # Only process if variable expands to non-empty
57297
57298  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57300
57301  # Input might be given as Windows format, start by converting to
57302  # unix format.
57303  path="$POTENTIAL_FREETYPE_LIB_PATH"
57304  new_path=`$CYGPATH -u "$path"`
57305
57306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57309  # "foo.exe" is OK but "foo" is an error.
57310  #
57311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57312  # It is also a way to make sure we got the proper file name for the real test later on.
57313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57314  if test "x$test_shortpath" = x; then
57315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57316$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57317    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57318  fi
57319
57320  # Call helper function which possibly converts this using DOS-style short mode.
57321  # If so, the updated path is stored in $new_path.
57322
57323  input_path="$new_path"
57324  # Check if we need to convert this using DOS-style short mode. If the path
57325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57326  # take no chances and rewrite it.
57327  # Note: m4 eats our [], so we need to use [ and ] instead.
57328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57329  if test "x$has_forbidden_chars" != x; then
57330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57334      # Going to short mode and back again did indeed matter. Since short mode is
57335      # case insensitive, let's make it lowercase to improve readability.
57336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57337      # Now convert it back to Unix-style (cygpath)
57338      input_path=`$CYGPATH -u "$shortmode_path"`
57339      new_path="$input_path"
57340    fi
57341  fi
57342
57343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57344  if test "x$test_cygdrive_prefix" = x; then
57345    # As a simple fix, exclude /usr/bin since it's not a real path.
57346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57348      # a path prefixed by /cygdrive for fixpath to work.
57349      new_path="$CYGWIN_ROOT_PATH$input_path"
57350    fi
57351  fi
57352
57353
57354  if test "x$path" != "x$new_path"; then
57355    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57357$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57358  fi
57359
57360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57361
57362  path="$POTENTIAL_FREETYPE_LIB_PATH"
57363  has_colon=`$ECHO $path | $GREP ^.:`
57364  new_path="$path"
57365  if test "x$has_colon" = x; then
57366    # Not in mixed or Windows style, start by that.
57367    new_path=`cmd //c echo $path`
57368  fi
57369
57370
57371  input_path="$new_path"
57372  # Check if we need to convert this using DOS-style short mode. If the path
57373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57374  # take no chances and rewrite it.
57375  # Note: m4 eats our [], so we need to use [ and ] instead.
57376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57377  if test "x$has_forbidden_chars" != x; then
57378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57380  fi
57381
57382
57383  windows_path="$new_path"
57384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57385    unix_path=`$CYGPATH -u "$windows_path"`
57386    new_path="$unix_path"
57387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57389    new_path="$unix_path"
57390  fi
57391
57392  if test "x$path" != "x$new_path"; then
57393    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57395$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57396  fi
57397
57398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57400
57401    else
57402      # We're on a unix platform. Hooray! :)
57403      path="$POTENTIAL_FREETYPE_LIB_PATH"
57404      has_space=`$ECHO "$path" | $GREP " "`
57405      if test "x$has_space" != x; then
57406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57407$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57409      fi
57410
57411      # Use eval to expand a potential ~
57412      eval path="$path"
57413      if test ! -f "$path" && test ! -d "$path"; then
57414        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57415      fi
57416
57417      if test -d "$path"; then
57418        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57419      else
57420        dir="`$DIRNAME "$path"`"
57421        base="`$BASENAME "$path"`"
57422        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57423      fi
57424    fi
57425  fi
57426
57427
57428    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57430$as_echo_n "checking for freetype includes... " >&6; }
57431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57432$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57433    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57435$as_echo_n "checking for freetype libraries... " >&6; }
57436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57437$as_echo "$FREETYPE_LIB_PATH" >&6; }
57438  fi
57439
57440          if test "x$FOUND_FREETYPE" != xyes; then
57441            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57442          fi
57443        else
57444          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57445$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57446          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57447        fi
57448      else
57449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57450$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57451      fi
57452    fi
57453
57454    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57455      # User has specified settings
57456
57457      if test "x$BUNDLE_FREETYPE" = x; then
57458        # If not specified, default is to bundle freetype
57459        BUNDLE_FREETYPE=yes
57460      fi
57461
57462      if test "x$with_freetype" != x; then
57463        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57464        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57465      fi
57466
57467      # Allow --with-freetype-lib and --with-freetype-include to override
57468      if test "x$with_freetype_include" != x; then
57469        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57470      fi
57471      if test "x$with_freetype_lib" != x; then
57472        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57473      fi
57474
57475      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57476        # Okay, we got it. Check that it works.
57477
57478  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57479  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57480  METHOD="--with-freetype"
57481
57482  # Let's start with an optimistic view of the world :-)
57483  FOUND_FREETYPE=yes
57484
57485  # First look for the canonical freetype main include file ft2build.h.
57486  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57487    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57488    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57489    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57490      # Fail.
57491      FOUND_FREETYPE=no
57492    fi
57493  fi
57494
57495  if test "x$FOUND_FREETYPE" = xyes; then
57496    # Include file found, let's continue the sanity check.
57497    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57498$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57499
57500    # Reset to default value
57501    FREETYPE_BASE_NAME=freetype
57502    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57503    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57504      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57505          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57506        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57507        # for the .6 version explicitly.
57508        FREETYPE_BASE_NAME=freetype.6
57509        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57510        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57511$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57512      else
57513        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57514$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57515        FOUND_FREETYPE=no
57516      fi
57517    else
57518      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57519        # On Windows, we will need both .lib and .dll file.
57520        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57521          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57522$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57523          FOUND_FREETYPE=no
57524        fi
57525      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57526          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57527        # Found lib in isa dir, use that instead.
57528        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57529        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57530$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57531      fi
57532    fi
57533  fi
57534
57535  if test "x$FOUND_FREETYPE" = xyes; then
57536
57537  # Only process if variable expands to non-empty
57538
57539  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57541
57542  # Input might be given as Windows format, start by converting to
57543  # unix format.
57544  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57545  new_path=`$CYGPATH -u "$path"`
57546
57547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57550  # "foo.exe" is OK but "foo" is an error.
57551  #
57552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57553  # It is also a way to make sure we got the proper file name for the real test later on.
57554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57555  if test "x$test_shortpath" = x; then
57556    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57557$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57558    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57559  fi
57560
57561  # Call helper function which possibly converts this using DOS-style short mode.
57562  # If so, the updated path is stored in $new_path.
57563
57564  input_path="$new_path"
57565  # Check if we need to convert this using DOS-style short mode. If the path
57566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57567  # take no chances and rewrite it.
57568  # Note: m4 eats our [], so we need to use [ and ] instead.
57569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57570  if test "x$has_forbidden_chars" != x; then
57571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57575      # Going to short mode and back again did indeed matter. Since short mode is
57576      # case insensitive, let's make it lowercase to improve readability.
57577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57578      # Now convert it back to Unix-style (cygpath)
57579      input_path=`$CYGPATH -u "$shortmode_path"`
57580      new_path="$input_path"
57581    fi
57582  fi
57583
57584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57585  if test "x$test_cygdrive_prefix" = x; then
57586    # As a simple fix, exclude /usr/bin since it's not a real path.
57587    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57589      # a path prefixed by /cygdrive for fixpath to work.
57590      new_path="$CYGWIN_ROOT_PATH$input_path"
57591    fi
57592  fi
57593
57594
57595  if test "x$path" != "x$new_path"; then
57596    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57598$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57599  fi
57600
57601    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57602
57603  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57604  has_colon=`$ECHO $path | $GREP ^.:`
57605  new_path="$path"
57606  if test "x$has_colon" = x; then
57607    # Not in mixed or Windows style, start by that.
57608    new_path=`cmd //c echo $path`
57609  fi
57610
57611
57612  input_path="$new_path"
57613  # Check if we need to convert this using DOS-style short mode. If the path
57614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57615  # take no chances and rewrite it.
57616  # Note: m4 eats our [], so we need to use [ and ] instead.
57617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57618  if test "x$has_forbidden_chars" != x; then
57619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57621  fi
57622
57623
57624  windows_path="$new_path"
57625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57626    unix_path=`$CYGPATH -u "$windows_path"`
57627    new_path="$unix_path"
57628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57630    new_path="$unix_path"
57631  fi
57632
57633  if test "x$path" != "x$new_path"; then
57634    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57636$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57637  fi
57638
57639  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57640  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57641
57642    else
57643      # We're on a unix platform. Hooray! :)
57644      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57645      has_space=`$ECHO "$path" | $GREP " "`
57646      if test "x$has_space" != x; then
57647        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57648$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57649        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57650      fi
57651
57652      # Use eval to expand a potential ~
57653      eval path="$path"
57654      if test ! -f "$path" && test ! -d "$path"; then
57655        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57656      fi
57657
57658      if test -d "$path"; then
57659        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57660      else
57661        dir="`$DIRNAME "$path"`"
57662        base="`$BASENAME "$path"`"
57663        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57664      fi
57665    fi
57666  fi
57667
57668
57669  # Only process if variable expands to non-empty
57670
57671  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57672    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57673
57674  # Input might be given as Windows format, start by converting to
57675  # unix format.
57676  path="$POTENTIAL_FREETYPE_LIB_PATH"
57677  new_path=`$CYGPATH -u "$path"`
57678
57679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57682  # "foo.exe" is OK but "foo" is an error.
57683  #
57684  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57685  # It is also a way to make sure we got the proper file name for the real test later on.
57686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57687  if test "x$test_shortpath" = x; then
57688    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57689$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57690    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57691  fi
57692
57693  # Call helper function which possibly converts this using DOS-style short mode.
57694  # If so, the updated path is stored in $new_path.
57695
57696  input_path="$new_path"
57697  # Check if we need to convert this using DOS-style short mode. If the path
57698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57699  # take no chances and rewrite it.
57700  # Note: m4 eats our [], so we need to use [ and ] instead.
57701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57702  if test "x$has_forbidden_chars" != x; then
57703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57707      # Going to short mode and back again did indeed matter. Since short mode is
57708      # case insensitive, let's make it lowercase to improve readability.
57709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57710      # Now convert it back to Unix-style (cygpath)
57711      input_path=`$CYGPATH -u "$shortmode_path"`
57712      new_path="$input_path"
57713    fi
57714  fi
57715
57716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57717  if test "x$test_cygdrive_prefix" = x; then
57718    # As a simple fix, exclude /usr/bin since it's not a real path.
57719    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57721      # a path prefixed by /cygdrive for fixpath to work.
57722      new_path="$CYGWIN_ROOT_PATH$input_path"
57723    fi
57724  fi
57725
57726
57727  if test "x$path" != "x$new_path"; then
57728    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57730$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57731  fi
57732
57733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57734
57735  path="$POTENTIAL_FREETYPE_LIB_PATH"
57736  has_colon=`$ECHO $path | $GREP ^.:`
57737  new_path="$path"
57738  if test "x$has_colon" = x; then
57739    # Not in mixed or Windows style, start by that.
57740    new_path=`cmd //c echo $path`
57741  fi
57742
57743
57744  input_path="$new_path"
57745  # Check if we need to convert this using DOS-style short mode. If the path
57746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57747  # take no chances and rewrite it.
57748  # Note: m4 eats our [], so we need to use [ and ] instead.
57749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57750  if test "x$has_forbidden_chars" != x; then
57751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57753  fi
57754
57755
57756  windows_path="$new_path"
57757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57758    unix_path=`$CYGPATH -u "$windows_path"`
57759    new_path="$unix_path"
57760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57762    new_path="$unix_path"
57763  fi
57764
57765  if test "x$path" != "x$new_path"; then
57766    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57768$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57769  fi
57770
57771  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57772  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57773
57774    else
57775      # We're on a unix platform. Hooray! :)
57776      path="$POTENTIAL_FREETYPE_LIB_PATH"
57777      has_space=`$ECHO "$path" | $GREP " "`
57778      if test "x$has_space" != x; then
57779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57780$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57781        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57782      fi
57783
57784      # Use eval to expand a potential ~
57785      eval path="$path"
57786      if test ! -f "$path" && test ! -d "$path"; then
57787        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57788      fi
57789
57790      if test -d "$path"; then
57791        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57792      else
57793        dir="`$DIRNAME "$path"`"
57794        base="`$BASENAME "$path"`"
57795        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57796      fi
57797    fi
57798  fi
57799
57800
57801    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57803$as_echo_n "checking for freetype includes... " >&6; }
57804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57805$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57806    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57808$as_echo_n "checking for freetype libraries... " >&6; }
57809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57810$as_echo "$FREETYPE_LIB_PATH" >&6; }
57811  fi
57812
57813        if test "x$FOUND_FREETYPE" != xyes; then
57814          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57815        fi
57816      else
57817        # User specified only one of lib or include. This is an error.
57818        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57819          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57820$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57821          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57822        else
57823          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57824$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57825          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57826        fi
57827      fi
57828    else
57829      # User did not specify settings, but we need freetype. Try to locate it.
57830
57831      if test "x$BUNDLE_FREETYPE" = x; then
57832        # If not specified, default is to bundle freetype only on windows
57833        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57834          BUNDLE_FREETYPE=yes
57835        else
57836          BUNDLE_FREETYPE=no
57837        fi
57838      fi
57839
57840      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57841      if test "x$SYSROOT" = x; then
57842        if test "x$FOUND_FREETYPE" != xyes; then
57843          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57844          if test "x$PKG_CONFIG" != x; then
57845
57846pkg_failed=no
57847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57848$as_echo_n "checking for FREETYPE... " >&6; }
57849
57850if test -n "$FREETYPE_CFLAGS"; then
57851    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57852 elif test -n "$PKG_CONFIG"; then
57853    if test -n "$PKG_CONFIG" && \
57854    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57855  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57856  ac_status=$?
57857  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57858  test $ac_status = 0; }; then
57859  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57860else
57861  pkg_failed=yes
57862fi
57863 else
57864    pkg_failed=untried
57865fi
57866if test -n "$FREETYPE_LIBS"; then
57867    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57868 elif test -n "$PKG_CONFIG"; then
57869    if test -n "$PKG_CONFIG" && \
57870    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57871  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57872  ac_status=$?
57873  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57874  test $ac_status = 0; }; then
57875  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57876else
57877  pkg_failed=yes
57878fi
57879 else
57880    pkg_failed=untried
57881fi
57882
57883
57884
57885if test $pkg_failed = yes; then
57886
57887if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57888        _pkg_short_errors_supported=yes
57889else
57890        _pkg_short_errors_supported=no
57891fi
57892        if test $_pkg_short_errors_supported = yes; then
57893	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57894        else
57895	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57896        fi
57897	# Put the nasty error message in config.log where it belongs
57898	echo "$FREETYPE_PKG_ERRORS" >&5
57899
57900	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57901$as_echo "no" >&6; }
57902                FOUND_FREETYPE=no
57903elif test $pkg_failed = untried; then
57904	FOUND_FREETYPE=no
57905else
57906	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57907	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57909$as_echo "yes" >&6; }
57910	FOUND_FREETYPE=yes
57911fi
57912            if test "x$FOUND_FREETYPE" = xyes; then
57913              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57914              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57915              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57916              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57917                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57918              fi
57919              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57920              if test "x$BUNDLE_FREETYPE" = xyes; then
57921                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57922$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57923                FOUND_FREETYPE=no
57924              else
57925                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57926$as_echo_n "checking for freetype... " >&6; }
57927                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57928$as_echo "yes (using pkg-config)" >&6; }
57929              fi
57930            fi
57931          fi
57932        fi
57933      fi
57934
57935      if test "x$FOUND_FREETYPE" != xyes; then
57936        # Check in well-known locations
57937        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57938          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57939
57940  windows_path="$FREETYPE_BASE_DIR"
57941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57942    unix_path=`$CYGPATH -u "$windows_path"`
57943    FREETYPE_BASE_DIR="$unix_path"
57944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57946    FREETYPE_BASE_DIR="$unix_path"
57947  fi
57948
57949
57950  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57951  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57952  METHOD="well-known location"
57953
57954  # Let's start with an optimistic view of the world :-)
57955  FOUND_FREETYPE=yes
57956
57957  # First look for the canonical freetype main include file ft2build.h.
57958  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57959    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57960    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57961    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57962      # Fail.
57963      FOUND_FREETYPE=no
57964    fi
57965  fi
57966
57967  if test "x$FOUND_FREETYPE" = xyes; then
57968    # Include file found, let's continue the sanity check.
57969    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57970$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57971
57972    # Reset to default value
57973    FREETYPE_BASE_NAME=freetype
57974    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57975    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57976      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57977          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57978        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57979        # for the .6 version explicitly.
57980        FREETYPE_BASE_NAME=freetype.6
57981        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57982        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57983$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57984      else
57985        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57986$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57987        FOUND_FREETYPE=no
57988      fi
57989    else
57990      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57991        # On Windows, we will need both .lib and .dll file.
57992        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57993          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57994$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57995          FOUND_FREETYPE=no
57996        fi
57997      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57998          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57999        # Found lib in isa dir, use that instead.
58000        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58001        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58002$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58003      fi
58004    fi
58005  fi
58006
58007  if test "x$FOUND_FREETYPE" = xyes; then
58008
58009  # Only process if variable expands to non-empty
58010
58011  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58013
58014  # Input might be given as Windows format, start by converting to
58015  # unix format.
58016  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58017  new_path=`$CYGPATH -u "$path"`
58018
58019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58022  # "foo.exe" is OK but "foo" is an error.
58023  #
58024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58025  # It is also a way to make sure we got the proper file name for the real test later on.
58026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58027  if test "x$test_shortpath" = x; then
58028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58029$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58030    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58031  fi
58032
58033  # Call helper function which possibly converts this using DOS-style short mode.
58034  # If so, the updated path is stored in $new_path.
58035
58036  input_path="$new_path"
58037  # Check if we need to convert this using DOS-style short mode. If the path
58038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58039  # take no chances and rewrite it.
58040  # Note: m4 eats our [], so we need to use [ and ] instead.
58041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58042  if test "x$has_forbidden_chars" != x; then
58043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58047      # Going to short mode and back again did indeed matter. Since short mode is
58048      # case insensitive, let's make it lowercase to improve readability.
58049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58050      # Now convert it back to Unix-style (cygpath)
58051      input_path=`$CYGPATH -u "$shortmode_path"`
58052      new_path="$input_path"
58053    fi
58054  fi
58055
58056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58057  if test "x$test_cygdrive_prefix" = x; then
58058    # As a simple fix, exclude /usr/bin since it's not a real path.
58059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58061      # a path prefixed by /cygdrive for fixpath to work.
58062      new_path="$CYGWIN_ROOT_PATH$input_path"
58063    fi
58064  fi
58065
58066
58067  if test "x$path" != "x$new_path"; then
58068    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58070$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58071  fi
58072
58073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58074
58075  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58076  has_colon=`$ECHO $path | $GREP ^.:`
58077  new_path="$path"
58078  if test "x$has_colon" = x; then
58079    # Not in mixed or Windows style, start by that.
58080    new_path=`cmd //c echo $path`
58081  fi
58082
58083
58084  input_path="$new_path"
58085  # Check if we need to convert this using DOS-style short mode. If the path
58086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58087  # take no chances and rewrite it.
58088  # Note: m4 eats our [], so we need to use [ and ] instead.
58089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58090  if test "x$has_forbidden_chars" != x; then
58091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58093  fi
58094
58095
58096  windows_path="$new_path"
58097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58098    unix_path=`$CYGPATH -u "$windows_path"`
58099    new_path="$unix_path"
58100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58102    new_path="$unix_path"
58103  fi
58104
58105  if test "x$path" != "x$new_path"; then
58106    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58108$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58109  fi
58110
58111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58113
58114    else
58115      # We're on a unix platform. Hooray! :)
58116      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58117      has_space=`$ECHO "$path" | $GREP " "`
58118      if test "x$has_space" != x; then
58119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58120$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58122      fi
58123
58124      # Use eval to expand a potential ~
58125      eval path="$path"
58126      if test ! -f "$path" && test ! -d "$path"; then
58127        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58128      fi
58129
58130      if test -d "$path"; then
58131        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58132      else
58133        dir="`$DIRNAME "$path"`"
58134        base="`$BASENAME "$path"`"
58135        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58136      fi
58137    fi
58138  fi
58139
58140
58141  # Only process if variable expands to non-empty
58142
58143  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58145
58146  # Input might be given as Windows format, start by converting to
58147  # unix format.
58148  path="$POTENTIAL_FREETYPE_LIB_PATH"
58149  new_path=`$CYGPATH -u "$path"`
58150
58151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58154  # "foo.exe" is OK but "foo" is an error.
58155  #
58156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58157  # It is also a way to make sure we got the proper file name for the real test later on.
58158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58159  if test "x$test_shortpath" = x; then
58160    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58161$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58162    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58163  fi
58164
58165  # Call helper function which possibly converts this using DOS-style short mode.
58166  # If so, the updated path is stored in $new_path.
58167
58168  input_path="$new_path"
58169  # Check if we need to convert this using DOS-style short mode. If the path
58170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58171  # take no chances and rewrite it.
58172  # Note: m4 eats our [], so we need to use [ and ] instead.
58173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58174  if test "x$has_forbidden_chars" != x; then
58175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58179      # Going to short mode and back again did indeed matter. Since short mode is
58180      # case insensitive, let's make it lowercase to improve readability.
58181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58182      # Now convert it back to Unix-style (cygpath)
58183      input_path=`$CYGPATH -u "$shortmode_path"`
58184      new_path="$input_path"
58185    fi
58186  fi
58187
58188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58189  if test "x$test_cygdrive_prefix" = x; then
58190    # As a simple fix, exclude /usr/bin since it's not a real path.
58191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58193      # a path prefixed by /cygdrive for fixpath to work.
58194      new_path="$CYGWIN_ROOT_PATH$input_path"
58195    fi
58196  fi
58197
58198
58199  if test "x$path" != "x$new_path"; then
58200    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58202$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58203  fi
58204
58205    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58206
58207  path="$POTENTIAL_FREETYPE_LIB_PATH"
58208  has_colon=`$ECHO $path | $GREP ^.:`
58209  new_path="$path"
58210  if test "x$has_colon" = x; then
58211    # Not in mixed or Windows style, start by that.
58212    new_path=`cmd //c echo $path`
58213  fi
58214
58215
58216  input_path="$new_path"
58217  # Check if we need to convert this using DOS-style short mode. If the path
58218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58219  # take no chances and rewrite it.
58220  # Note: m4 eats our [], so we need to use [ and ] instead.
58221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58222  if test "x$has_forbidden_chars" != x; then
58223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58225  fi
58226
58227
58228  windows_path="$new_path"
58229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58230    unix_path=`$CYGPATH -u "$windows_path"`
58231    new_path="$unix_path"
58232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58234    new_path="$unix_path"
58235  fi
58236
58237  if test "x$path" != "x$new_path"; then
58238    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58241  fi
58242
58243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58245
58246    else
58247      # We're on a unix platform. Hooray! :)
58248      path="$POTENTIAL_FREETYPE_LIB_PATH"
58249      has_space=`$ECHO "$path" | $GREP " "`
58250      if test "x$has_space" != x; then
58251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58252$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58253        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58254      fi
58255
58256      # Use eval to expand a potential ~
58257      eval path="$path"
58258      if test ! -f "$path" && test ! -d "$path"; then
58259        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58260      fi
58261
58262      if test -d "$path"; then
58263        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58264      else
58265        dir="`$DIRNAME "$path"`"
58266        base="`$BASENAME "$path"`"
58267        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58268      fi
58269    fi
58270  fi
58271
58272
58273    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58275$as_echo_n "checking for freetype includes... " >&6; }
58276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58277$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58278    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58280$as_echo_n "checking for freetype libraries... " >&6; }
58281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58282$as_echo "$FREETYPE_LIB_PATH" >&6; }
58283  fi
58284
58285          if test "x$FOUND_FREETYPE" != xyes; then
58286            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58287
58288  windows_path="$FREETYPE_BASE_DIR"
58289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58290    unix_path=`$CYGPATH -u "$windows_path"`
58291    FREETYPE_BASE_DIR="$unix_path"
58292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58294    FREETYPE_BASE_DIR="$unix_path"
58295  fi
58296
58297
58298  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58299  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58300  METHOD="well-known location"
58301
58302  # Let's start with an optimistic view of the world :-)
58303  FOUND_FREETYPE=yes
58304
58305  # First look for the canonical freetype main include file ft2build.h.
58306  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58307    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58308    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58309    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58310      # Fail.
58311      FOUND_FREETYPE=no
58312    fi
58313  fi
58314
58315  if test "x$FOUND_FREETYPE" = xyes; then
58316    # Include file found, let's continue the sanity check.
58317    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58318$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58319
58320    # Reset to default value
58321    FREETYPE_BASE_NAME=freetype
58322    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58323    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58324      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58325          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58326        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58327        # for the .6 version explicitly.
58328        FREETYPE_BASE_NAME=freetype.6
58329        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58330        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58331$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58332      else
58333        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58334$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58335        FOUND_FREETYPE=no
58336      fi
58337    else
58338      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58339        # On Windows, we will need both .lib and .dll file.
58340        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58341          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58342$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58343          FOUND_FREETYPE=no
58344        fi
58345      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58346          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58347        # Found lib in isa dir, use that instead.
58348        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58349        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58350$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58351      fi
58352    fi
58353  fi
58354
58355  if test "x$FOUND_FREETYPE" = xyes; then
58356
58357  # Only process if variable expands to non-empty
58358
58359  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58361
58362  # Input might be given as Windows format, start by converting to
58363  # unix format.
58364  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58365  new_path=`$CYGPATH -u "$path"`
58366
58367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58370  # "foo.exe" is OK but "foo" is an error.
58371  #
58372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58373  # It is also a way to make sure we got the proper file name for the real test later on.
58374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58375  if test "x$test_shortpath" = x; then
58376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58377$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58378    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58379  fi
58380
58381  # Call helper function which possibly converts this using DOS-style short mode.
58382  # If so, the updated path is stored in $new_path.
58383
58384  input_path="$new_path"
58385  # Check if we need to convert this using DOS-style short mode. If the path
58386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58387  # take no chances and rewrite it.
58388  # Note: m4 eats our [], so we need to use [ and ] instead.
58389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58390  if test "x$has_forbidden_chars" != x; then
58391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58395      # Going to short mode and back again did indeed matter. Since short mode is
58396      # case insensitive, let's make it lowercase to improve readability.
58397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58398      # Now convert it back to Unix-style (cygpath)
58399      input_path=`$CYGPATH -u "$shortmode_path"`
58400      new_path="$input_path"
58401    fi
58402  fi
58403
58404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58405  if test "x$test_cygdrive_prefix" = x; then
58406    # As a simple fix, exclude /usr/bin since it's not a real path.
58407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58409      # a path prefixed by /cygdrive for fixpath to work.
58410      new_path="$CYGWIN_ROOT_PATH$input_path"
58411    fi
58412  fi
58413
58414
58415  if test "x$path" != "x$new_path"; then
58416    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58418$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58419  fi
58420
58421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58422
58423  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58424  has_colon=`$ECHO $path | $GREP ^.:`
58425  new_path="$path"
58426  if test "x$has_colon" = x; then
58427    # Not in mixed or Windows style, start by that.
58428    new_path=`cmd //c echo $path`
58429  fi
58430
58431
58432  input_path="$new_path"
58433  # Check if we need to convert this using DOS-style short mode. If the path
58434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58435  # take no chances and rewrite it.
58436  # Note: m4 eats our [], so we need to use [ and ] instead.
58437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58438  if test "x$has_forbidden_chars" != x; then
58439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58441  fi
58442
58443
58444  windows_path="$new_path"
58445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58446    unix_path=`$CYGPATH -u "$windows_path"`
58447    new_path="$unix_path"
58448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58450    new_path="$unix_path"
58451  fi
58452
58453  if test "x$path" != "x$new_path"; then
58454    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58456$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58457  fi
58458
58459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58461
58462    else
58463      # We're on a unix platform. Hooray! :)
58464      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58465      has_space=`$ECHO "$path" | $GREP " "`
58466      if test "x$has_space" != x; then
58467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58468$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58470      fi
58471
58472      # Use eval to expand a potential ~
58473      eval path="$path"
58474      if test ! -f "$path" && test ! -d "$path"; then
58475        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58476      fi
58477
58478      if test -d "$path"; then
58479        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58480      else
58481        dir="`$DIRNAME "$path"`"
58482        base="`$BASENAME "$path"`"
58483        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58484      fi
58485    fi
58486  fi
58487
58488
58489  # Only process if variable expands to non-empty
58490
58491  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58492    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58493
58494  # Input might be given as Windows format, start by converting to
58495  # unix format.
58496  path="$POTENTIAL_FREETYPE_LIB_PATH"
58497  new_path=`$CYGPATH -u "$path"`
58498
58499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58502  # "foo.exe" is OK but "foo" is an error.
58503  #
58504  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58505  # It is also a way to make sure we got the proper file name for the real test later on.
58506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58507  if test "x$test_shortpath" = x; then
58508    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58509$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58510    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58511  fi
58512
58513  # Call helper function which possibly converts this using DOS-style short mode.
58514  # If so, the updated path is stored in $new_path.
58515
58516  input_path="$new_path"
58517  # Check if we need to convert this using DOS-style short mode. If the path
58518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58519  # take no chances and rewrite it.
58520  # Note: m4 eats our [], so we need to use [ and ] instead.
58521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58522  if test "x$has_forbidden_chars" != x; then
58523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58524    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58525    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58526    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58527      # Going to short mode and back again did indeed matter. Since short mode is
58528      # case insensitive, let's make it lowercase to improve readability.
58529      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58530      # Now convert it back to Unix-style (cygpath)
58531      input_path=`$CYGPATH -u "$shortmode_path"`
58532      new_path="$input_path"
58533    fi
58534  fi
58535
58536  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58537  if test "x$test_cygdrive_prefix" = x; then
58538    # As a simple fix, exclude /usr/bin since it's not a real path.
58539    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58540      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58541      # a path prefixed by /cygdrive for fixpath to work.
58542      new_path="$CYGWIN_ROOT_PATH$input_path"
58543    fi
58544  fi
58545
58546
58547  if test "x$path" != "x$new_path"; then
58548    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58550$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58551  fi
58552
58553    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58554
58555  path="$POTENTIAL_FREETYPE_LIB_PATH"
58556  has_colon=`$ECHO $path | $GREP ^.:`
58557  new_path="$path"
58558  if test "x$has_colon" = x; then
58559    # Not in mixed or Windows style, start by that.
58560    new_path=`cmd //c echo $path`
58561  fi
58562
58563
58564  input_path="$new_path"
58565  # Check if we need to convert this using DOS-style short mode. If the path
58566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58567  # take no chances and rewrite it.
58568  # Note: m4 eats our [], so we need to use [ and ] instead.
58569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58570  if test "x$has_forbidden_chars" != x; then
58571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58572    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58573  fi
58574
58575
58576  windows_path="$new_path"
58577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58578    unix_path=`$CYGPATH -u "$windows_path"`
58579    new_path="$unix_path"
58580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58582    new_path="$unix_path"
58583  fi
58584
58585  if test "x$path" != "x$new_path"; then
58586    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58588$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58589  fi
58590
58591  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58592  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58593
58594    else
58595      # We're on a unix platform. Hooray! :)
58596      path="$POTENTIAL_FREETYPE_LIB_PATH"
58597      has_space=`$ECHO "$path" | $GREP " "`
58598      if test "x$has_space" != x; then
58599        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58600$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58601        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58602      fi
58603
58604      # Use eval to expand a potential ~
58605      eval path="$path"
58606      if test ! -f "$path" && test ! -d "$path"; then
58607        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58608      fi
58609
58610      if test -d "$path"; then
58611        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58612      else
58613        dir="`$DIRNAME "$path"`"
58614        base="`$BASENAME "$path"`"
58615        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58616      fi
58617    fi
58618  fi
58619
58620
58621    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58623$as_echo_n "checking for freetype includes... " >&6; }
58624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58625$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58626    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58627    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58628$as_echo_n "checking for freetype libraries... " >&6; }
58629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58630$as_echo "$FREETYPE_LIB_PATH" >&6; }
58631  fi
58632
58633          fi
58634          if test "x$FOUND_FREETYPE" != xyes; then
58635            FREETYPE_BASE_DIR="$HOME/freetype"
58636
58637  windows_path="$FREETYPE_BASE_DIR"
58638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58639    unix_path=`$CYGPATH -u "$windows_path"`
58640    FREETYPE_BASE_DIR="$unix_path"
58641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58643    FREETYPE_BASE_DIR="$unix_path"
58644  fi
58645
58646            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58647
58648  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58649  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58650  METHOD="well-known location"
58651
58652  # Let's start with an optimistic view of the world :-)
58653  FOUND_FREETYPE=yes
58654
58655  # First look for the canonical freetype main include file ft2build.h.
58656  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58657    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58658    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58659    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58660      # Fail.
58661      FOUND_FREETYPE=no
58662    fi
58663  fi
58664
58665  if test "x$FOUND_FREETYPE" = xyes; then
58666    # Include file found, let's continue the sanity check.
58667    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58668$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58669
58670    # Reset to default value
58671    FREETYPE_BASE_NAME=freetype
58672    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58673    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58674      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58675          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58676        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58677        # for the .6 version explicitly.
58678        FREETYPE_BASE_NAME=freetype.6
58679        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58680        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58681$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58682      else
58683        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58684$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58685        FOUND_FREETYPE=no
58686      fi
58687    else
58688      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58689        # On Windows, we will need both .lib and .dll file.
58690        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58691          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58692$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58693          FOUND_FREETYPE=no
58694        fi
58695      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58696          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58697        # Found lib in isa dir, use that instead.
58698        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58699        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58700$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58701      fi
58702    fi
58703  fi
58704
58705  if test "x$FOUND_FREETYPE" = xyes; then
58706
58707  # Only process if variable expands to non-empty
58708
58709  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58711
58712  # Input might be given as Windows format, start by converting to
58713  # unix format.
58714  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58715  new_path=`$CYGPATH -u "$path"`
58716
58717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58720  # "foo.exe" is OK but "foo" is an error.
58721  #
58722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58723  # It is also a way to make sure we got the proper file name for the real test later on.
58724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58725  if test "x$test_shortpath" = x; then
58726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58727$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58728    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58729  fi
58730
58731  # Call helper function which possibly converts this using DOS-style short mode.
58732  # If so, the updated path is stored in $new_path.
58733
58734  input_path="$new_path"
58735  # Check if we need to convert this using DOS-style short mode. If the path
58736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58737  # take no chances and rewrite it.
58738  # Note: m4 eats our [], so we need to use [ and ] instead.
58739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58740  if test "x$has_forbidden_chars" != x; then
58741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58745      # Going to short mode and back again did indeed matter. Since short mode is
58746      # case insensitive, let's make it lowercase to improve readability.
58747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58748      # Now convert it back to Unix-style (cygpath)
58749      input_path=`$CYGPATH -u "$shortmode_path"`
58750      new_path="$input_path"
58751    fi
58752  fi
58753
58754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58755  if test "x$test_cygdrive_prefix" = x; then
58756    # As a simple fix, exclude /usr/bin since it's not a real path.
58757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58759      # a path prefixed by /cygdrive for fixpath to work.
58760      new_path="$CYGWIN_ROOT_PATH$input_path"
58761    fi
58762  fi
58763
58764
58765  if test "x$path" != "x$new_path"; then
58766    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58768$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58769  fi
58770
58771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58772
58773  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58774  has_colon=`$ECHO $path | $GREP ^.:`
58775  new_path="$path"
58776  if test "x$has_colon" = x; then
58777    # Not in mixed or Windows style, start by that.
58778    new_path=`cmd //c echo $path`
58779  fi
58780
58781
58782  input_path="$new_path"
58783  # Check if we need to convert this using DOS-style short mode. If the path
58784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58785  # take no chances and rewrite it.
58786  # Note: m4 eats our [], so we need to use [ and ] instead.
58787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58788  if test "x$has_forbidden_chars" != x; then
58789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58791  fi
58792
58793
58794  windows_path="$new_path"
58795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58796    unix_path=`$CYGPATH -u "$windows_path"`
58797    new_path="$unix_path"
58798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58800    new_path="$unix_path"
58801  fi
58802
58803  if test "x$path" != "x$new_path"; then
58804    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58806$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58807  fi
58808
58809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58811
58812    else
58813      # We're on a unix platform. Hooray! :)
58814      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58815      has_space=`$ECHO "$path" | $GREP " "`
58816      if test "x$has_space" != x; then
58817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58818$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58820      fi
58821
58822      # Use eval to expand a potential ~
58823      eval path="$path"
58824      if test ! -f "$path" && test ! -d "$path"; then
58825        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58826      fi
58827
58828      if test -d "$path"; then
58829        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58830      else
58831        dir="`$DIRNAME "$path"`"
58832        base="`$BASENAME "$path"`"
58833        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58834      fi
58835    fi
58836  fi
58837
58838
58839  # Only process if variable expands to non-empty
58840
58841  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58843
58844  # Input might be given as Windows format, start by converting to
58845  # unix format.
58846  path="$POTENTIAL_FREETYPE_LIB_PATH"
58847  new_path=`$CYGPATH -u "$path"`
58848
58849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58852  # "foo.exe" is OK but "foo" is an error.
58853  #
58854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58855  # It is also a way to make sure we got the proper file name for the real test later on.
58856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58857  if test "x$test_shortpath" = x; then
58858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58859$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58860    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58861  fi
58862
58863  # Call helper function which possibly converts this using DOS-style short mode.
58864  # If so, the updated path is stored in $new_path.
58865
58866  input_path="$new_path"
58867  # Check if we need to convert this using DOS-style short mode. If the path
58868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58869  # take no chances and rewrite it.
58870  # Note: m4 eats our [], so we need to use [ and ] instead.
58871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58872  if test "x$has_forbidden_chars" != x; then
58873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58877      # Going to short mode and back again did indeed matter. Since short mode is
58878      # case insensitive, let's make it lowercase to improve readability.
58879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58880      # Now convert it back to Unix-style (cygpath)
58881      input_path=`$CYGPATH -u "$shortmode_path"`
58882      new_path="$input_path"
58883    fi
58884  fi
58885
58886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58887  if test "x$test_cygdrive_prefix" = x; then
58888    # As a simple fix, exclude /usr/bin since it's not a real path.
58889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58891      # a path prefixed by /cygdrive for fixpath to work.
58892      new_path="$CYGWIN_ROOT_PATH$input_path"
58893    fi
58894  fi
58895
58896
58897  if test "x$path" != "x$new_path"; then
58898    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58900$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58901  fi
58902
58903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58904
58905  path="$POTENTIAL_FREETYPE_LIB_PATH"
58906  has_colon=`$ECHO $path | $GREP ^.:`
58907  new_path="$path"
58908  if test "x$has_colon" = x; then
58909    # Not in mixed or Windows style, start by that.
58910    new_path=`cmd //c echo $path`
58911  fi
58912
58913
58914  input_path="$new_path"
58915  # Check if we need to convert this using DOS-style short mode. If the path
58916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58917  # take no chances and rewrite it.
58918  # Note: m4 eats our [], so we need to use [ and ] instead.
58919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58920  if test "x$has_forbidden_chars" != x; then
58921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58923  fi
58924
58925
58926  windows_path="$new_path"
58927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58928    unix_path=`$CYGPATH -u "$windows_path"`
58929    new_path="$unix_path"
58930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58932    new_path="$unix_path"
58933  fi
58934
58935  if test "x$path" != "x$new_path"; then
58936    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58938$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58939  fi
58940
58941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58943
58944    else
58945      # We're on a unix platform. Hooray! :)
58946      path="$POTENTIAL_FREETYPE_LIB_PATH"
58947      has_space=`$ECHO "$path" | $GREP " "`
58948      if test "x$has_space" != x; then
58949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58950$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58952      fi
58953
58954      # Use eval to expand a potential ~
58955      eval path="$path"
58956      if test ! -f "$path" && test ! -d "$path"; then
58957        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58958      fi
58959
58960      if test -d "$path"; then
58961        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58962      else
58963        dir="`$DIRNAME "$path"`"
58964        base="`$BASENAME "$path"`"
58965        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58966      fi
58967    fi
58968  fi
58969
58970
58971    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58973$as_echo_n "checking for freetype includes... " >&6; }
58974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58975$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58976    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58977    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58978$as_echo_n "checking for freetype libraries... " >&6; }
58979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58980$as_echo "$FREETYPE_LIB_PATH" >&6; }
58981  fi
58982
58983            else
58984
58985  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58986  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58987  METHOD="well-known location"
58988
58989  # Let's start with an optimistic view of the world :-)
58990  FOUND_FREETYPE=yes
58991
58992  # First look for the canonical freetype main include file ft2build.h.
58993  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58994    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58995    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58996    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58997      # Fail.
58998      FOUND_FREETYPE=no
58999    fi
59000  fi
59001
59002  if test "x$FOUND_FREETYPE" = xyes; then
59003    # Include file found, let's continue the sanity check.
59004    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59005$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59006
59007    # Reset to default value
59008    FREETYPE_BASE_NAME=freetype
59009    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59010    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59011      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59012          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59013        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59014        # for the .6 version explicitly.
59015        FREETYPE_BASE_NAME=freetype.6
59016        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59017        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59018$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59019      else
59020        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59021$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59022        FOUND_FREETYPE=no
59023      fi
59024    else
59025      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59026        # On Windows, we will need both .lib and .dll file.
59027        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59028          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59029$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59030          FOUND_FREETYPE=no
59031        fi
59032      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59033          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59034        # Found lib in isa dir, use that instead.
59035        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59036        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59037$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59038      fi
59039    fi
59040  fi
59041
59042  if test "x$FOUND_FREETYPE" = xyes; then
59043
59044  # Only process if variable expands to non-empty
59045
59046  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59048
59049  # Input might be given as Windows format, start by converting to
59050  # unix format.
59051  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59052  new_path=`$CYGPATH -u "$path"`
59053
59054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59057  # "foo.exe" is OK but "foo" is an error.
59058  #
59059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59060  # It is also a way to make sure we got the proper file name for the real test later on.
59061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59062  if test "x$test_shortpath" = x; then
59063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59064$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59065    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59066  fi
59067
59068  # Call helper function which possibly converts this using DOS-style short mode.
59069  # If so, the updated path is stored in $new_path.
59070
59071  input_path="$new_path"
59072  # Check if we need to convert this using DOS-style short mode. If the path
59073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59074  # take no chances and rewrite it.
59075  # Note: m4 eats our [], so we need to use [ and ] instead.
59076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59077  if test "x$has_forbidden_chars" != x; then
59078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59082      # Going to short mode and back again did indeed matter. Since short mode is
59083      # case insensitive, let's make it lowercase to improve readability.
59084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59085      # Now convert it back to Unix-style (cygpath)
59086      input_path=`$CYGPATH -u "$shortmode_path"`
59087      new_path="$input_path"
59088    fi
59089  fi
59090
59091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59092  if test "x$test_cygdrive_prefix" = x; then
59093    # As a simple fix, exclude /usr/bin since it's not a real path.
59094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59096      # a path prefixed by /cygdrive for fixpath to work.
59097      new_path="$CYGWIN_ROOT_PATH$input_path"
59098    fi
59099  fi
59100
59101
59102  if test "x$path" != "x$new_path"; then
59103    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59105$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59106  fi
59107
59108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59109
59110  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59111  has_colon=`$ECHO $path | $GREP ^.:`
59112  new_path="$path"
59113  if test "x$has_colon" = x; then
59114    # Not in mixed or Windows style, start by that.
59115    new_path=`cmd //c echo $path`
59116  fi
59117
59118
59119  input_path="$new_path"
59120  # Check if we need to convert this using DOS-style short mode. If the path
59121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59122  # take no chances and rewrite it.
59123  # Note: m4 eats our [], so we need to use [ and ] instead.
59124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59125  if test "x$has_forbidden_chars" != x; then
59126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59128  fi
59129
59130
59131  windows_path="$new_path"
59132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59133    unix_path=`$CYGPATH -u "$windows_path"`
59134    new_path="$unix_path"
59135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59137    new_path="$unix_path"
59138  fi
59139
59140  if test "x$path" != "x$new_path"; then
59141    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59143$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59144  fi
59145
59146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59148
59149    else
59150      # We're on a unix platform. Hooray! :)
59151      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59152      has_space=`$ECHO "$path" | $GREP " "`
59153      if test "x$has_space" != x; then
59154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59155$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59157      fi
59158
59159      # Use eval to expand a potential ~
59160      eval path="$path"
59161      if test ! -f "$path" && test ! -d "$path"; then
59162        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59163      fi
59164
59165      if test -d "$path"; then
59166        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59167      else
59168        dir="`$DIRNAME "$path"`"
59169        base="`$BASENAME "$path"`"
59170        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59171      fi
59172    fi
59173  fi
59174
59175
59176  # Only process if variable expands to non-empty
59177
59178  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59180
59181  # Input might be given as Windows format, start by converting to
59182  # unix format.
59183  path="$POTENTIAL_FREETYPE_LIB_PATH"
59184  new_path=`$CYGPATH -u "$path"`
59185
59186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59189  # "foo.exe" is OK but "foo" is an error.
59190  #
59191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59192  # It is also a way to make sure we got the proper file name for the real test later on.
59193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59194  if test "x$test_shortpath" = x; then
59195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59196$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59197    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59198  fi
59199
59200  # Call helper function which possibly converts this using DOS-style short mode.
59201  # If so, the updated path is stored in $new_path.
59202
59203  input_path="$new_path"
59204  # Check if we need to convert this using DOS-style short mode. If the path
59205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59206  # take no chances and rewrite it.
59207  # Note: m4 eats our [], so we need to use [ and ] instead.
59208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59209  if test "x$has_forbidden_chars" != x; then
59210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59214      # Going to short mode and back again did indeed matter. Since short mode is
59215      # case insensitive, let's make it lowercase to improve readability.
59216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59217      # Now convert it back to Unix-style (cygpath)
59218      input_path=`$CYGPATH -u "$shortmode_path"`
59219      new_path="$input_path"
59220    fi
59221  fi
59222
59223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59224  if test "x$test_cygdrive_prefix" = x; then
59225    # As a simple fix, exclude /usr/bin since it's not a real path.
59226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59228      # a path prefixed by /cygdrive for fixpath to work.
59229      new_path="$CYGWIN_ROOT_PATH$input_path"
59230    fi
59231  fi
59232
59233
59234  if test "x$path" != "x$new_path"; then
59235    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59237$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59238  fi
59239
59240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59241
59242  path="$POTENTIAL_FREETYPE_LIB_PATH"
59243  has_colon=`$ECHO $path | $GREP ^.:`
59244  new_path="$path"
59245  if test "x$has_colon" = x; then
59246    # Not in mixed or Windows style, start by that.
59247    new_path=`cmd //c echo $path`
59248  fi
59249
59250
59251  input_path="$new_path"
59252  # Check if we need to convert this using DOS-style short mode. If the path
59253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59254  # take no chances and rewrite it.
59255  # Note: m4 eats our [], so we need to use [ and ] instead.
59256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59257  if test "x$has_forbidden_chars" != x; then
59258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59260  fi
59261
59262
59263  windows_path="$new_path"
59264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59265    unix_path=`$CYGPATH -u "$windows_path"`
59266    new_path="$unix_path"
59267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59269    new_path="$unix_path"
59270  fi
59271
59272  if test "x$path" != "x$new_path"; then
59273    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59276  fi
59277
59278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59280
59281    else
59282      # We're on a unix platform. Hooray! :)
59283      path="$POTENTIAL_FREETYPE_LIB_PATH"
59284      has_space=`$ECHO "$path" | $GREP " "`
59285      if test "x$has_space" != x; then
59286        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59287$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59288        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59289      fi
59290
59291      # Use eval to expand a potential ~
59292      eval path="$path"
59293      if test ! -f "$path" && test ! -d "$path"; then
59294        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59295      fi
59296
59297      if test -d "$path"; then
59298        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59299      else
59300        dir="`$DIRNAME "$path"`"
59301        base="`$BASENAME "$path"`"
59302        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59303      fi
59304    fi
59305  fi
59306
59307
59308    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59310$as_echo_n "checking for freetype includes... " >&6; }
59311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59312$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59313    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59315$as_echo_n "checking for freetype libraries... " >&6; }
59316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59317$as_echo "$FREETYPE_LIB_PATH" >&6; }
59318  fi
59319
59320            fi
59321            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59322                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59323              # Source is available, as a last resort try to build freetype in default location
59324
59325  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59326  BUILD_FREETYPE=yes
59327
59328  # Check if the freetype sources are acessible..
59329  if ! test -d $FREETYPE_SRC_PATH; then
59330    { $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
59331$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59332    BUILD_FREETYPE=no
59333  fi
59334  # ..and contain a vc2010 project file
59335  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59336  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59337    { $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
59338$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59339    BUILD_FREETYPE=no
59340  fi
59341  # Now check if configure found a version of 'msbuild.exe'
59342  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59343    { $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
59344$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;}
59345    BUILD_FREETYPE=no
59346  fi
59347
59348  # Ready to go..
59349  if test "x$BUILD_FREETYPE" = xyes; then
59350    # msbuild requires trailing slashes for output directories
59351    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59352    freetype_lib_path_unix="$freetype_lib_path"
59353    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59354
59355  unix_path="$vcxproj_path"
59356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59357    windows_path=`$CYGPATH -m "$unix_path"`
59358    vcxproj_path="$windows_path"
59359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59360    windows_path=`cmd //c echo $unix_path`
59361    vcxproj_path="$windows_path"
59362  fi
59363
59364
59365  unix_path="$freetype_lib_path"
59366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59367    windows_path=`$CYGPATH -m "$unix_path"`
59368    freetype_lib_path="$windows_path"
59369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59370    windows_path=`cmd //c echo $unix_path`
59371    freetype_lib_path="$windows_path"
59372  fi
59373
59374
59375  unix_path="$freetype_obj_path"
59376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59377    windows_path=`$CYGPATH -m "$unix_path"`
59378    freetype_obj_path="$windows_path"
59379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59380    windows_path=`cmd //c echo $unix_path`
59381    freetype_obj_path="$windows_path"
59382  fi
59383
59384    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59385      freetype_platform=x64
59386    else
59387      freetype_platform=win32
59388    fi
59389
59390    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59391    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59392    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59393    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59394    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59395$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59396
59397    # First we try to build the freetype.dll
59398    $ECHO -e "@echo off\n"\
59399        "$MSBUILD $vcxproj_path "\
59400        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59401        "/p:Configuration=\"Release Multithreaded\" "\
59402        "/p:Platform=$freetype_platform "\
59403        "/p:ConfigurationType=DynamicLibrary "\
59404        "/p:TargetName=freetype "\
59405        "/p:OutDir=\"$freetype_lib_path\" "\
59406        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59407    cmd /c freetype.bat
59408
59409    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59410      # If that succeeds we also build freetype.lib
59411      $ECHO -e "@echo off\n"\
59412          "$MSBUILD $vcxproj_path "\
59413          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59414          "/p:Configuration=\"Release Multithreaded\" "\
59415          "/p:Platform=$freetype_platform "\
59416          "/p:ConfigurationType=StaticLibrary "\
59417          "/p:TargetName=freetype "\
59418          "/p:OutDir=\"$freetype_lib_path\" "\
59419          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59420      cmd /c freetype.bat
59421
59422      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59423        # Once we build both, lib and dll, set freetype lib and include path appropriately
59424        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59425        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59426        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59427$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59428      else
59429        BUILD_FREETYPE=no
59430      fi
59431    else
59432      BUILD_FREETYPE=no
59433    fi
59434  fi
59435
59436              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59437
59438  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59439  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59440  METHOD="well-known location"
59441
59442  # Let's start with an optimistic view of the world :-)
59443  FOUND_FREETYPE=yes
59444
59445  # First look for the canonical freetype main include file ft2build.h.
59446  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59447    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59448    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59449    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59450      # Fail.
59451      FOUND_FREETYPE=no
59452    fi
59453  fi
59454
59455  if test "x$FOUND_FREETYPE" = xyes; then
59456    # Include file found, let's continue the sanity check.
59457    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59458$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59459
59460    # Reset to default value
59461    FREETYPE_BASE_NAME=freetype
59462    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59463    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59464      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59465          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59466        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59467        # for the .6 version explicitly.
59468        FREETYPE_BASE_NAME=freetype.6
59469        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59470        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59471$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59472      else
59473        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59474$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59475        FOUND_FREETYPE=no
59476      fi
59477    else
59478      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59479        # On Windows, we will need both .lib and .dll file.
59480        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59481          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59482$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59483          FOUND_FREETYPE=no
59484        fi
59485      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59486          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59487        # Found lib in isa dir, use that instead.
59488        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59489        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59490$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59491      fi
59492    fi
59493  fi
59494
59495  if test "x$FOUND_FREETYPE" = xyes; then
59496
59497  # Only process if variable expands to non-empty
59498
59499  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59501
59502  # Input might be given as Windows format, start by converting to
59503  # unix format.
59504  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59505  new_path=`$CYGPATH -u "$path"`
59506
59507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59510  # "foo.exe" is OK but "foo" is an error.
59511  #
59512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59513  # It is also a way to make sure we got the proper file name for the real test later on.
59514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59515  if test "x$test_shortpath" = x; then
59516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59517$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59518    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59519  fi
59520
59521  # Call helper function which possibly converts this using DOS-style short mode.
59522  # If so, the updated path is stored in $new_path.
59523
59524  input_path="$new_path"
59525  # Check if we need to convert this using DOS-style short mode. If the path
59526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59527  # take no chances and rewrite it.
59528  # Note: m4 eats our [], so we need to use [ and ] instead.
59529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59530  if test "x$has_forbidden_chars" != x; then
59531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59535      # Going to short mode and back again did indeed matter. Since short mode is
59536      # case insensitive, let's make it lowercase to improve readability.
59537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59538      # Now convert it back to Unix-style (cygpath)
59539      input_path=`$CYGPATH -u "$shortmode_path"`
59540      new_path="$input_path"
59541    fi
59542  fi
59543
59544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59545  if test "x$test_cygdrive_prefix" = x; then
59546    # As a simple fix, exclude /usr/bin since it's not a real path.
59547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59549      # a path prefixed by /cygdrive for fixpath to work.
59550      new_path="$CYGWIN_ROOT_PATH$input_path"
59551    fi
59552  fi
59553
59554
59555  if test "x$path" != "x$new_path"; then
59556    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59558$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59559  fi
59560
59561    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59562
59563  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59564  has_colon=`$ECHO $path | $GREP ^.:`
59565  new_path="$path"
59566  if test "x$has_colon" = x; then
59567    # Not in mixed or Windows style, start by that.
59568    new_path=`cmd //c echo $path`
59569  fi
59570
59571
59572  input_path="$new_path"
59573  # Check if we need to convert this using DOS-style short mode. If the path
59574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59575  # take no chances and rewrite it.
59576  # Note: m4 eats our [], so we need to use [ and ] instead.
59577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59578  if test "x$has_forbidden_chars" != x; then
59579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59581  fi
59582
59583
59584  windows_path="$new_path"
59585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59586    unix_path=`$CYGPATH -u "$windows_path"`
59587    new_path="$unix_path"
59588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59590    new_path="$unix_path"
59591  fi
59592
59593  if test "x$path" != "x$new_path"; then
59594    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59597  fi
59598
59599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59601
59602    else
59603      # We're on a unix platform. Hooray! :)
59604      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59605      has_space=`$ECHO "$path" | $GREP " "`
59606      if test "x$has_space" != x; then
59607        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59609        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59610      fi
59611
59612      # Use eval to expand a potential ~
59613      eval path="$path"
59614      if test ! -f "$path" && test ! -d "$path"; then
59615        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59616      fi
59617
59618      if test -d "$path"; then
59619        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59620      else
59621        dir="`$DIRNAME "$path"`"
59622        base="`$BASENAME "$path"`"
59623        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59624      fi
59625    fi
59626  fi
59627
59628
59629  # Only process if variable expands to non-empty
59630
59631  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59632    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59633
59634  # Input might be given as Windows format, start by converting to
59635  # unix format.
59636  path="$POTENTIAL_FREETYPE_LIB_PATH"
59637  new_path=`$CYGPATH -u "$path"`
59638
59639  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59640  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59641  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59642  # "foo.exe" is OK but "foo" is an error.
59643  #
59644  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59645  # It is also a way to make sure we got the proper file name for the real test later on.
59646  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59647  if test "x$test_shortpath" = x; then
59648    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59649$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59650    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59651  fi
59652
59653  # Call helper function which possibly converts this using DOS-style short mode.
59654  # If so, the updated path is stored in $new_path.
59655
59656  input_path="$new_path"
59657  # Check if we need to convert this using DOS-style short mode. If the path
59658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59659  # take no chances and rewrite it.
59660  # Note: m4 eats our [], so we need to use [ and ] instead.
59661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59662  if test "x$has_forbidden_chars" != x; then
59663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59667      # Going to short mode and back again did indeed matter. Since short mode is
59668      # case insensitive, let's make it lowercase to improve readability.
59669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59670      # Now convert it back to Unix-style (cygpath)
59671      input_path=`$CYGPATH -u "$shortmode_path"`
59672      new_path="$input_path"
59673    fi
59674  fi
59675
59676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59677  if test "x$test_cygdrive_prefix" = x; then
59678    # As a simple fix, exclude /usr/bin since it's not a real path.
59679    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59681      # a path prefixed by /cygdrive for fixpath to work.
59682      new_path="$CYGWIN_ROOT_PATH$input_path"
59683    fi
59684  fi
59685
59686
59687  if test "x$path" != "x$new_path"; then
59688    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59690$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59691  fi
59692
59693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59694
59695  path="$POTENTIAL_FREETYPE_LIB_PATH"
59696  has_colon=`$ECHO $path | $GREP ^.:`
59697  new_path="$path"
59698  if test "x$has_colon" = x; then
59699    # Not in mixed or Windows style, start by that.
59700    new_path=`cmd //c echo $path`
59701  fi
59702
59703
59704  input_path="$new_path"
59705  # Check if we need to convert this using DOS-style short mode. If the path
59706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59707  # take no chances and rewrite it.
59708  # Note: m4 eats our [], so we need to use [ and ] instead.
59709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59710  if test "x$has_forbidden_chars" != x; then
59711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59713  fi
59714
59715
59716  windows_path="$new_path"
59717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59718    unix_path=`$CYGPATH -u "$windows_path"`
59719    new_path="$unix_path"
59720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59722    new_path="$unix_path"
59723  fi
59724
59725  if test "x$path" != "x$new_path"; then
59726    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59728$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59729  fi
59730
59731  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59732  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59733
59734    else
59735      # We're on a unix platform. Hooray! :)
59736      path="$POTENTIAL_FREETYPE_LIB_PATH"
59737      has_space=`$ECHO "$path" | $GREP " "`
59738      if test "x$has_space" != x; then
59739        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59740$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59741        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59742      fi
59743
59744      # Use eval to expand a potential ~
59745      eval path="$path"
59746      if test ! -f "$path" && test ! -d "$path"; then
59747        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59748      fi
59749
59750      if test -d "$path"; then
59751        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59752      else
59753        dir="`$DIRNAME "$path"`"
59754        base="`$BASENAME "$path"`"
59755        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59756      fi
59757    fi
59758  fi
59759
59760
59761    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59763$as_echo_n "checking for freetype includes... " >&6; }
59764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59765$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59766    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59768$as_echo_n "checking for freetype libraries... " >&6; }
59769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59770$as_echo "$FREETYPE_LIB_PATH" >&6; }
59771  fi
59772
59773              else
59774
59775  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59776  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59777  METHOD="well-known location"
59778
59779  # Let's start with an optimistic view of the world :-)
59780  FOUND_FREETYPE=yes
59781
59782  # First look for the canonical freetype main include file ft2build.h.
59783  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59784    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59785    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59786    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59787      # Fail.
59788      FOUND_FREETYPE=no
59789    fi
59790  fi
59791
59792  if test "x$FOUND_FREETYPE" = xyes; then
59793    # Include file found, let's continue the sanity check.
59794    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59795$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59796
59797    # Reset to default value
59798    FREETYPE_BASE_NAME=freetype
59799    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59800    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59801      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59802          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59803        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59804        # for the .6 version explicitly.
59805        FREETYPE_BASE_NAME=freetype.6
59806        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59807        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59808$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59809      else
59810        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59811$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59812        FOUND_FREETYPE=no
59813      fi
59814    else
59815      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59816        # On Windows, we will need both .lib and .dll file.
59817        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59818          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59819$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59820          FOUND_FREETYPE=no
59821        fi
59822      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59823          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59824        # Found lib in isa dir, use that instead.
59825        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59826        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59827$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59828      fi
59829    fi
59830  fi
59831
59832  if test "x$FOUND_FREETYPE" = xyes; then
59833
59834  # Only process if variable expands to non-empty
59835
59836  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59837    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59838
59839  # Input might be given as Windows format, start by converting to
59840  # unix format.
59841  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59842  new_path=`$CYGPATH -u "$path"`
59843
59844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59847  # "foo.exe" is OK but "foo" is an error.
59848  #
59849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59850  # It is also a way to make sure we got the proper file name for the real test later on.
59851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59852  if test "x$test_shortpath" = x; then
59853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59854$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59855    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59856  fi
59857
59858  # Call helper function which possibly converts this using DOS-style short mode.
59859  # If so, the updated path is stored in $new_path.
59860
59861  input_path="$new_path"
59862  # Check if we need to convert this using DOS-style short mode. If the path
59863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59864  # take no chances and rewrite it.
59865  # Note: m4 eats our [], so we need to use [ and ] instead.
59866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59867  if test "x$has_forbidden_chars" != x; then
59868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59872      # Going to short mode and back again did indeed matter. Since short mode is
59873      # case insensitive, let's make it lowercase to improve readability.
59874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59875      # Now convert it back to Unix-style (cygpath)
59876      input_path=`$CYGPATH -u "$shortmode_path"`
59877      new_path="$input_path"
59878    fi
59879  fi
59880
59881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59882  if test "x$test_cygdrive_prefix" = x; then
59883    # As a simple fix, exclude /usr/bin since it's not a real path.
59884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59886      # a path prefixed by /cygdrive for fixpath to work.
59887      new_path="$CYGWIN_ROOT_PATH$input_path"
59888    fi
59889  fi
59890
59891
59892  if test "x$path" != "x$new_path"; then
59893    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59895$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59896  fi
59897
59898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59899
59900  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59901  has_colon=`$ECHO $path | $GREP ^.:`
59902  new_path="$path"
59903  if test "x$has_colon" = x; then
59904    # Not in mixed or Windows style, start by that.
59905    new_path=`cmd //c echo $path`
59906  fi
59907
59908
59909  input_path="$new_path"
59910  # Check if we need to convert this using DOS-style short mode. If the path
59911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59912  # take no chances and rewrite it.
59913  # Note: m4 eats our [], so we need to use [ and ] instead.
59914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59915  if test "x$has_forbidden_chars" != x; then
59916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59918  fi
59919
59920
59921  windows_path="$new_path"
59922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59923    unix_path=`$CYGPATH -u "$windows_path"`
59924    new_path="$unix_path"
59925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59927    new_path="$unix_path"
59928  fi
59929
59930  if test "x$path" != "x$new_path"; then
59931    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59933$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59934  fi
59935
59936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59938
59939    else
59940      # We're on a unix platform. Hooray! :)
59941      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59942      has_space=`$ECHO "$path" | $GREP " "`
59943      if test "x$has_space" != x; then
59944        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59945$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59946        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59947      fi
59948
59949      # Use eval to expand a potential ~
59950      eval path="$path"
59951      if test ! -f "$path" && test ! -d "$path"; then
59952        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59953      fi
59954
59955      if test -d "$path"; then
59956        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59957      else
59958        dir="`$DIRNAME "$path"`"
59959        base="`$BASENAME "$path"`"
59960        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59961      fi
59962    fi
59963  fi
59964
59965
59966  # Only process if variable expands to non-empty
59967
59968  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59970
59971  # Input might be given as Windows format, start by converting to
59972  # unix format.
59973  path="$POTENTIAL_FREETYPE_LIB_PATH"
59974  new_path=`$CYGPATH -u "$path"`
59975
59976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59979  # "foo.exe" is OK but "foo" is an error.
59980  #
59981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59982  # It is also a way to make sure we got the proper file name for the real test later on.
59983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59984  if test "x$test_shortpath" = x; then
59985    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59986$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59987    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59988  fi
59989
59990  # Call helper function which possibly converts this using DOS-style short mode.
59991  # If so, the updated path is stored in $new_path.
59992
59993  input_path="$new_path"
59994  # Check if we need to convert this using DOS-style short mode. If the path
59995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59996  # take no chances and rewrite it.
59997  # Note: m4 eats our [], so we need to use [ and ] instead.
59998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59999  if test "x$has_forbidden_chars" != x; then
60000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60004      # Going to short mode and back again did indeed matter. Since short mode is
60005      # case insensitive, let's make it lowercase to improve readability.
60006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60007      # Now convert it back to Unix-style (cygpath)
60008      input_path=`$CYGPATH -u "$shortmode_path"`
60009      new_path="$input_path"
60010    fi
60011  fi
60012
60013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60014  if test "x$test_cygdrive_prefix" = x; then
60015    # As a simple fix, exclude /usr/bin since it's not a real path.
60016    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60018      # a path prefixed by /cygdrive for fixpath to work.
60019      new_path="$CYGWIN_ROOT_PATH$input_path"
60020    fi
60021  fi
60022
60023
60024  if test "x$path" != "x$new_path"; then
60025    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60027$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60028  fi
60029
60030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60031
60032  path="$POTENTIAL_FREETYPE_LIB_PATH"
60033  has_colon=`$ECHO $path | $GREP ^.:`
60034  new_path="$path"
60035  if test "x$has_colon" = x; then
60036    # Not in mixed or Windows style, start by that.
60037    new_path=`cmd //c echo $path`
60038  fi
60039
60040
60041  input_path="$new_path"
60042  # Check if we need to convert this using DOS-style short mode. If the path
60043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60044  # take no chances and rewrite it.
60045  # Note: m4 eats our [], so we need to use [ and ] instead.
60046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60047  if test "x$has_forbidden_chars" != x; then
60048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60050  fi
60051
60052
60053  windows_path="$new_path"
60054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60055    unix_path=`$CYGPATH -u "$windows_path"`
60056    new_path="$unix_path"
60057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60059    new_path="$unix_path"
60060  fi
60061
60062  if test "x$path" != "x$new_path"; then
60063    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60065$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60066  fi
60067
60068  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60069  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60070
60071    else
60072      # We're on a unix platform. Hooray! :)
60073      path="$POTENTIAL_FREETYPE_LIB_PATH"
60074      has_space=`$ECHO "$path" | $GREP " "`
60075      if test "x$has_space" != x; then
60076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60077$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60078        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60079      fi
60080
60081      # Use eval to expand a potential ~
60082      eval path="$path"
60083      if test ! -f "$path" && test ! -d "$path"; then
60084        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60085      fi
60086
60087      if test -d "$path"; then
60088        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60089      else
60090        dir="`$DIRNAME "$path"`"
60091        base="`$BASENAME "$path"`"
60092        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60093      fi
60094    fi
60095  fi
60096
60097
60098    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60100$as_echo_n "checking for freetype includes... " >&6; }
60101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60102$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60103    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60105$as_echo_n "checking for freetype libraries... " >&6; }
60106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60107$as_echo "$FREETYPE_LIB_PATH" >&6; }
60108  fi
60109
60110              fi
60111            fi
60112          fi
60113        else
60114          FREETYPE_BASE_DIR="$SYSROOT/usr"
60115
60116  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60117  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60118  METHOD="well-known location"
60119
60120  # Let's start with an optimistic view of the world :-)
60121  FOUND_FREETYPE=yes
60122
60123  # First look for the canonical freetype main include file ft2build.h.
60124  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60125    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60126    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60127    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60128      # Fail.
60129      FOUND_FREETYPE=no
60130    fi
60131  fi
60132
60133  if test "x$FOUND_FREETYPE" = xyes; then
60134    # Include file found, let's continue the sanity check.
60135    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60136$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60137
60138    # Reset to default value
60139    FREETYPE_BASE_NAME=freetype
60140    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60141    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60142      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60143          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60144        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60145        # for the .6 version explicitly.
60146        FREETYPE_BASE_NAME=freetype.6
60147        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60148        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60149$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60150      else
60151        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60152$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60153        FOUND_FREETYPE=no
60154      fi
60155    else
60156      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60157        # On Windows, we will need both .lib and .dll file.
60158        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60159          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60160$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60161          FOUND_FREETYPE=no
60162        fi
60163      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60164          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60165        # Found lib in isa dir, use that instead.
60166        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60167        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60168$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60169      fi
60170    fi
60171  fi
60172
60173  if test "x$FOUND_FREETYPE" = xyes; then
60174
60175  # Only process if variable expands to non-empty
60176
60177  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60179
60180  # Input might be given as Windows format, start by converting to
60181  # unix format.
60182  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60183  new_path=`$CYGPATH -u "$path"`
60184
60185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60188  # "foo.exe" is OK but "foo" is an error.
60189  #
60190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60191  # It is also a way to make sure we got the proper file name for the real test later on.
60192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60193  if test "x$test_shortpath" = x; then
60194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60195$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60196    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60197  fi
60198
60199  # Call helper function which possibly converts this using DOS-style short mode.
60200  # If so, the updated path is stored in $new_path.
60201
60202  input_path="$new_path"
60203  # Check if we need to convert this using DOS-style short mode. If the path
60204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60205  # take no chances and rewrite it.
60206  # Note: m4 eats our [], so we need to use [ and ] instead.
60207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60208  if test "x$has_forbidden_chars" != x; then
60209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60213      # Going to short mode and back again did indeed matter. Since short mode is
60214      # case insensitive, let's make it lowercase to improve readability.
60215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60216      # Now convert it back to Unix-style (cygpath)
60217      input_path=`$CYGPATH -u "$shortmode_path"`
60218      new_path="$input_path"
60219    fi
60220  fi
60221
60222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60223  if test "x$test_cygdrive_prefix" = x; then
60224    # As a simple fix, exclude /usr/bin since it's not a real path.
60225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60227      # a path prefixed by /cygdrive for fixpath to work.
60228      new_path="$CYGWIN_ROOT_PATH$input_path"
60229    fi
60230  fi
60231
60232
60233  if test "x$path" != "x$new_path"; then
60234    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60236$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60237  fi
60238
60239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60240
60241  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60242  has_colon=`$ECHO $path | $GREP ^.:`
60243  new_path="$path"
60244  if test "x$has_colon" = x; then
60245    # Not in mixed or Windows style, start by that.
60246    new_path=`cmd //c echo $path`
60247  fi
60248
60249
60250  input_path="$new_path"
60251  # Check if we need to convert this using DOS-style short mode. If the path
60252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60253  # take no chances and rewrite it.
60254  # Note: m4 eats our [], so we need to use [ and ] instead.
60255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60256  if test "x$has_forbidden_chars" != x; then
60257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60259  fi
60260
60261
60262  windows_path="$new_path"
60263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60264    unix_path=`$CYGPATH -u "$windows_path"`
60265    new_path="$unix_path"
60266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60268    new_path="$unix_path"
60269  fi
60270
60271  if test "x$path" != "x$new_path"; then
60272    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60274$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60275  fi
60276
60277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60279
60280    else
60281      # We're on a unix platform. Hooray! :)
60282      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60283      has_space=`$ECHO "$path" | $GREP " "`
60284      if test "x$has_space" != x; then
60285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60286$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60287        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60288      fi
60289
60290      # Use eval to expand a potential ~
60291      eval path="$path"
60292      if test ! -f "$path" && test ! -d "$path"; then
60293        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60294      fi
60295
60296      if test -d "$path"; then
60297        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60298      else
60299        dir="`$DIRNAME "$path"`"
60300        base="`$BASENAME "$path"`"
60301        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60302      fi
60303    fi
60304  fi
60305
60306
60307  # Only process if variable expands to non-empty
60308
60309  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60311
60312  # Input might be given as Windows format, start by converting to
60313  # unix format.
60314  path="$POTENTIAL_FREETYPE_LIB_PATH"
60315  new_path=`$CYGPATH -u "$path"`
60316
60317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60320  # "foo.exe" is OK but "foo" is an error.
60321  #
60322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60323  # It is also a way to make sure we got the proper file name for the real test later on.
60324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60325  if test "x$test_shortpath" = x; then
60326    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60327$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60328    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60329  fi
60330
60331  # Call helper function which possibly converts this using DOS-style short mode.
60332  # If so, the updated path is stored in $new_path.
60333
60334  input_path="$new_path"
60335  # Check if we need to convert this using DOS-style short mode. If the path
60336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60337  # take no chances and rewrite it.
60338  # Note: m4 eats our [], so we need to use [ and ] instead.
60339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60340  if test "x$has_forbidden_chars" != x; then
60341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60345      # Going to short mode and back again did indeed matter. Since short mode is
60346      # case insensitive, let's make it lowercase to improve readability.
60347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60348      # Now convert it back to Unix-style (cygpath)
60349      input_path=`$CYGPATH -u "$shortmode_path"`
60350      new_path="$input_path"
60351    fi
60352  fi
60353
60354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60355  if test "x$test_cygdrive_prefix" = x; then
60356    # As a simple fix, exclude /usr/bin since it's not a real path.
60357    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60359      # a path prefixed by /cygdrive for fixpath to work.
60360      new_path="$CYGWIN_ROOT_PATH$input_path"
60361    fi
60362  fi
60363
60364
60365  if test "x$path" != "x$new_path"; then
60366    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60368$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60369  fi
60370
60371    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60372
60373  path="$POTENTIAL_FREETYPE_LIB_PATH"
60374  has_colon=`$ECHO $path | $GREP ^.:`
60375  new_path="$path"
60376  if test "x$has_colon" = x; then
60377    # Not in mixed or Windows style, start by that.
60378    new_path=`cmd //c echo $path`
60379  fi
60380
60381
60382  input_path="$new_path"
60383  # Check if we need to convert this using DOS-style short mode. If the path
60384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60385  # take no chances and rewrite it.
60386  # Note: m4 eats our [], so we need to use [ and ] instead.
60387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60388  if test "x$has_forbidden_chars" != x; then
60389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60391  fi
60392
60393
60394  windows_path="$new_path"
60395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60396    unix_path=`$CYGPATH -u "$windows_path"`
60397    new_path="$unix_path"
60398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60400    new_path="$unix_path"
60401  fi
60402
60403  if test "x$path" != "x$new_path"; then
60404    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60406$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60407  fi
60408
60409  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60410  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60411
60412    else
60413      # We're on a unix platform. Hooray! :)
60414      path="$POTENTIAL_FREETYPE_LIB_PATH"
60415      has_space=`$ECHO "$path" | $GREP " "`
60416      if test "x$has_space" != x; then
60417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60418$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60419        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60420      fi
60421
60422      # Use eval to expand a potential ~
60423      eval path="$path"
60424      if test ! -f "$path" && test ! -d "$path"; then
60425        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60426      fi
60427
60428      if test -d "$path"; then
60429        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60430      else
60431        dir="`$DIRNAME "$path"`"
60432        base="`$BASENAME "$path"`"
60433        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60434      fi
60435    fi
60436  fi
60437
60438
60439    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60441$as_echo_n "checking for freetype includes... " >&6; }
60442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60443$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60444    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60446$as_echo_n "checking for freetype libraries... " >&6; }
60447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60448$as_echo "$FREETYPE_LIB_PATH" >&6; }
60449  fi
60450
60451
60452          if test "x$FOUND_FREETYPE" != xyes; then
60453            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60454
60455  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60456  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60457  METHOD="well-known location"
60458
60459  # Let's start with an optimistic view of the world :-)
60460  FOUND_FREETYPE=yes
60461
60462  # First look for the canonical freetype main include file ft2build.h.
60463  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60464    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60465    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60466    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60467      # Fail.
60468      FOUND_FREETYPE=no
60469    fi
60470  fi
60471
60472  if test "x$FOUND_FREETYPE" = xyes; then
60473    # Include file found, let's continue the sanity check.
60474    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60475$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60476
60477    # Reset to default value
60478    FREETYPE_BASE_NAME=freetype
60479    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60480    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60481      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60482          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60483        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60484        # for the .6 version explicitly.
60485        FREETYPE_BASE_NAME=freetype.6
60486        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60487        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60488$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60489      else
60490        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60492        FOUND_FREETYPE=no
60493      fi
60494    else
60495      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60496        # On Windows, we will need both .lib and .dll file.
60497        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60498          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60499$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60500          FOUND_FREETYPE=no
60501        fi
60502      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60503          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60504        # Found lib in isa dir, use that instead.
60505        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60506        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60507$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60508      fi
60509    fi
60510  fi
60511
60512  if test "x$FOUND_FREETYPE" = xyes; then
60513
60514  # Only process if variable expands to non-empty
60515
60516  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60518
60519  # Input might be given as Windows format, start by converting to
60520  # unix format.
60521  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60522  new_path=`$CYGPATH -u "$path"`
60523
60524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60527  # "foo.exe" is OK but "foo" is an error.
60528  #
60529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60530  # It is also a way to make sure we got the proper file name for the real test later on.
60531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60532  if test "x$test_shortpath" = x; then
60533    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60535    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60536  fi
60537
60538  # Call helper function which possibly converts this using DOS-style short mode.
60539  # If so, the updated path is stored in $new_path.
60540
60541  input_path="$new_path"
60542  # Check if we need to convert this using DOS-style short mode. If the path
60543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60544  # take no chances and rewrite it.
60545  # Note: m4 eats our [], so we need to use [ and ] instead.
60546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60547  if test "x$has_forbidden_chars" != x; then
60548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60552      # Going to short mode and back again did indeed matter. Since short mode is
60553      # case insensitive, let's make it lowercase to improve readability.
60554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60555      # Now convert it back to Unix-style (cygpath)
60556      input_path=`$CYGPATH -u "$shortmode_path"`
60557      new_path="$input_path"
60558    fi
60559  fi
60560
60561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60562  if test "x$test_cygdrive_prefix" = x; then
60563    # As a simple fix, exclude /usr/bin since it's not a real path.
60564    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60566      # a path prefixed by /cygdrive for fixpath to work.
60567      new_path="$CYGWIN_ROOT_PATH$input_path"
60568    fi
60569  fi
60570
60571
60572  if test "x$path" != "x$new_path"; then
60573    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60575$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60576  fi
60577
60578    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60579
60580  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60581  has_colon=`$ECHO $path | $GREP ^.:`
60582  new_path="$path"
60583  if test "x$has_colon" = x; then
60584    # Not in mixed or Windows style, start by that.
60585    new_path=`cmd //c echo $path`
60586  fi
60587
60588
60589  input_path="$new_path"
60590  # Check if we need to convert this using DOS-style short mode. If the path
60591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60592  # take no chances and rewrite it.
60593  # Note: m4 eats our [], so we need to use [ and ] instead.
60594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60595  if test "x$has_forbidden_chars" != x; then
60596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60598  fi
60599
60600
60601  windows_path="$new_path"
60602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60603    unix_path=`$CYGPATH -u "$windows_path"`
60604    new_path="$unix_path"
60605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60607    new_path="$unix_path"
60608  fi
60609
60610  if test "x$path" != "x$new_path"; then
60611    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60613$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60614  fi
60615
60616  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60617  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60618
60619    else
60620      # We're on a unix platform. Hooray! :)
60621      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60622      has_space=`$ECHO "$path" | $GREP " "`
60623      if test "x$has_space" != x; then
60624        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60626        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60627      fi
60628
60629      # Use eval to expand a potential ~
60630      eval path="$path"
60631      if test ! -f "$path" && test ! -d "$path"; then
60632        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60633      fi
60634
60635      if test -d "$path"; then
60636        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60637      else
60638        dir="`$DIRNAME "$path"`"
60639        base="`$BASENAME "$path"`"
60640        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60641      fi
60642    fi
60643  fi
60644
60645
60646  # Only process if variable expands to non-empty
60647
60648  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60650
60651  # Input might be given as Windows format, start by converting to
60652  # unix format.
60653  path="$POTENTIAL_FREETYPE_LIB_PATH"
60654  new_path=`$CYGPATH -u "$path"`
60655
60656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60659  # "foo.exe" is OK but "foo" is an error.
60660  #
60661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60662  # It is also a way to make sure we got the proper file name for the real test later on.
60663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60664  if test "x$test_shortpath" = x; then
60665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60666$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60667    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60668  fi
60669
60670  # Call helper function which possibly converts this using DOS-style short mode.
60671  # If so, the updated path is stored in $new_path.
60672
60673  input_path="$new_path"
60674  # Check if we need to convert this using DOS-style short mode. If the path
60675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60676  # take no chances and rewrite it.
60677  # Note: m4 eats our [], so we need to use [ and ] instead.
60678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60679  if test "x$has_forbidden_chars" != x; then
60680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60684      # Going to short mode and back again did indeed matter. Since short mode is
60685      # case insensitive, let's make it lowercase to improve readability.
60686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60687      # Now convert it back to Unix-style (cygpath)
60688      input_path=`$CYGPATH -u "$shortmode_path"`
60689      new_path="$input_path"
60690    fi
60691  fi
60692
60693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60694  if test "x$test_cygdrive_prefix" = x; then
60695    # As a simple fix, exclude /usr/bin since it's not a real path.
60696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60698      # a path prefixed by /cygdrive for fixpath to work.
60699      new_path="$CYGWIN_ROOT_PATH$input_path"
60700    fi
60701  fi
60702
60703
60704  if test "x$path" != "x$new_path"; then
60705    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60707$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60708  fi
60709
60710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60711
60712  path="$POTENTIAL_FREETYPE_LIB_PATH"
60713  has_colon=`$ECHO $path | $GREP ^.:`
60714  new_path="$path"
60715  if test "x$has_colon" = x; then
60716    # Not in mixed or Windows style, start by that.
60717    new_path=`cmd //c echo $path`
60718  fi
60719
60720
60721  input_path="$new_path"
60722  # Check if we need to convert this using DOS-style short mode. If the path
60723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60724  # take no chances and rewrite it.
60725  # Note: m4 eats our [], so we need to use [ and ] instead.
60726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60727  if test "x$has_forbidden_chars" != x; then
60728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60730  fi
60731
60732
60733  windows_path="$new_path"
60734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60735    unix_path=`$CYGPATH -u "$windows_path"`
60736    new_path="$unix_path"
60737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60739    new_path="$unix_path"
60740  fi
60741
60742  if test "x$path" != "x$new_path"; then
60743    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60745$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60746  fi
60747
60748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60750
60751    else
60752      # We're on a unix platform. Hooray! :)
60753      path="$POTENTIAL_FREETYPE_LIB_PATH"
60754      has_space=`$ECHO "$path" | $GREP " "`
60755      if test "x$has_space" != x; then
60756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60757$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60759      fi
60760
60761      # Use eval to expand a potential ~
60762      eval path="$path"
60763      if test ! -f "$path" && test ! -d "$path"; then
60764        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60765      fi
60766
60767      if test -d "$path"; then
60768        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60769      else
60770        dir="`$DIRNAME "$path"`"
60771        base="`$BASENAME "$path"`"
60772        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60773      fi
60774    fi
60775  fi
60776
60777
60778    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60780$as_echo_n "checking for freetype includes... " >&6; }
60781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60782$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60783    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60785$as_echo_n "checking for freetype libraries... " >&6; }
60786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60787$as_echo "$FREETYPE_LIB_PATH" >&6; }
60788  fi
60789
60790          fi
60791
60792          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60793            if test "x$FOUND_FREETYPE" != xyes; then
60794              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60795              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60796
60797  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60798  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60799  METHOD="well-known location"
60800
60801  # Let's start with an optimistic view of the world :-)
60802  FOUND_FREETYPE=yes
60803
60804  # First look for the canonical freetype main include file ft2build.h.
60805  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60806    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60807    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60808    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60809      # Fail.
60810      FOUND_FREETYPE=no
60811    fi
60812  fi
60813
60814  if test "x$FOUND_FREETYPE" = xyes; then
60815    # Include file found, let's continue the sanity check.
60816    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60817$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60818
60819    # Reset to default value
60820    FREETYPE_BASE_NAME=freetype
60821    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60822    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60823      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60824          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60825        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60826        # for the .6 version explicitly.
60827        FREETYPE_BASE_NAME=freetype.6
60828        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60829        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60830$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60831      else
60832        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60833$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60834        FOUND_FREETYPE=no
60835      fi
60836    else
60837      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60838        # On Windows, we will need both .lib and .dll file.
60839        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60840          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60841$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60842          FOUND_FREETYPE=no
60843        fi
60844      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60845          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60846        # Found lib in isa dir, use that instead.
60847        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60848        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60849$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60850      fi
60851    fi
60852  fi
60853
60854  if test "x$FOUND_FREETYPE" = xyes; then
60855
60856  # Only process if variable expands to non-empty
60857
60858  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60860
60861  # Input might be given as Windows format, start by converting to
60862  # unix format.
60863  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60864  new_path=`$CYGPATH -u "$path"`
60865
60866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60869  # "foo.exe" is OK but "foo" is an error.
60870  #
60871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60872  # It is also a way to make sure we got the proper file name for the real test later on.
60873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60874  if test "x$test_shortpath" = x; then
60875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60876$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60877    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60878  fi
60879
60880  # Call helper function which possibly converts this using DOS-style short mode.
60881  # If so, the updated path is stored in $new_path.
60882
60883  input_path="$new_path"
60884  # Check if we need to convert this using DOS-style short mode. If the path
60885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60886  # take no chances and rewrite it.
60887  # Note: m4 eats our [], so we need to use [ and ] instead.
60888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60889  if test "x$has_forbidden_chars" != x; then
60890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60894      # Going to short mode and back again did indeed matter. Since short mode is
60895      # case insensitive, let's make it lowercase to improve readability.
60896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60897      # Now convert it back to Unix-style (cygpath)
60898      input_path=`$CYGPATH -u "$shortmode_path"`
60899      new_path="$input_path"
60900    fi
60901  fi
60902
60903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60904  if test "x$test_cygdrive_prefix" = x; then
60905    # As a simple fix, exclude /usr/bin since it's not a real path.
60906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60908      # a path prefixed by /cygdrive for fixpath to work.
60909      new_path="$CYGWIN_ROOT_PATH$input_path"
60910    fi
60911  fi
60912
60913
60914  if test "x$path" != "x$new_path"; then
60915    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60917$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60918  fi
60919
60920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60921
60922  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60923  has_colon=`$ECHO $path | $GREP ^.:`
60924  new_path="$path"
60925  if test "x$has_colon" = x; then
60926    # Not in mixed or Windows style, start by that.
60927    new_path=`cmd //c echo $path`
60928  fi
60929
60930
60931  input_path="$new_path"
60932  # Check if we need to convert this using DOS-style short mode. If the path
60933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60934  # take no chances and rewrite it.
60935  # Note: m4 eats our [], so we need to use [ and ] instead.
60936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60937  if test "x$has_forbidden_chars" != x; then
60938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60940  fi
60941
60942
60943  windows_path="$new_path"
60944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60945    unix_path=`$CYGPATH -u "$windows_path"`
60946    new_path="$unix_path"
60947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60949    new_path="$unix_path"
60950  fi
60951
60952  if test "x$path" != "x$new_path"; then
60953    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60955$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60956  fi
60957
60958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60960
60961    else
60962      # We're on a unix platform. Hooray! :)
60963      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60964      has_space=`$ECHO "$path" | $GREP " "`
60965      if test "x$has_space" != x; then
60966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60967$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60969      fi
60970
60971      # Use eval to expand a potential ~
60972      eval path="$path"
60973      if test ! -f "$path" && test ! -d "$path"; then
60974        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60975      fi
60976
60977      if test -d "$path"; then
60978        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60979      else
60980        dir="`$DIRNAME "$path"`"
60981        base="`$BASENAME "$path"`"
60982        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60983      fi
60984    fi
60985  fi
60986
60987
60988  # Only process if variable expands to non-empty
60989
60990  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60992
60993  # Input might be given as Windows format, start by converting to
60994  # unix format.
60995  path="$POTENTIAL_FREETYPE_LIB_PATH"
60996  new_path=`$CYGPATH -u "$path"`
60997
60998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61001  # "foo.exe" is OK but "foo" is an error.
61002  #
61003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61004  # It is also a way to make sure we got the proper file name for the real test later on.
61005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61006  if test "x$test_shortpath" = x; then
61007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61008$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61009    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61010  fi
61011
61012  # Call helper function which possibly converts this using DOS-style short mode.
61013  # If so, the updated path is stored in $new_path.
61014
61015  input_path="$new_path"
61016  # Check if we need to convert this using DOS-style short mode. If the path
61017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61018  # take no chances and rewrite it.
61019  # Note: m4 eats our [], so we need to use [ and ] instead.
61020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61021  if test "x$has_forbidden_chars" != x; then
61022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61026      # Going to short mode and back again did indeed matter. Since short mode is
61027      # case insensitive, let's make it lowercase to improve readability.
61028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61029      # Now convert it back to Unix-style (cygpath)
61030      input_path=`$CYGPATH -u "$shortmode_path"`
61031      new_path="$input_path"
61032    fi
61033  fi
61034
61035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61036  if test "x$test_cygdrive_prefix" = x; then
61037    # As a simple fix, exclude /usr/bin since it's not a real path.
61038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61040      # a path prefixed by /cygdrive for fixpath to work.
61041      new_path="$CYGWIN_ROOT_PATH$input_path"
61042    fi
61043  fi
61044
61045
61046  if test "x$path" != "x$new_path"; then
61047    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61050  fi
61051
61052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61053
61054  path="$POTENTIAL_FREETYPE_LIB_PATH"
61055  has_colon=`$ECHO $path | $GREP ^.:`
61056  new_path="$path"
61057  if test "x$has_colon" = x; then
61058    # Not in mixed or Windows style, start by that.
61059    new_path=`cmd //c echo $path`
61060  fi
61061
61062
61063  input_path="$new_path"
61064  # Check if we need to convert this using DOS-style short mode. If the path
61065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61066  # take no chances and rewrite it.
61067  # Note: m4 eats our [], so we need to use [ and ] instead.
61068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61069  if test "x$has_forbidden_chars" != x; then
61070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61072  fi
61073
61074
61075  windows_path="$new_path"
61076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61077    unix_path=`$CYGPATH -u "$windows_path"`
61078    new_path="$unix_path"
61079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61081    new_path="$unix_path"
61082  fi
61083
61084  if test "x$path" != "x$new_path"; then
61085    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61087$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61088  fi
61089
61090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61092
61093    else
61094      # We're on a unix platform. Hooray! :)
61095      path="$POTENTIAL_FREETYPE_LIB_PATH"
61096      has_space=`$ECHO "$path" | $GREP " "`
61097      if test "x$has_space" != x; then
61098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61099$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61101      fi
61102
61103      # Use eval to expand a potential ~
61104      eval path="$path"
61105      if test ! -f "$path" && test ! -d "$path"; then
61106        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61107      fi
61108
61109      if test -d "$path"; then
61110        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61111      else
61112        dir="`$DIRNAME "$path"`"
61113        base="`$BASENAME "$path"`"
61114        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61115      fi
61116    fi
61117  fi
61118
61119
61120    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61122$as_echo_n "checking for freetype includes... " >&6; }
61123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61124$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61125    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61127$as_echo_n "checking for freetype libraries... " >&6; }
61128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61129$as_echo "$FREETYPE_LIB_PATH" >&6; }
61130  fi
61131
61132            fi
61133          fi
61134
61135          if test "x$FOUND_FREETYPE" != xyes; then
61136            FREETYPE_BASE_DIR="$SYSROOT/usr"
61137            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61138
61139  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61140  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61141  METHOD="well-known location"
61142
61143  # Let's start with an optimistic view of the world :-)
61144  FOUND_FREETYPE=yes
61145
61146  # First look for the canonical freetype main include file ft2build.h.
61147  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61148    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61149    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61150    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61151      # Fail.
61152      FOUND_FREETYPE=no
61153    fi
61154  fi
61155
61156  if test "x$FOUND_FREETYPE" = xyes; then
61157    # Include file found, let's continue the sanity check.
61158    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61159$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61160
61161    # Reset to default value
61162    FREETYPE_BASE_NAME=freetype
61163    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61164    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61165      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61166          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61167        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61168        # for the .6 version explicitly.
61169        FREETYPE_BASE_NAME=freetype.6
61170        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61171        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61172$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61173      else
61174        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61175$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61176        FOUND_FREETYPE=no
61177      fi
61178    else
61179      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61180        # On Windows, we will need both .lib and .dll file.
61181        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61182          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61183$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61184          FOUND_FREETYPE=no
61185        fi
61186      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61187          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61188        # Found lib in isa dir, use that instead.
61189        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61190        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61191$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61192      fi
61193    fi
61194  fi
61195
61196  if test "x$FOUND_FREETYPE" = xyes; then
61197
61198  # Only process if variable expands to non-empty
61199
61200  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61202
61203  # Input might be given as Windows format, start by converting to
61204  # unix format.
61205  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61206  new_path=`$CYGPATH -u "$path"`
61207
61208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61211  # "foo.exe" is OK but "foo" is an error.
61212  #
61213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61214  # It is also a way to make sure we got the proper file name for the real test later on.
61215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61216  if test "x$test_shortpath" = x; then
61217    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61218$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61219    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61220  fi
61221
61222  # Call helper function which possibly converts this using DOS-style short mode.
61223  # If so, the updated path is stored in $new_path.
61224
61225  input_path="$new_path"
61226  # Check if we need to convert this using DOS-style short mode. If the path
61227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61228  # take no chances and rewrite it.
61229  # Note: m4 eats our [], so we need to use [ and ] instead.
61230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61231  if test "x$has_forbidden_chars" != x; then
61232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61236      # Going to short mode and back again did indeed matter. Since short mode is
61237      # case insensitive, let's make it lowercase to improve readability.
61238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61239      # Now convert it back to Unix-style (cygpath)
61240      input_path=`$CYGPATH -u "$shortmode_path"`
61241      new_path="$input_path"
61242    fi
61243  fi
61244
61245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61246  if test "x$test_cygdrive_prefix" = x; then
61247    # As a simple fix, exclude /usr/bin since it's not a real path.
61248    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61250      # a path prefixed by /cygdrive for fixpath to work.
61251      new_path="$CYGWIN_ROOT_PATH$input_path"
61252    fi
61253  fi
61254
61255
61256  if test "x$path" != "x$new_path"; then
61257    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61259$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61260  fi
61261
61262    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61263
61264  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61265  has_colon=`$ECHO $path | $GREP ^.:`
61266  new_path="$path"
61267  if test "x$has_colon" = x; then
61268    # Not in mixed or Windows style, start by that.
61269    new_path=`cmd //c echo $path`
61270  fi
61271
61272
61273  input_path="$new_path"
61274  # Check if we need to convert this using DOS-style short mode. If the path
61275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61276  # take no chances and rewrite it.
61277  # Note: m4 eats our [], so we need to use [ and ] instead.
61278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61279  if test "x$has_forbidden_chars" != x; then
61280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61282  fi
61283
61284
61285  windows_path="$new_path"
61286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61287    unix_path=`$CYGPATH -u "$windows_path"`
61288    new_path="$unix_path"
61289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61291    new_path="$unix_path"
61292  fi
61293
61294  if test "x$path" != "x$new_path"; then
61295    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61297$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61298  fi
61299
61300  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61301  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61302
61303    else
61304      # We're on a unix platform. Hooray! :)
61305      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61306      has_space=`$ECHO "$path" | $GREP " "`
61307      if test "x$has_space" != x; then
61308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61309$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61310        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61311      fi
61312
61313      # Use eval to expand a potential ~
61314      eval path="$path"
61315      if test ! -f "$path" && test ! -d "$path"; then
61316        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61317      fi
61318
61319      if test -d "$path"; then
61320        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61321      else
61322        dir="`$DIRNAME "$path"`"
61323        base="`$BASENAME "$path"`"
61324        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61325      fi
61326    fi
61327  fi
61328
61329
61330  # Only process if variable expands to non-empty
61331
61332  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61334
61335  # Input might be given as Windows format, start by converting to
61336  # unix format.
61337  path="$POTENTIAL_FREETYPE_LIB_PATH"
61338  new_path=`$CYGPATH -u "$path"`
61339
61340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61343  # "foo.exe" is OK but "foo" is an error.
61344  #
61345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61346  # It is also a way to make sure we got the proper file name for the real test later on.
61347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61348  if test "x$test_shortpath" = x; then
61349    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61350$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61351    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61352  fi
61353
61354  # Call helper function which possibly converts this using DOS-style short mode.
61355  # If so, the updated path is stored in $new_path.
61356
61357  input_path="$new_path"
61358  # Check if we need to convert this using DOS-style short mode. If the path
61359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61360  # take no chances and rewrite it.
61361  # Note: m4 eats our [], so we need to use [ and ] instead.
61362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61363  if test "x$has_forbidden_chars" != x; then
61364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61368      # Going to short mode and back again did indeed matter. Since short mode is
61369      # case insensitive, let's make it lowercase to improve readability.
61370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61371      # Now convert it back to Unix-style (cygpath)
61372      input_path=`$CYGPATH -u "$shortmode_path"`
61373      new_path="$input_path"
61374    fi
61375  fi
61376
61377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61378  if test "x$test_cygdrive_prefix" = x; then
61379    # As a simple fix, exclude /usr/bin since it's not a real path.
61380    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61382      # a path prefixed by /cygdrive for fixpath to work.
61383      new_path="$CYGWIN_ROOT_PATH$input_path"
61384    fi
61385  fi
61386
61387
61388  if test "x$path" != "x$new_path"; then
61389    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61391$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61392  fi
61393
61394    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61395
61396  path="$POTENTIAL_FREETYPE_LIB_PATH"
61397  has_colon=`$ECHO $path | $GREP ^.:`
61398  new_path="$path"
61399  if test "x$has_colon" = x; then
61400    # Not in mixed or Windows style, start by that.
61401    new_path=`cmd //c echo $path`
61402  fi
61403
61404
61405  input_path="$new_path"
61406  # Check if we need to convert this using DOS-style short mode. If the path
61407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61408  # take no chances and rewrite it.
61409  # Note: m4 eats our [], so we need to use [ and ] instead.
61410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61411  if test "x$has_forbidden_chars" != x; then
61412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61414  fi
61415
61416
61417  windows_path="$new_path"
61418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61419    unix_path=`$CYGPATH -u "$windows_path"`
61420    new_path="$unix_path"
61421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61423    new_path="$unix_path"
61424  fi
61425
61426  if test "x$path" != "x$new_path"; then
61427    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61429$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61430  fi
61431
61432  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61433  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61434
61435    else
61436      # We're on a unix platform. Hooray! :)
61437      path="$POTENTIAL_FREETYPE_LIB_PATH"
61438      has_space=`$ECHO "$path" | $GREP " "`
61439      if test "x$has_space" != x; then
61440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61441$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61442        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61443      fi
61444
61445      # Use eval to expand a potential ~
61446      eval path="$path"
61447      if test ! -f "$path" && test ! -d "$path"; then
61448        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61449      fi
61450
61451      if test -d "$path"; then
61452        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61453      else
61454        dir="`$DIRNAME "$path"`"
61455        base="`$BASENAME "$path"`"
61456        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61457      fi
61458    fi
61459  fi
61460
61461
61462    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61464$as_echo_n "checking for freetype includes... " >&6; }
61465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61466$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61467    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61469$as_echo_n "checking for freetype libraries... " >&6; }
61470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61471$as_echo "$FREETYPE_LIB_PATH" >&6; }
61472  fi
61473
61474            else
61475
61476  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61477  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61478  METHOD="well-known location"
61479
61480  # Let's start with an optimistic view of the world :-)
61481  FOUND_FREETYPE=yes
61482
61483  # First look for the canonical freetype main include file ft2build.h.
61484  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61485    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61486    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61487    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61488      # Fail.
61489      FOUND_FREETYPE=no
61490    fi
61491  fi
61492
61493  if test "x$FOUND_FREETYPE" = xyes; then
61494    # Include file found, let's continue the sanity check.
61495    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61496$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61497
61498    # Reset to default value
61499    FREETYPE_BASE_NAME=freetype
61500    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61501    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61502      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61503          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61504        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61505        # for the .6 version explicitly.
61506        FREETYPE_BASE_NAME=freetype.6
61507        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61508        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61509$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61510      else
61511        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61512$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61513        FOUND_FREETYPE=no
61514      fi
61515    else
61516      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61517        # On Windows, we will need both .lib and .dll file.
61518        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61519          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61520$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61521          FOUND_FREETYPE=no
61522        fi
61523      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61524          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61525        # Found lib in isa dir, use that instead.
61526        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61527        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61528$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61529      fi
61530    fi
61531  fi
61532
61533  if test "x$FOUND_FREETYPE" = xyes; then
61534
61535  # Only process if variable expands to non-empty
61536
61537  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61539
61540  # Input might be given as Windows format, start by converting to
61541  # unix format.
61542  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61543  new_path=`$CYGPATH -u "$path"`
61544
61545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61548  # "foo.exe" is OK but "foo" is an error.
61549  #
61550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61551  # It is also a way to make sure we got the proper file name for the real test later on.
61552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61553  if test "x$test_shortpath" = x; then
61554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61556    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61557  fi
61558
61559  # Call helper function which possibly converts this using DOS-style short mode.
61560  # If so, the updated path is stored in $new_path.
61561
61562  input_path="$new_path"
61563  # Check if we need to convert this using DOS-style short mode. If the path
61564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61565  # take no chances and rewrite it.
61566  # Note: m4 eats our [], so we need to use [ and ] instead.
61567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61568  if test "x$has_forbidden_chars" != x; then
61569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61573      # Going to short mode and back again did indeed matter. Since short mode is
61574      # case insensitive, let's make it lowercase to improve readability.
61575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61576      # Now convert it back to Unix-style (cygpath)
61577      input_path=`$CYGPATH -u "$shortmode_path"`
61578      new_path="$input_path"
61579    fi
61580  fi
61581
61582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61583  if test "x$test_cygdrive_prefix" = x; then
61584    # As a simple fix, exclude /usr/bin since it's not a real path.
61585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61587      # a path prefixed by /cygdrive for fixpath to work.
61588      new_path="$CYGWIN_ROOT_PATH$input_path"
61589    fi
61590  fi
61591
61592
61593  if test "x$path" != "x$new_path"; then
61594    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61597  fi
61598
61599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61600
61601  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61602  has_colon=`$ECHO $path | $GREP ^.:`
61603  new_path="$path"
61604  if test "x$has_colon" = x; then
61605    # Not in mixed or Windows style, start by that.
61606    new_path=`cmd //c echo $path`
61607  fi
61608
61609
61610  input_path="$new_path"
61611  # Check if we need to convert this using DOS-style short mode. If the path
61612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61613  # take no chances and rewrite it.
61614  # Note: m4 eats our [], so we need to use [ and ] instead.
61615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61616  if test "x$has_forbidden_chars" != x; then
61617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61619  fi
61620
61621
61622  windows_path="$new_path"
61623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61624    unix_path=`$CYGPATH -u "$windows_path"`
61625    new_path="$unix_path"
61626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61628    new_path="$unix_path"
61629  fi
61630
61631  if test "x$path" != "x$new_path"; then
61632    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61634$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61635  fi
61636
61637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61639
61640    else
61641      # We're on a unix platform. Hooray! :)
61642      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61643      has_space=`$ECHO "$path" | $GREP " "`
61644      if test "x$has_space" != x; then
61645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61647        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61648      fi
61649
61650      # Use eval to expand a potential ~
61651      eval path="$path"
61652      if test ! -f "$path" && test ! -d "$path"; then
61653        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61654      fi
61655
61656      if test -d "$path"; then
61657        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61658      else
61659        dir="`$DIRNAME "$path"`"
61660        base="`$BASENAME "$path"`"
61661        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61662      fi
61663    fi
61664  fi
61665
61666
61667  # Only process if variable expands to non-empty
61668
61669  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61671
61672  # Input might be given as Windows format, start by converting to
61673  # unix format.
61674  path="$POTENTIAL_FREETYPE_LIB_PATH"
61675  new_path=`$CYGPATH -u "$path"`
61676
61677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61680  # "foo.exe" is OK but "foo" is an error.
61681  #
61682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61683  # It is also a way to make sure we got the proper file name for the real test later on.
61684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61685  if test "x$test_shortpath" = x; then
61686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61687$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61688    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61689  fi
61690
61691  # Call helper function which possibly converts this using DOS-style short mode.
61692  # If so, the updated path is stored in $new_path.
61693
61694  input_path="$new_path"
61695  # Check if we need to convert this using DOS-style short mode. If the path
61696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61697  # take no chances and rewrite it.
61698  # Note: m4 eats our [], so we need to use [ and ] instead.
61699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61700  if test "x$has_forbidden_chars" != x; then
61701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61705      # Going to short mode and back again did indeed matter. Since short mode is
61706      # case insensitive, let's make it lowercase to improve readability.
61707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61708      # Now convert it back to Unix-style (cygpath)
61709      input_path=`$CYGPATH -u "$shortmode_path"`
61710      new_path="$input_path"
61711    fi
61712  fi
61713
61714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61715  if test "x$test_cygdrive_prefix" = x; then
61716    # As a simple fix, exclude /usr/bin since it's not a real path.
61717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61719      # a path prefixed by /cygdrive for fixpath to work.
61720      new_path="$CYGWIN_ROOT_PATH$input_path"
61721    fi
61722  fi
61723
61724
61725  if test "x$path" != "x$new_path"; then
61726    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61728$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61729  fi
61730
61731    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61732
61733  path="$POTENTIAL_FREETYPE_LIB_PATH"
61734  has_colon=`$ECHO $path | $GREP ^.:`
61735  new_path="$path"
61736  if test "x$has_colon" = x; then
61737    # Not in mixed or Windows style, start by that.
61738    new_path=`cmd //c echo $path`
61739  fi
61740
61741
61742  input_path="$new_path"
61743  # Check if we need to convert this using DOS-style short mode. If the path
61744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61745  # take no chances and rewrite it.
61746  # Note: m4 eats our [], so we need to use [ and ] instead.
61747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61748  if test "x$has_forbidden_chars" != x; then
61749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61751  fi
61752
61753
61754  windows_path="$new_path"
61755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61756    unix_path=`$CYGPATH -u "$windows_path"`
61757    new_path="$unix_path"
61758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61760    new_path="$unix_path"
61761  fi
61762
61763  if test "x$path" != "x$new_path"; then
61764    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61766$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61767  fi
61768
61769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61771
61772    else
61773      # We're on a unix platform. Hooray! :)
61774      path="$POTENTIAL_FREETYPE_LIB_PATH"
61775      has_space=`$ECHO "$path" | $GREP " "`
61776      if test "x$has_space" != x; then
61777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61778$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61779        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61780      fi
61781
61782      # Use eval to expand a potential ~
61783      eval path="$path"
61784      if test ! -f "$path" && test ! -d "$path"; then
61785        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61786      fi
61787
61788      if test -d "$path"; then
61789        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61790      else
61791        dir="`$DIRNAME "$path"`"
61792        base="`$BASENAME "$path"`"
61793        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61794      fi
61795    fi
61796  fi
61797
61798
61799    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61801$as_echo_n "checking for freetype includes... " >&6; }
61802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61803$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61804    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61806$as_echo_n "checking for freetype libraries... " >&6; }
61807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61808$as_echo "$FREETYPE_LIB_PATH" >&6; }
61809  fi
61810
61811              if test "x$FOUND_FREETYPE" != xyes; then
61812
61813  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61814  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61815  METHOD="well-known location"
61816
61817  # Let's start with an optimistic view of the world :-)
61818  FOUND_FREETYPE=yes
61819
61820  # First look for the canonical freetype main include file ft2build.h.
61821  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61822    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61823    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61824    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61825      # Fail.
61826      FOUND_FREETYPE=no
61827    fi
61828  fi
61829
61830  if test "x$FOUND_FREETYPE" = xyes; then
61831    # Include file found, let's continue the sanity check.
61832    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61833$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61834
61835    # Reset to default value
61836    FREETYPE_BASE_NAME=freetype
61837    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61838    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61839      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61840          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61841        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61842        # for the .6 version explicitly.
61843        FREETYPE_BASE_NAME=freetype.6
61844        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61845        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61846$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61847      else
61848        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61849$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61850        FOUND_FREETYPE=no
61851      fi
61852    else
61853      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61854        # On Windows, we will need both .lib and .dll file.
61855        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61856          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61857$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61858          FOUND_FREETYPE=no
61859        fi
61860      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61861          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61862        # Found lib in isa dir, use that instead.
61863        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61864        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61865$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61866      fi
61867    fi
61868  fi
61869
61870  if test "x$FOUND_FREETYPE" = xyes; then
61871
61872  # Only process if variable expands to non-empty
61873
61874  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61876
61877  # Input might be given as Windows format, start by converting to
61878  # unix format.
61879  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61880  new_path=`$CYGPATH -u "$path"`
61881
61882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61885  # "foo.exe" is OK but "foo" is an error.
61886  #
61887  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61888  # It is also a way to make sure we got the proper file name for the real test later on.
61889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61890  if test "x$test_shortpath" = x; then
61891    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61893    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61894  fi
61895
61896  # Call helper function which possibly converts this using DOS-style short mode.
61897  # If so, the updated path is stored in $new_path.
61898
61899  input_path="$new_path"
61900  # Check if we need to convert this using DOS-style short mode. If the path
61901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61902  # take no chances and rewrite it.
61903  # Note: m4 eats our [], so we need to use [ and ] instead.
61904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61905  if test "x$has_forbidden_chars" != x; then
61906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61910      # Going to short mode and back again did indeed matter. Since short mode is
61911      # case insensitive, let's make it lowercase to improve readability.
61912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61913      # Now convert it back to Unix-style (cygpath)
61914      input_path=`$CYGPATH -u "$shortmode_path"`
61915      new_path="$input_path"
61916    fi
61917  fi
61918
61919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61920  if test "x$test_cygdrive_prefix" = x; then
61921    # As a simple fix, exclude /usr/bin since it's not a real path.
61922    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61924      # a path prefixed by /cygdrive for fixpath to work.
61925      new_path="$CYGWIN_ROOT_PATH$input_path"
61926    fi
61927  fi
61928
61929
61930  if test "x$path" != "x$new_path"; then
61931    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61933$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61934  fi
61935
61936    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61937
61938  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61939  has_colon=`$ECHO $path | $GREP ^.:`
61940  new_path="$path"
61941  if test "x$has_colon" = x; then
61942    # Not in mixed or Windows style, start by that.
61943    new_path=`cmd //c echo $path`
61944  fi
61945
61946
61947  input_path="$new_path"
61948  # Check if we need to convert this using DOS-style short mode. If the path
61949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61950  # take no chances and rewrite it.
61951  # Note: m4 eats our [], so we need to use [ and ] instead.
61952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61953  if test "x$has_forbidden_chars" != x; then
61954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61956  fi
61957
61958
61959  windows_path="$new_path"
61960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61961    unix_path=`$CYGPATH -u "$windows_path"`
61962    new_path="$unix_path"
61963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61965    new_path="$unix_path"
61966  fi
61967
61968  if test "x$path" != "x$new_path"; then
61969    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61971$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61972  fi
61973
61974  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61975  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61976
61977    else
61978      # We're on a unix platform. Hooray! :)
61979      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61980      has_space=`$ECHO "$path" | $GREP " "`
61981      if test "x$has_space" != x; then
61982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61983$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61984        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61985      fi
61986
61987      # Use eval to expand a potential ~
61988      eval path="$path"
61989      if test ! -f "$path" && test ! -d "$path"; then
61990        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61991      fi
61992
61993      if test -d "$path"; then
61994        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61995      else
61996        dir="`$DIRNAME "$path"`"
61997        base="`$BASENAME "$path"`"
61998        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61999      fi
62000    fi
62001  fi
62002
62003
62004  # Only process if variable expands to non-empty
62005
62006  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62008
62009  # Input might be given as Windows format, start by converting to
62010  # unix format.
62011  path="$POTENTIAL_FREETYPE_LIB_PATH"
62012  new_path=`$CYGPATH -u "$path"`
62013
62014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62017  # "foo.exe" is OK but "foo" is an error.
62018  #
62019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62020  # It is also a way to make sure we got the proper file name for the real test later on.
62021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62022  if test "x$test_shortpath" = x; then
62023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62025    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62026  fi
62027
62028  # Call helper function which possibly converts this using DOS-style short mode.
62029  # If so, the updated path is stored in $new_path.
62030
62031  input_path="$new_path"
62032  # Check if we need to convert this using DOS-style short mode. If the path
62033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62034  # take no chances and rewrite it.
62035  # Note: m4 eats our [], so we need to use [ and ] instead.
62036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62037  if test "x$has_forbidden_chars" != x; then
62038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62042      # Going to short mode and back again did indeed matter. Since short mode is
62043      # case insensitive, let's make it lowercase to improve readability.
62044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62045      # Now convert it back to Unix-style (cygpath)
62046      input_path=`$CYGPATH -u "$shortmode_path"`
62047      new_path="$input_path"
62048    fi
62049  fi
62050
62051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62052  if test "x$test_cygdrive_prefix" = x; then
62053    # As a simple fix, exclude /usr/bin since it's not a real path.
62054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62056      # a path prefixed by /cygdrive for fixpath to work.
62057      new_path="$CYGWIN_ROOT_PATH$input_path"
62058    fi
62059  fi
62060
62061
62062  if test "x$path" != "x$new_path"; then
62063    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62065$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62066  fi
62067
62068    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62069
62070  path="$POTENTIAL_FREETYPE_LIB_PATH"
62071  has_colon=`$ECHO $path | $GREP ^.:`
62072  new_path="$path"
62073  if test "x$has_colon" = x; then
62074    # Not in mixed or Windows style, start by that.
62075    new_path=`cmd //c echo $path`
62076  fi
62077
62078
62079  input_path="$new_path"
62080  # Check if we need to convert this using DOS-style short mode. If the path
62081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62082  # take no chances and rewrite it.
62083  # Note: m4 eats our [], so we need to use [ and ] instead.
62084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62085  if test "x$has_forbidden_chars" != x; then
62086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62088  fi
62089
62090
62091  windows_path="$new_path"
62092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62093    unix_path=`$CYGPATH -u "$windows_path"`
62094    new_path="$unix_path"
62095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62097    new_path="$unix_path"
62098  fi
62099
62100  if test "x$path" != "x$new_path"; then
62101    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62103$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62104  fi
62105
62106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62108
62109    else
62110      # We're on a unix platform. Hooray! :)
62111      path="$POTENTIAL_FREETYPE_LIB_PATH"
62112      has_space=`$ECHO "$path" | $GREP " "`
62113      if test "x$has_space" != x; then
62114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62115$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62116        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62117      fi
62118
62119      # Use eval to expand a potential ~
62120      eval path="$path"
62121      if test ! -f "$path" && test ! -d "$path"; then
62122        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62123      fi
62124
62125      if test -d "$path"; then
62126        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62127      else
62128        dir="`$DIRNAME "$path"`"
62129        base="`$BASENAME "$path"`"
62130        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62131      fi
62132    fi
62133  fi
62134
62135
62136    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62138$as_echo_n "checking for freetype includes... " >&6; }
62139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62140$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62141    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62143$as_echo_n "checking for freetype libraries... " >&6; }
62144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62145$as_echo "$FREETYPE_LIB_PATH" >&6; }
62146  fi
62147
62148              fi
62149            fi
62150          fi
62151        fi
62152      fi # end check in well-known locations
62153
62154      if test "x$FOUND_FREETYPE" != xyes; then
62155
62156  # Print a helpful message on how to acquire the necessary build dependency.
62157  # freetype is the help tag: freetype, cups, alsa etc
62158  MISSING_DEPENDENCY=freetype
62159
62160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62161    cygwin_help $MISSING_DEPENDENCY
62162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62163    msys_help $MISSING_DEPENDENCY
62164  else
62165    PKGHANDLER_COMMAND=
62166
62167    case $PKGHANDLER in
62168      apt-get)
62169        apt_help     $MISSING_DEPENDENCY ;;
62170      yum)
62171        yum_help     $MISSING_DEPENDENCY ;;
62172      port)
62173        port_help    $MISSING_DEPENDENCY ;;
62174      pkgutil)
62175        pkgutil_help $MISSING_DEPENDENCY ;;
62176      pkgadd)
62177        pkgadd_help  $MISSING_DEPENDENCY ;;
62178    esac
62179
62180    if test "x$PKGHANDLER_COMMAND" != x; then
62181      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62182    fi
62183  fi
62184
62185        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62186      fi
62187    fi # end user specified settings
62188
62189    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62190    if test "x$FREETYPE_CFLAGS" = x; then
62191
62192  # Only process if variable expands to non-empty
62193
62194  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62196
62197  # Input might be given as Windows format, start by converting to
62198  # unix format.
62199  path="$FREETYPE_INCLUDE_PATH"
62200  new_path=`$CYGPATH -u "$path"`
62201
62202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62205  # "foo.exe" is OK but "foo" is an error.
62206  #
62207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62208  # It is also a way to make sure we got the proper file name for the real test later on.
62209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62210  if test "x$test_shortpath" = x; then
62211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62212$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62213    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62214  fi
62215
62216  # Call helper function which possibly converts this using DOS-style short mode.
62217  # If so, the updated path is stored in $new_path.
62218
62219  input_path="$new_path"
62220  # Check if we need to convert this using DOS-style short mode. If the path
62221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62222  # take no chances and rewrite it.
62223  # Note: m4 eats our [], so we need to use [ and ] instead.
62224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62225  if test "x$has_forbidden_chars" != x; then
62226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62230      # Going to short mode and back again did indeed matter. Since short mode is
62231      # case insensitive, let's make it lowercase to improve readability.
62232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62233      # Now convert it back to Unix-style (cygpath)
62234      input_path=`$CYGPATH -u "$shortmode_path"`
62235      new_path="$input_path"
62236    fi
62237  fi
62238
62239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62240  if test "x$test_cygdrive_prefix" = x; then
62241    # As a simple fix, exclude /usr/bin since it's not a real path.
62242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62244      # a path prefixed by /cygdrive for fixpath to work.
62245      new_path="$CYGWIN_ROOT_PATH$input_path"
62246    fi
62247  fi
62248
62249
62250  if test "x$path" != "x$new_path"; then
62251    FREETYPE_INCLUDE_PATH="$new_path"
62252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62253$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62254  fi
62255
62256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62257
62258  path="$FREETYPE_INCLUDE_PATH"
62259  has_colon=`$ECHO $path | $GREP ^.:`
62260  new_path="$path"
62261  if test "x$has_colon" = x; then
62262    # Not in mixed or Windows style, start by that.
62263    new_path=`cmd //c echo $path`
62264  fi
62265
62266
62267  input_path="$new_path"
62268  # Check if we need to convert this using DOS-style short mode. If the path
62269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62270  # take no chances and rewrite it.
62271  # Note: m4 eats our [], so we need to use [ and ] instead.
62272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62273  if test "x$has_forbidden_chars" != x; then
62274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62276  fi
62277
62278
62279  windows_path="$new_path"
62280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62281    unix_path=`$CYGPATH -u "$windows_path"`
62282    new_path="$unix_path"
62283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62285    new_path="$unix_path"
62286  fi
62287
62288  if test "x$path" != "x$new_path"; then
62289    FREETYPE_INCLUDE_PATH="$new_path"
62290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62291$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62292  fi
62293
62294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62296
62297    else
62298      # We're on a unix platform. Hooray! :)
62299      path="$FREETYPE_INCLUDE_PATH"
62300      has_space=`$ECHO "$path" | $GREP " "`
62301      if test "x$has_space" != x; then
62302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62303$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62305      fi
62306
62307      # Use eval to expand a potential ~
62308      eval path="$path"
62309      if test ! -f "$path" && test ! -d "$path"; then
62310        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62311      fi
62312
62313      if test -d "$path"; then
62314        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62315      else
62316        dir="`$DIRNAME "$path"`"
62317        base="`$BASENAME "$path"`"
62318        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62319      fi
62320    fi
62321  fi
62322
62323      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62324        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62325      else
62326        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62327      fi
62328    fi
62329
62330    if test "x$FREETYPE_LIBS" = x; then
62331
62332  # Only process if variable expands to non-empty
62333
62334  if test "x$FREETYPE_LIB_PATH" != x; then
62335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62336
62337  # Input might be given as Windows format, start by converting to
62338  # unix format.
62339  path="$FREETYPE_LIB_PATH"
62340  new_path=`$CYGPATH -u "$path"`
62341
62342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62345  # "foo.exe" is OK but "foo" is an error.
62346  #
62347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62348  # It is also a way to make sure we got the proper file name for the real test later on.
62349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62350  if test "x$test_shortpath" = x; then
62351    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62352$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62353    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62354  fi
62355
62356  # Call helper function which possibly converts this using DOS-style short mode.
62357  # If so, the updated path is stored in $new_path.
62358
62359  input_path="$new_path"
62360  # Check if we need to convert this using DOS-style short mode. If the path
62361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62362  # take no chances and rewrite it.
62363  # Note: m4 eats our [], so we need to use [ and ] instead.
62364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62365  if test "x$has_forbidden_chars" != x; then
62366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62370      # Going to short mode and back again did indeed matter. Since short mode is
62371      # case insensitive, let's make it lowercase to improve readability.
62372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62373      # Now convert it back to Unix-style (cygpath)
62374      input_path=`$CYGPATH -u "$shortmode_path"`
62375      new_path="$input_path"
62376    fi
62377  fi
62378
62379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62380  if test "x$test_cygdrive_prefix" = x; then
62381    # As a simple fix, exclude /usr/bin since it's not a real path.
62382    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62384      # a path prefixed by /cygdrive for fixpath to work.
62385      new_path="$CYGWIN_ROOT_PATH$input_path"
62386    fi
62387  fi
62388
62389
62390  if test "x$path" != "x$new_path"; then
62391    FREETYPE_LIB_PATH="$new_path"
62392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62393$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62394  fi
62395
62396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62397
62398  path="$FREETYPE_LIB_PATH"
62399  has_colon=`$ECHO $path | $GREP ^.:`
62400  new_path="$path"
62401  if test "x$has_colon" = x; then
62402    # Not in mixed or Windows style, start by that.
62403    new_path=`cmd //c echo $path`
62404  fi
62405
62406
62407  input_path="$new_path"
62408  # Check if we need to convert this using DOS-style short mode. If the path
62409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62410  # take no chances and rewrite it.
62411  # Note: m4 eats our [], so we need to use [ and ] instead.
62412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62413  if test "x$has_forbidden_chars" != x; then
62414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62416  fi
62417
62418
62419  windows_path="$new_path"
62420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62421    unix_path=`$CYGPATH -u "$windows_path"`
62422    new_path="$unix_path"
62423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62425    new_path="$unix_path"
62426  fi
62427
62428  if test "x$path" != "x$new_path"; then
62429    FREETYPE_LIB_PATH="$new_path"
62430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62431$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62432  fi
62433
62434  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62435  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62436
62437    else
62438      # We're on a unix platform. Hooray! :)
62439      path="$FREETYPE_LIB_PATH"
62440      has_space=`$ECHO "$path" | $GREP " "`
62441      if test "x$has_space" != x; then
62442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62443$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62444        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62445      fi
62446
62447      # Use eval to expand a potential ~
62448      eval path="$path"
62449      if test ! -f "$path" && test ! -d "$path"; then
62450        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62451      fi
62452
62453      if test -d "$path"; then
62454        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62455      else
62456        dir="`$DIRNAME "$path"`"
62457        base="`$BASENAME "$path"`"
62458        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62459      fi
62460    fi
62461  fi
62462
62463      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62464        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62465      else
62466        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62467      fi
62468    fi
62469
62470    # Try to compile it
62471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62472$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62473    ac_ext=cpp
62474ac_cpp='$CXXCPP $CPPFLAGS'
62475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62478
62479    PREV_CXXCFLAGS="$CXXFLAGS"
62480    PREV_LIBS="$LIBS"
62481    PREV_CXX="$CXX"
62482    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62483    LIBS="$LIBS $FREETYPE_LIBS"
62484    CXX="$FIXPATH $CXX"
62485    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62486/* end confdefs.h.  */
62487
62488          #include<ft2build.h>
62489          #include FT_FREETYPE_H
62490          int main () {
62491            FT_Init_FreeType(NULL);
62492            return 0;
62493          }
62494
62495_ACEOF
62496if ac_fn_cxx_try_link "$LINENO"; then :
62497
62498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62499$as_echo "yes" >&6; }
62500
62501else
62502
62503          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62504$as_echo "no" >&6; }
62505          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62506$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62507          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62508$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62509
62510
62511  # Print a helpful message on how to acquire the necessary build dependency.
62512  # freetype is the help tag: freetype, cups, alsa etc
62513  MISSING_DEPENDENCY=freetype
62514
62515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62516    cygwin_help $MISSING_DEPENDENCY
62517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62518    msys_help $MISSING_DEPENDENCY
62519  else
62520    PKGHANDLER_COMMAND=
62521
62522    case $PKGHANDLER in
62523      apt-get)
62524        apt_help     $MISSING_DEPENDENCY ;;
62525      yum)
62526        yum_help     $MISSING_DEPENDENCY ;;
62527      port)
62528        port_help    $MISSING_DEPENDENCY ;;
62529      pkgutil)
62530        pkgutil_help $MISSING_DEPENDENCY ;;
62531      pkgadd)
62532        pkgadd_help  $MISSING_DEPENDENCY ;;
62533    esac
62534
62535    if test "x$PKGHANDLER_COMMAND" != x; then
62536      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62537    fi
62538  fi
62539
62540
62541          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62542
62543
62544fi
62545rm -f core conftest.err conftest.$ac_objext \
62546    conftest$ac_exeext conftest.$ac_ext
62547    CXXCFLAGS="$PREV_CXXFLAGS"
62548    LIBS="$PREV_LIBS"
62549    CXX="$PREV_CXX"
62550    ac_ext=cpp
62551ac_cpp='$CXXCPP $CPPFLAGS'
62552ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62553ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62554ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62555
62556
62557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62558$as_echo_n "checking if we should bundle freetype... " >&6; }
62559    if test "x$BUNDLE_FREETYPE" = xyes; then
62560      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62561    fi
62562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62563$as_echo "$BUNDLE_FREETYPE" >&6; }
62564
62565  fi # end freetype needed
62566
62567
62568
62569
62570
62571
62572
62573# Check whether --with-alsa was given.
62574if test "${with_alsa+set}" = set; then :
62575  withval=$with_alsa;
62576fi
62577
62578
62579# Check whether --with-alsa-include was given.
62580if test "${with_alsa_include+set}" = set; then :
62581  withval=$with_alsa_include;
62582fi
62583
62584
62585# Check whether --with-alsa-lib was given.
62586if test "${with_alsa_lib+set}" = set; then :
62587  withval=$with_alsa_lib;
62588fi
62589
62590
62591  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62592    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62593        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62594        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62595      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62596$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62597    fi
62598    ALSA_CFLAGS=
62599    ALSA_LIBS=
62600  else
62601    ALSA_FOUND=no
62602
62603    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62604      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62605    fi
62606
62607    if test "x${with_alsa}" != x; then
62608      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62609      ALSA_CFLAGS="-I${with_alsa}/include"
62610      ALSA_FOUND=yes
62611    fi
62612    if test "x${with_alsa_include}" != x; then
62613      ALSA_CFLAGS="-I${with_alsa_include}"
62614      ALSA_FOUND=yes
62615    fi
62616    if test "x${with_alsa_lib}" != x; then
62617      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62618      ALSA_FOUND=yes
62619    fi
62620    # Do not try pkg-config if we have a sysroot set.
62621    if test "x$SYSROOT" = x; then
62622      if test "x$ALSA_FOUND" = xno; then
62623
62624pkg_failed=no
62625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62626$as_echo_n "checking for ALSA... " >&6; }
62627
62628if test -n "$ALSA_CFLAGS"; then
62629    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62630 elif test -n "$PKG_CONFIG"; then
62631    if test -n "$PKG_CONFIG" && \
62632    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62633  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62634  ac_status=$?
62635  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62636  test $ac_status = 0; }; then
62637  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62638else
62639  pkg_failed=yes
62640fi
62641 else
62642    pkg_failed=untried
62643fi
62644if test -n "$ALSA_LIBS"; then
62645    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62646 elif test -n "$PKG_CONFIG"; then
62647    if test -n "$PKG_CONFIG" && \
62648    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62649  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62650  ac_status=$?
62651  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62652  test $ac_status = 0; }; then
62653  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62654else
62655  pkg_failed=yes
62656fi
62657 else
62658    pkg_failed=untried
62659fi
62660
62661
62662
62663if test $pkg_failed = yes; then
62664
62665if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62666        _pkg_short_errors_supported=yes
62667else
62668        _pkg_short_errors_supported=no
62669fi
62670        if test $_pkg_short_errors_supported = yes; then
62671	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62672        else
62673	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62674        fi
62675	# Put the nasty error message in config.log where it belongs
62676	echo "$ALSA_PKG_ERRORS" >&5
62677
62678	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62679$as_echo "no" >&6; }
62680                ALSA_FOUND=no
62681elif test $pkg_failed = untried; then
62682	ALSA_FOUND=no
62683else
62684	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62685	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62687$as_echo "yes" >&6; }
62688	ALSA_FOUND=yes
62689fi
62690      fi
62691    fi
62692    if test "x$ALSA_FOUND" = xno; then
62693      for ac_header in alsa/asoundlib.h
62694do :
62695  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62696if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62697  cat >>confdefs.h <<_ACEOF
62698#define HAVE_ALSA_ASOUNDLIB_H 1
62699_ACEOF
62700
62701            ALSA_FOUND=yes
62702            ALSA_CFLAGS=-Iignoreme
62703            ALSA_LIBS=-lasound
62704            DEFAULT_ALSA=yes
62705
62706else
62707  ALSA_FOUND=no
62708
62709fi
62710
62711done
62712
62713    fi
62714    if test "x$ALSA_FOUND" = xno; then
62715
62716  # Print a helpful message on how to acquire the necessary build dependency.
62717  # alsa is the help tag: freetype, cups, alsa etc
62718  MISSING_DEPENDENCY=alsa
62719
62720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62721    cygwin_help $MISSING_DEPENDENCY
62722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62723    msys_help $MISSING_DEPENDENCY
62724  else
62725    PKGHANDLER_COMMAND=
62726
62727    case $PKGHANDLER in
62728      apt-get)
62729        apt_help     $MISSING_DEPENDENCY ;;
62730      yum)
62731        yum_help     $MISSING_DEPENDENCY ;;
62732      port)
62733        port_help    $MISSING_DEPENDENCY ;;
62734      pkgutil)
62735        pkgutil_help $MISSING_DEPENDENCY ;;
62736      pkgadd)
62737        pkgadd_help  $MISSING_DEPENDENCY ;;
62738    esac
62739
62740    if test "x$PKGHANDLER_COMMAND" != x; then
62741      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62742    fi
62743  fi
62744
62745      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62746    fi
62747  fi
62748
62749
62750
62751
62752
62753
62754# Check whether --with-libffi was given.
62755if test "${with_libffi+set}" = set; then :
62756  withval=$with_libffi;
62757fi
62758
62759
62760# Check whether --with-libffi-include was given.
62761if test "${with_libffi_include+set}" = set; then :
62762  withval=$with_libffi_include;
62763fi
62764
62765
62766# Check whether --with-libffi-lib was given.
62767if test "${with_libffi_lib+set}" = set; then :
62768  withval=$with_libffi_lib;
62769fi
62770
62771
62772  if test "x$NEEDS_LIB_FFI" = xfalse; then
62773    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62774        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62775        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62776      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62777$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62778    fi
62779    LIBFFI_CFLAGS=
62780    LIBFFI_LIBS=
62781  else
62782    LIBFFI_FOUND=no
62783
62784    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62785      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62786    fi
62787
62788    if test "x${with_libffi}" != x; then
62789      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62790      LIBFFI_CFLAGS="-I${with_libffi}/include"
62791      LIBFFI_FOUND=yes
62792    fi
62793    if test "x${with_libffi_include}" != x; then
62794      LIBFFI_CFLAGS="-I${with_libffi_include}"
62795      LIBFFI_FOUND=yes
62796    fi
62797    if test "x${with_libffi_lib}" != x; then
62798      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62799      LIBFFI_FOUND=yes
62800    fi
62801    # Do not try pkg-config if we have a sysroot set.
62802    if test "x$SYSROOT" = x; then
62803      if test "x$LIBFFI_FOUND" = xno; then
62804        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62805
62806pkg_failed=no
62807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62808$as_echo_n "checking for LIBFFI... " >&6; }
62809
62810if test -n "$LIBFFI_CFLAGS"; then
62811    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62812 elif test -n "$PKG_CONFIG"; then
62813    if test -n "$PKG_CONFIG" && \
62814    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62815  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62816  ac_status=$?
62817  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62818  test $ac_status = 0; }; then
62819  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62820else
62821  pkg_failed=yes
62822fi
62823 else
62824    pkg_failed=untried
62825fi
62826if test -n "$LIBFFI_LIBS"; then
62827    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62828 elif test -n "$PKG_CONFIG"; then
62829    if test -n "$PKG_CONFIG" && \
62830    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62831  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62832  ac_status=$?
62833  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62834  test $ac_status = 0; }; then
62835  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62836else
62837  pkg_failed=yes
62838fi
62839 else
62840    pkg_failed=untried
62841fi
62842
62843
62844
62845if test $pkg_failed = yes; then
62846
62847if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62848        _pkg_short_errors_supported=yes
62849else
62850        _pkg_short_errors_supported=no
62851fi
62852        if test $_pkg_short_errors_supported = yes; then
62853	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62854        else
62855	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62856        fi
62857	# Put the nasty error message in config.log where it belongs
62858	echo "$LIBFFI_PKG_ERRORS" >&5
62859
62860	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62861$as_echo "no" >&6; }
62862                LIBFFI_FOUND=no
62863elif test $pkg_failed = untried; then
62864	LIBFFI_FOUND=no
62865else
62866	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62867	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62869$as_echo "yes" >&6; }
62870	LIBFFI_FOUND=yes
62871fi
62872      fi
62873    fi
62874    if test "x$LIBFFI_FOUND" = xno; then
62875      for ac_header in ffi.h
62876do :
62877  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62878if test "x$ac_cv_header_ffi_h" = xyes; then :
62879  cat >>confdefs.h <<_ACEOF
62880#define HAVE_FFI_H 1
62881_ACEOF
62882
62883            LIBFFI_FOUND=yes
62884            LIBFFI_CFLAGS=
62885            LIBFFI_LIBS=-lffi
62886
62887else
62888  LIBFFI_FOUND=no
62889
62890fi
62891
62892done
62893
62894    fi
62895    if test "x$LIBFFI_FOUND" = xno; then
62896
62897  # Print a helpful message on how to acquire the necessary build dependency.
62898  # ffi is the help tag: freetype, cups, alsa etc
62899  MISSING_DEPENDENCY=ffi
62900
62901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62902    cygwin_help $MISSING_DEPENDENCY
62903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62904    msys_help $MISSING_DEPENDENCY
62905  else
62906    PKGHANDLER_COMMAND=
62907
62908    case $PKGHANDLER in
62909      apt-get)
62910        apt_help     $MISSING_DEPENDENCY ;;
62911      yum)
62912        yum_help     $MISSING_DEPENDENCY ;;
62913      port)
62914        port_help    $MISSING_DEPENDENCY ;;
62915      pkgutil)
62916        pkgutil_help $MISSING_DEPENDENCY ;;
62917      pkgadd)
62918        pkgadd_help  $MISSING_DEPENDENCY ;;
62919    esac
62920
62921    if test "x$PKGHANDLER_COMMAND" != x; then
62922      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62923    fi
62924  fi
62925
62926      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62927    fi
62928
62929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62930$as_echo_n "checking if libffi works... " >&6; }
62931    ac_ext=c
62932ac_cpp='$CPP $CPPFLAGS'
62933ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62934ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62935ac_compiler_gnu=$ac_cv_c_compiler_gnu
62936
62937    OLD_CFLAGS="$CFLAGS"
62938    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62939    OLD_LIBS="$LIBS"
62940    LIBS="$LIBS $LIBFFI_LIBS"
62941    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62942/* end confdefs.h.  */
62943#include <ffi.h>
62944int
62945main ()
62946{
62947
62948          ffi_call(NULL, NULL, NULL, NULL);
62949          return 0;
62950
62951  ;
62952  return 0;
62953}
62954_ACEOF
62955if ac_fn_c_try_link "$LINENO"; then :
62956  LIBFFI_WORKS=yes
62957else
62958  LIBFFI_WORKS=no
62959
62960fi
62961rm -f core conftest.err conftest.$ac_objext \
62962    conftest$ac_exeext conftest.$ac_ext
62963    CFLAGS="$OLD_CFLAGS"
62964    LIBS="$OLD_LIBS"
62965    ac_ext=cpp
62966ac_cpp='$CXXCPP $CPPFLAGS'
62967ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62968ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62969ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62970
62971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62972$as_echo "$LIBFFI_WORKS" >&6; }
62973
62974    if test "x$LIBFFI_WORKS" = xno; then
62975
62976  # Print a helpful message on how to acquire the necessary build dependency.
62977  # ffi is the help tag: freetype, cups, alsa etc
62978  MISSING_DEPENDENCY=ffi
62979
62980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62981    cygwin_help $MISSING_DEPENDENCY
62982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62983    msys_help $MISSING_DEPENDENCY
62984  else
62985    PKGHANDLER_COMMAND=
62986
62987    case $PKGHANDLER in
62988      apt-get)
62989        apt_help     $MISSING_DEPENDENCY ;;
62990      yum)
62991        yum_help     $MISSING_DEPENDENCY ;;
62992      port)
62993        port_help    $MISSING_DEPENDENCY ;;
62994      pkgutil)
62995        pkgutil_help $MISSING_DEPENDENCY ;;
62996      pkgadd)
62997        pkgadd_help  $MISSING_DEPENDENCY ;;
62998    esac
62999
63000    if test "x$PKGHANDLER_COMMAND" != x; then
63001      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63002    fi
63003  fi
63004
63005      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63006    fi
63007  fi
63008
63009
63010
63011
63012
63013  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63014    # Extract the first word of "llvm-config", so it can be a program name with args.
63015set dummy llvm-config; ac_word=$2
63016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63017$as_echo_n "checking for $ac_word... " >&6; }
63018if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63019  $as_echo_n "(cached) " >&6
63020else
63021  if test -n "$LLVM_CONFIG"; then
63022  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63023else
63024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63025for as_dir in $PATH
63026do
63027  IFS=$as_save_IFS
63028  test -z "$as_dir" && as_dir=.
63029    for ac_exec_ext in '' $ac_executable_extensions; do
63030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63031    ac_cv_prog_LLVM_CONFIG="llvm-config"
63032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63033    break 2
63034  fi
63035done
63036  done
63037IFS=$as_save_IFS
63038
63039fi
63040fi
63041LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63042if test -n "$LLVM_CONFIG"; then
63043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63044$as_echo "$LLVM_CONFIG" >&6; }
63045else
63046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63047$as_echo "no" >&6; }
63048fi
63049
63050
63051
63052    if test "x$LLVM_CONFIG" != xllvm-config; then
63053      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63054    fi
63055
63056    llvm_components="jit mcjit engine nativecodegen native"
63057    unset LLVM_CFLAGS
63058    for flag in $("$LLVM_CONFIG" --cxxflags); do
63059      if echo "${flag}" | grep -q '^-[ID]'; then
63060        if test "${flag}" != "-D_DEBUG" ; then
63061          if test "${LLVM_CFLAGS}" != "" ; then
63062            LLVM_CFLAGS="${LLVM_CFLAGS} "
63063          fi
63064          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63065        fi
63066      fi
63067    done
63068    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63069    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63070
63071    unset LLVM_LDFLAGS
63072    for flag in $("${LLVM_CONFIG}" --ldflags); do
63073      if echo "${flag}" | grep -q '^-L'; then
63074        if test "${LLVM_LDFLAGS}" != ""; then
63075          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63076        fi
63077        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63078      fi
63079    done
63080
63081    unset LLVM_LIBS
63082    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63083      if echo "${flag}" | grep -q '^-l'; then
63084        if test "${LLVM_LIBS}" != ""; then
63085          LLVM_LIBS="${LLVM_LIBS} "
63086        fi
63087        LLVM_LIBS="${LLVM_LIBS}${flag}"
63088      fi
63089    done
63090
63091    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63092    # always properly detect -ltinfo
63093    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63094
63095
63096
63097
63098  fi
63099
63100
63101
63102# Check whether --with-libjpeg was given.
63103if test "${with_libjpeg+set}" = set; then :
63104  withval=$with_libjpeg;
63105fi
63106
63107
63108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63109$as_echo_n "checking for which libjpeg to use... " >&6; }
63110  # default is bundled
63111  DEFAULT_LIBJPEG=bundled
63112  # if user didn't specify, use DEFAULT_LIBJPEG
63113  if test "x${with_libjpeg}" = "x"; then
63114    with_libjpeg=${DEFAULT_LIBJPEG}
63115  fi
63116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63117$as_echo "${with_libjpeg}" >&6; }
63118
63119  if test "x${with_libjpeg}" = "xbundled"; then
63120    USE_EXTERNAL_LIBJPEG=false
63121  elif test "x${with_libjpeg}" = "xsystem"; then
63122    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63123if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63124
63125else
63126   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63127fi
63128
63129
63130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63131$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63132if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63133  $as_echo_n "(cached) " >&6
63134else
63135  ac_check_lib_save_LIBS=$LIBS
63136LIBS="-ljpeg  $LIBS"
63137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63138/* end confdefs.h.  */
63139
63140/* Override any GCC internal prototype to avoid an error.
63141   Use char because int might match the return type of a GCC
63142   builtin and then its argument prototype would still apply.  */
63143#ifdef __cplusplus
63144extern "C"
63145#endif
63146char jpeg_CreateDecompress ();
63147int
63148main ()
63149{
63150return jpeg_CreateDecompress ();
63151  ;
63152  return 0;
63153}
63154_ACEOF
63155if ac_fn_cxx_try_link "$LINENO"; then :
63156  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63157else
63158  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63159fi
63160rm -f core conftest.err conftest.$ac_objext \
63161    conftest$ac_exeext conftest.$ac_ext
63162LIBS=$ac_check_lib_save_LIBS
63163fi
63164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63165$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63166if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63167  cat >>confdefs.h <<_ACEOF
63168#define HAVE_LIBJPEG 1
63169_ACEOF
63170
63171  LIBS="-ljpeg $LIBS"
63172
63173else
63174   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63175fi
63176
63177
63178    USE_EXTERNAL_LIBJPEG=true
63179  else
63180    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63181  fi
63182
63183
63184
63185
63186
63187# Check whether --with-giflib was given.
63188if test "${with_giflib+set}" = set; then :
63189  withval=$with_giflib;
63190fi
63191
63192
63193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63194$as_echo_n "checking for which giflib to use... " >&6; }
63195  # default is bundled
63196  DEFAULT_GIFLIB=bundled
63197  # if user didn't specify, use DEFAULT_GIFLIB
63198  if test "x${with_giflib}" = "x"; then
63199    with_giflib=${DEFAULT_GIFLIB}
63200  fi
63201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63202$as_echo "${with_giflib}" >&6; }
63203
63204  if test "x${with_giflib}" = "xbundled"; then
63205    USE_EXTERNAL_LIBGIF=false
63206  elif test "x${with_giflib}" = "xsystem"; then
63207    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63208if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63209
63210else
63211   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63212fi
63213
63214
63215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63216$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63217if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63218  $as_echo_n "(cached) " >&6
63219else
63220  ac_check_lib_save_LIBS=$LIBS
63221LIBS="-lgif  $LIBS"
63222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63223/* end confdefs.h.  */
63224
63225/* Override any GCC internal prototype to avoid an error.
63226   Use char because int might match the return type of a GCC
63227   builtin and then its argument prototype would still apply.  */
63228#ifdef __cplusplus
63229extern "C"
63230#endif
63231char DGifGetCode ();
63232int
63233main ()
63234{
63235return DGifGetCode ();
63236  ;
63237  return 0;
63238}
63239_ACEOF
63240if ac_fn_cxx_try_link "$LINENO"; then :
63241  ac_cv_lib_gif_DGifGetCode=yes
63242else
63243  ac_cv_lib_gif_DGifGetCode=no
63244fi
63245rm -f core conftest.err conftest.$ac_objext \
63246    conftest$ac_exeext conftest.$ac_ext
63247LIBS=$ac_check_lib_save_LIBS
63248fi
63249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63250$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63251if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63252  cat >>confdefs.h <<_ACEOF
63253#define HAVE_LIBGIF 1
63254_ACEOF
63255
63256  LIBS="-lgif $LIBS"
63257
63258else
63259   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63260fi
63261
63262
63263    USE_EXTERNAL_LIBGIF=true
63264  else
63265    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63266  fi
63267
63268
63269
63270
63271
63272# Check whether --with-libpng was given.
63273if test "${with_libpng+set}" = set; then :
63274  withval=$with_libpng;
63275fi
63276
63277
63278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63279$as_echo_n "checking for which libpng to use... " >&6; }
63280
63281  # default is bundled
63282  DEFAULT_LIBPNG=bundled
63283  # if user didn't specify, use DEFAULT_LIBPNG
63284  if test "x${with_libpng}" = "x"; then
63285      with_libpng=${DEFAULT_LIBPNG}
63286  fi
63287
63288  if test "x${with_libpng}" = "xbundled"; then
63289      USE_EXTERNAL_LIBPNG=false
63290      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63291$as_echo "bundled" >&6; }
63292  elif test "x${with_libpng}" = "xsystem"; then
63293
63294pkg_failed=no
63295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63296$as_echo_n "checking for PNG... " >&6; }
63297
63298if test -n "$PNG_CFLAGS"; then
63299    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63300 elif test -n "$PKG_CONFIG"; then
63301    if test -n "$PKG_CONFIG" && \
63302    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63303  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63304  ac_status=$?
63305  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63306  test $ac_status = 0; }; then
63307  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63308else
63309  pkg_failed=yes
63310fi
63311 else
63312    pkg_failed=untried
63313fi
63314if test -n "$PNG_LIBS"; then
63315    pkg_cv_PNG_LIBS="$PNG_LIBS"
63316 elif test -n "$PKG_CONFIG"; then
63317    if test -n "$PKG_CONFIG" && \
63318    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63319  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63320  ac_status=$?
63321  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63322  test $ac_status = 0; }; then
63323  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63324else
63325  pkg_failed=yes
63326fi
63327 else
63328    pkg_failed=untried
63329fi
63330
63331
63332
63333if test $pkg_failed = yes; then
63334
63335if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63336        _pkg_short_errors_supported=yes
63337else
63338        _pkg_short_errors_supported=no
63339fi
63340        if test $_pkg_short_errors_supported = yes; then
63341	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63342        else
63343	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63344        fi
63345	# Put the nasty error message in config.log where it belongs
63346	echo "$PNG_PKG_ERRORS" >&5
63347
63348	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63349$as_echo "no" >&6; }
63350                 LIBPNG_FOUND=no
63351elif test $pkg_failed = untried; then
63352	 LIBPNG_FOUND=no
63353else
63354	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63355	PNG_LIBS=$pkg_cv_PNG_LIBS
63356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63357$as_echo "yes" >&6; }
63358	 LIBPNG_FOUND=yes
63359fi
63360      if test "x${LIBPNG_FOUND}" = "xyes"; then
63361          USE_EXTERNAL_LIBPNG=true
63362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63363$as_echo "system" >&6; }
63364      else
63365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63366$as_echo "system not found" >&6; }
63367          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63368      fi
63369  else
63370      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63371  fi
63372
63373
63374
63375
63376
63377# Check whether --with-zlib was given.
63378if test "${with_zlib+set}" = set; then :
63379  withval=$with_zlib;
63380fi
63381
63382
63383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63384$as_echo_n "checking for compress in -lz... " >&6; }
63385if ${ac_cv_lib_z_compress+:} false; then :
63386  $as_echo_n "(cached) " >&6
63387else
63388  ac_check_lib_save_LIBS=$LIBS
63389LIBS="-lz  $LIBS"
63390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63391/* end confdefs.h.  */
63392
63393/* Override any GCC internal prototype to avoid an error.
63394   Use char because int might match the return type of a GCC
63395   builtin and then its argument prototype would still apply.  */
63396#ifdef __cplusplus
63397extern "C"
63398#endif
63399char compress ();
63400int
63401main ()
63402{
63403return compress ();
63404  ;
63405  return 0;
63406}
63407_ACEOF
63408if ac_fn_cxx_try_link "$LINENO"; then :
63409  ac_cv_lib_z_compress=yes
63410else
63411  ac_cv_lib_z_compress=no
63412fi
63413rm -f core conftest.err conftest.$ac_objext \
63414    conftest$ac_exeext conftest.$ac_ext
63415LIBS=$ac_check_lib_save_LIBS
63416fi
63417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63418$as_echo "$ac_cv_lib_z_compress" >&6; }
63419if test "x$ac_cv_lib_z_compress" = xyes; then :
63420   ZLIB_FOUND=yes
63421else
63422   ZLIB_FOUND=no
63423fi
63424
63425
63426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63427$as_echo_n "checking for which zlib to use... " >&6; }
63428
63429  DEFAULT_ZLIB=system
63430  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63431    # On windows default is bundled...on others default is system
63432    DEFAULT_ZLIB=bundled
63433  fi
63434
63435  if test "x${ZLIB_FOUND}" != "xyes"; then
63436    # If we don't find any system...set default to bundled
63437    DEFAULT_ZLIB=bundled
63438  fi
63439
63440  # If user didn't specify, use DEFAULT_ZLIB
63441  if test "x${with_zlib}" = "x"; then
63442    with_zlib=${DEFAULT_ZLIB}
63443  fi
63444
63445  if test "x${with_zlib}" = "xbundled"; then
63446    USE_EXTERNAL_LIBZ=false
63447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63448$as_echo "bundled" >&6; }
63449  elif test "x${with_zlib}" = "xsystem"; then
63450    if test "x${ZLIB_FOUND}" = "xyes"; then
63451      USE_EXTERNAL_LIBZ=true
63452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63453$as_echo "system" >&6; }
63454    else
63455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63456$as_echo "system not found" >&6; }
63457      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63458    fi
63459  else
63460    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63461  fi
63462
63463
63464
63465
63466
63467# Check whether --with-lcms was given.
63468if test "${with_lcms+set}" = set; then :
63469  withval=$with_lcms;
63470fi
63471
63472
63473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63474$as_echo_n "checking for which lcms to use... " >&6; }
63475
63476  DEFAULT_LCMS=bundled
63477  # If user didn't specify, use DEFAULT_LCMS
63478  if test "x${with_lcms}" = "x"; then
63479      with_lcms=${DEFAULT_LCMS}
63480  fi
63481
63482  if test "x${with_lcms}" = "xbundled"; then
63483    USE_EXTERNAL_LCMS=false
63484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63485$as_echo "bundled" >&6; }
63486  elif test "x${with_lcms}" = "xsystem"; then
63487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63488$as_echo "system" >&6; }
63489
63490pkg_failed=no
63491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63492$as_echo_n "checking for LCMS... " >&6; }
63493
63494if test -n "$LCMS_CFLAGS"; then
63495    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63496 elif test -n "$PKG_CONFIG"; then
63497    if test -n "$PKG_CONFIG" && \
63498    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63499  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63500  ac_status=$?
63501  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63502  test $ac_status = 0; }; then
63503  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63504else
63505  pkg_failed=yes
63506fi
63507 else
63508    pkg_failed=untried
63509fi
63510if test -n "$LCMS_LIBS"; then
63511    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63512 elif test -n "$PKG_CONFIG"; then
63513    if test -n "$PKG_CONFIG" && \
63514    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63515  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63516  ac_status=$?
63517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63518  test $ac_status = 0; }; then
63519  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63520else
63521  pkg_failed=yes
63522fi
63523 else
63524    pkg_failed=untried
63525fi
63526
63527
63528
63529if test $pkg_failed = yes; then
63530
63531if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63532        _pkg_short_errors_supported=yes
63533else
63534        _pkg_short_errors_supported=no
63535fi
63536        if test $_pkg_short_errors_supported = yes; then
63537	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63538        else
63539	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63540        fi
63541	# Put the nasty error message in config.log where it belongs
63542	echo "$LCMS_PKG_ERRORS" >&5
63543
63544	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63545$as_echo "no" >&6; }
63546                LCMS_FOUND=no
63547elif test $pkg_failed = untried; then
63548	LCMS_FOUND=no
63549else
63550	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63551	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63553$as_echo "yes" >&6; }
63554	LCMS_FOUND=yes
63555fi
63556    if test "x${LCMS_FOUND}" = "xyes"; then
63557      USE_EXTERNAL_LCMS=true
63558    else
63559      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63560    fi
63561  else
63562    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63563  fi
63564
63565
63566
63567
63568
63569
63570
63571
63572
63573
63574
63575  # Setup libm (the maths library)
63576  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63578$as_echo_n "checking for cos in -lm... " >&6; }
63579if ${ac_cv_lib_m_cos+:} false; then :
63580  $as_echo_n "(cached) " >&6
63581else
63582  ac_check_lib_save_LIBS=$LIBS
63583LIBS="-lm  $LIBS"
63584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63585/* end confdefs.h.  */
63586
63587/* Override any GCC internal prototype to avoid an error.
63588   Use char because int might match the return type of a GCC
63589   builtin and then its argument prototype would still apply.  */
63590#ifdef __cplusplus
63591extern "C"
63592#endif
63593char cos ();
63594int
63595main ()
63596{
63597return cos ();
63598  ;
63599  return 0;
63600}
63601_ACEOF
63602if ac_fn_cxx_try_link "$LINENO"; then :
63603  ac_cv_lib_m_cos=yes
63604else
63605  ac_cv_lib_m_cos=no
63606fi
63607rm -f core conftest.err conftest.$ac_objext \
63608    conftest$ac_exeext conftest.$ac_ext
63609LIBS=$ac_check_lib_save_LIBS
63610fi
63611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63612$as_echo "$ac_cv_lib_m_cos" >&6; }
63613if test "x$ac_cv_lib_m_cos" = xyes; then :
63614  cat >>confdefs.h <<_ACEOF
63615#define HAVE_LIBM 1
63616_ACEOF
63617
63618  LIBS="-lm $LIBS"
63619
63620else
63621
63622        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63623$as_echo "$as_me: Maths library was not found" >&6;}
63624
63625fi
63626
63627    LIBM="-lm"
63628  else
63629    LIBM=""
63630  fi
63631
63632
63633  # Setup libdl (for dynamic library loading)
63634  save_LIBS="$LIBS"
63635  LIBS=""
63636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63637$as_echo_n "checking for dlopen in -ldl... " >&6; }
63638if ${ac_cv_lib_dl_dlopen+:} false; then :
63639  $as_echo_n "(cached) " >&6
63640else
63641  ac_check_lib_save_LIBS=$LIBS
63642LIBS="-ldl  $LIBS"
63643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63644/* end confdefs.h.  */
63645
63646/* Override any GCC internal prototype to avoid an error.
63647   Use char because int might match the return type of a GCC
63648   builtin and then its argument prototype would still apply.  */
63649#ifdef __cplusplus
63650extern "C"
63651#endif
63652char dlopen ();
63653int
63654main ()
63655{
63656return dlopen ();
63657  ;
63658  return 0;
63659}
63660_ACEOF
63661if ac_fn_cxx_try_link "$LINENO"; then :
63662  ac_cv_lib_dl_dlopen=yes
63663else
63664  ac_cv_lib_dl_dlopen=no
63665fi
63666rm -f core conftest.err conftest.$ac_objext \
63667    conftest$ac_exeext conftest.$ac_ext
63668LIBS=$ac_check_lib_save_LIBS
63669fi
63670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63671$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63672if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63673  cat >>confdefs.h <<_ACEOF
63674#define HAVE_LIBDL 1
63675_ACEOF
63676
63677  LIBS="-ldl $LIBS"
63678
63679fi
63680
63681  LIBDL="$LIBS"
63682
63683  LIBS="$save_LIBS"
63684
63685  # Deprecated libraries, keep the flags for backwards compatibility
63686  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63687
63688
63689# Check whether --with-dxsdk was given.
63690if test "${with_dxsdk+set}" = set; then :
63691  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63692$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63693fi
63694
63695
63696
63697
63698# Check whether --with-dxsdk-lib was given.
63699if test "${with_dxsdk_lib+set}" = set; then :
63700  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63701$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63702fi
63703
63704
63705
63706
63707# Check whether --with-dxsdk-include was given.
63708if test "${with_dxsdk_include+set}" = set; then :
63709  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63710$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63711fi
63712
63713
63714  fi
63715
63716  # Control if libzip can use mmap. Available for purposes of overriding.
63717  LIBZIP_CAN_USE_MMAP=true
63718
63719
63720
63721  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63722    # Find the root of the Solaris Studio installation from the compiler path
63723    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63724    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63725    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63726$as_echo_n "checking for libstlport.so.1... " >&6; }
63727    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63728      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63729      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63730    fi
63731    if test -f "$STLPORT_LIB"; then
63732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63733$as_echo "yes, $STLPORT_LIB" >&6; }
63734
63735  # Only process if variable expands to non-empty
63736
63737  if test "x$STLPORT_LIB" != x; then
63738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63739
63740  # Input might be given as Windows format, start by converting to
63741  # unix format.
63742  path="$STLPORT_LIB"
63743  new_path=`$CYGPATH -u "$path"`
63744
63745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63748  # "foo.exe" is OK but "foo" is an error.
63749  #
63750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63751  # It is also a way to make sure we got the proper file name for the real test later on.
63752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63753  if test "x$test_shortpath" = x; then
63754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63755$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63756    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63757  fi
63758
63759  # Call helper function which possibly converts this using DOS-style short mode.
63760  # If so, the updated path is stored in $new_path.
63761
63762  input_path="$new_path"
63763  # Check if we need to convert this using DOS-style short mode. If the path
63764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63765  # take no chances and rewrite it.
63766  # Note: m4 eats our [], so we need to use [ and ] instead.
63767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63768  if test "x$has_forbidden_chars" != x; then
63769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63773      # Going to short mode and back again did indeed matter. Since short mode is
63774      # case insensitive, let's make it lowercase to improve readability.
63775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63776      # Now convert it back to Unix-style (cygpath)
63777      input_path=`$CYGPATH -u "$shortmode_path"`
63778      new_path="$input_path"
63779    fi
63780  fi
63781
63782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63783  if test "x$test_cygdrive_prefix" = x; then
63784    # As a simple fix, exclude /usr/bin since it's not a real path.
63785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63787      # a path prefixed by /cygdrive for fixpath to work.
63788      new_path="$CYGWIN_ROOT_PATH$input_path"
63789    fi
63790  fi
63791
63792
63793  if test "x$path" != "x$new_path"; then
63794    STLPORT_LIB="$new_path"
63795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63796$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63797  fi
63798
63799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63800
63801  path="$STLPORT_LIB"
63802  has_colon=`$ECHO $path | $GREP ^.:`
63803  new_path="$path"
63804  if test "x$has_colon" = x; then
63805    # Not in mixed or Windows style, start by that.
63806    new_path=`cmd //c echo $path`
63807  fi
63808
63809
63810  input_path="$new_path"
63811  # Check if we need to convert this using DOS-style short mode. If the path
63812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63813  # take no chances and rewrite it.
63814  # Note: m4 eats our [], so we need to use [ and ] instead.
63815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63816  if test "x$has_forbidden_chars" != x; then
63817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63819  fi
63820
63821
63822  windows_path="$new_path"
63823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63824    unix_path=`$CYGPATH -u "$windows_path"`
63825    new_path="$unix_path"
63826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63828    new_path="$unix_path"
63829  fi
63830
63831  if test "x$path" != "x$new_path"; then
63832    STLPORT_LIB="$new_path"
63833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63834$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63835  fi
63836
63837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63839
63840    else
63841      # We're on a unix platform. Hooray! :)
63842      path="$STLPORT_LIB"
63843      has_space=`$ECHO "$path" | $GREP " "`
63844      if test "x$has_space" != x; then
63845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63846$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63848      fi
63849
63850      # Use eval to expand a potential ~
63851      eval path="$path"
63852      if test ! -f "$path" && test ! -d "$path"; then
63853        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63854      fi
63855
63856      if test -d "$path"; then
63857        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63858      else
63859        dir="`$DIRNAME "$path"`"
63860        base="`$BASENAME "$path"`"
63861        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63862      fi
63863    fi
63864  fi
63865
63866    else
63867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63868$as_echo "no, not found at $STLPORT_LIB" >&6; }
63869      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63870    fi
63871
63872  fi
63873
63874
63875
63876
63877
63878
63879
63880
63881
63882
63883
63884
63885
63886
63887###############################################################################
63888#
63889# We need to do some final tweaking, when everything else is done.
63890#
63891###############################################################################
63892
63893
63894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63895$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63896
63897  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63898    ENABLE_INTREE_EC=yes
63899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63900$as_echo "yes" >&6; }
63901  else
63902    ENABLE_INTREE_EC=no
63903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63904$as_echo "no" >&6; }
63905  fi
63906
63907
63908
63909
63910  # Check whether --enable-jtreg-failure-handler was given.
63911if test "${enable_jtreg_failure_handler+set}" = set; then :
63912  enableval=$enable_jtreg_failure_handler;
63913fi
63914
63915
63916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63917$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63918
63919  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63920    if test "x$JT_HOME" = "x"; then
63921      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63922    else
63923      BUILD_FAILURE_HANDLER=true
63924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63925$as_echo "yes, forced" >&6; }
63926    fi
63927  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63928    BUILD_FAILURE_HANDLER=false
63929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63930$as_echo "no, forced" >&6; }
63931  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63932      || test "x$enable_jtreg_failure_handler" = "x"; then
63933    if test "x$JT_HOME" = "x"; then
63934      BUILD_FAILURE_HANDLER=false
63935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63936$as_echo "no, missing jtreg" >&6; }
63937    else
63938      BUILD_FAILURE_HANDLER=true
63939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63940$as_echo "yes, jtreg present" >&6; }
63941    fi
63942  else
63943    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63944  fi
63945
63946
63947
63948
63949  # Check whether --enable-generate-classlist was given.
63950if test "${enable_generate_classlist+set}" = set; then :
63951  enableval=$enable_generate_classlist;
63952fi
63953
63954
63955  # Check if it's likely that it's possible to generate the classlist. Depending
63956  # on exact jvm configuration it could be possible anyway.
63957  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63958    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63959  else
63960    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63961  fi
63962
63963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63964$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63965  if test "x$enable_generate_classlist" = "xyes"; then
63966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63967$as_echo "yes, forced" >&6; }
63968    ENABLE_GENERATE_CLASSLIST="true"
63969    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63970      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63971$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63972    fi
63973  elif test "x$enable_generate_classlist" = "xno"; then
63974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63975$as_echo "no, forced" >&6; }
63976    ENABLE_GENERATE_CLASSLIST="false"
63977  elif test "x$enable_generate_classlist" = "x"; then
63978    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63979      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63980$as_echo "yes" >&6; }
63981      ENABLE_GENERATE_CLASSLIST="true"
63982    else
63983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63984$as_echo "no" >&6; }
63985      ENABLE_GENERATE_CLASSLIST="false"
63986    fi
63987  else
63988    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63989  fi
63990
63991
63992
63993
63994###############################################################################
63995#
63996# Configure parts of the build that only affect the build performance,
63997# not the result.
63998#
63999###############################################################################
64000
64001
64002  # How many cores do we have on this build system?
64003
64004# Check whether --with-num-cores was given.
64005if test "${with_num_cores+set}" = set; then :
64006  withval=$with_num_cores;
64007fi
64008
64009  if test "x$with_num_cores" = x; then
64010    # The number of cores were not specified, try to probe them.
64011
64012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64013$as_echo_n "checking for number of cores... " >&6; }
64014  NUM_CORES=1
64015  FOUND_CORES=no
64016
64017  if test -f /proc/cpuinfo; then
64018    # Looks like a Linux (or cygwin) system
64019    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64020    FOUND_CORES=yes
64021  elif test -x /usr/sbin/psrinfo; then
64022    # Looks like a Solaris system
64023    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64024    FOUND_CORES=yes
64025  elif test -x /usr/sbin/sysctl; then
64026    # Looks like a MacOSX system
64027    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64028    FOUND_CORES=yes
64029  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64030    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64031    FOUND_CORES=yes
64032  elif test -n "$NUMBER_OF_PROCESSORS"; then
64033    # On windows, look in the env
64034    NUM_CORES=$NUMBER_OF_PROCESSORS
64035    FOUND_CORES=yes
64036  fi
64037
64038  if test "x$FOUND_CORES" = xyes; then
64039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64040$as_echo "$NUM_CORES" >&6; }
64041  else
64042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64043$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64044    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64045$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64046  fi
64047
64048  else
64049    NUM_CORES=$with_num_cores
64050  fi
64051
64052
64053
64054  # How much memory do we have on this build system?
64055
64056# Check whether --with-memory-size was given.
64057if test "${with_memory_size+set}" = set; then :
64058  withval=$with_memory_size;
64059fi
64060
64061  if test "x$with_memory_size" = x; then
64062    # The memory size was not specified, try to probe it.
64063
64064  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64065$as_echo_n "checking for memory size... " >&6; }
64066  # Default to 1024 MB
64067  MEMORY_SIZE=1024
64068  FOUND_MEM=no
64069
64070  if test -f /proc/meminfo; then
64071    # Looks like a Linux (or cygwin) system
64072    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64073    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64074    FOUND_MEM=yes
64075  elif test -x /usr/sbin/prtconf; then
64076    # Looks like a Solaris or AIX system
64077    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64078    FOUND_MEM=yes
64079  elif test -x /usr/sbin/sysctl; then
64080    # Looks like a MacOSX system
64081    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64082    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64083    FOUND_MEM=yes
64084  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64085    # Windows, but without cygwin
64086    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64087    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64088    FOUND_MEM=yes
64089  fi
64090
64091  if test "x$FOUND_MEM" = xyes; then
64092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64093$as_echo "$MEMORY_SIZE MB" >&6; }
64094  else
64095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64096$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64097    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64098$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64099  fi
64100
64101  else
64102    MEMORY_SIZE=$with_memory_size
64103  fi
64104
64105
64106
64107  # Provide a decent default number of parallel jobs for make depending on
64108  # number of cores, amount of memory and machine architecture.
64109
64110# Check whether --with-jobs was given.
64111if test "${with_jobs+set}" = set; then :
64112  withval=$with_jobs;
64113fi
64114
64115  if test "x$with_jobs" = x; then
64116    # Number of jobs was not specified, calculate.
64117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64118$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64119    # Approximate memory in GB.
64120    memory_gb=`expr $MEMORY_SIZE / 1024`
64121    # Pick the lowest of memory in gb and number of cores.
64122    if test "$memory_gb" -lt "$NUM_CORES"; then
64123      JOBS="$memory_gb"
64124    else
64125      JOBS="$NUM_CORES"
64126    fi
64127    if test "$JOBS" -eq "0"; then
64128      JOBS=1
64129    fi
64130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64131$as_echo "$JOBS" >&6; }
64132  else
64133    JOBS=$with_jobs
64134  fi
64135
64136
64137
64138  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64139
64140# Check whether --with-test-jobs was given.
64141if test "${with_test_jobs+set}" = set; then :
64142  withval=$with_test_jobs;
64143fi
64144
64145  if test "x$with_test_jobs" = x; then
64146      TEST_JOBS=0
64147  else
64148      TEST_JOBS=$with_test_jobs
64149  fi
64150
64151
64152
64153# Setup arguments for the boot jdk (after cores and memory have been setup)
64154
64155  ##############################################################################
64156  #
64157  # Specify jvm options for anything that is run with the Boot JDK.
64158  # Not all JVM:s accept the same arguments on the command line.
64159  #
64160
64161# Check whether --with-boot-jdk-jvmargs was given.
64162if test "${with_boot_jdk_jvmargs+set}" = set; then :
64163  withval=$with_boot_jdk_jvmargs;
64164fi
64165
64166
64167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64168$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64169
64170  # Disable special log output when a debug build is used as Boot JDK...
64171
64172  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64173  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64174  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64175  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64176  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64177  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64178    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64179    JVM_ARG_OK=true
64180  else
64181    $ECHO "Arg failed:" >&5
64182    $ECHO "$OUTPUT" >&5
64183    JVM_ARG_OK=false
64184  fi
64185
64186
64187  # Force en-US environment
64188
64189  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64190  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64191  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64192  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64193  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64194  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64195    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64196    JVM_ARG_OK=true
64197  else
64198    $ECHO "Arg failed:" >&5
64199    $ECHO "$OUTPUT" >&5
64200    JVM_ARG_OK=false
64201  fi
64202
64203
64204  # Apply user provided options.
64205
64206  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64207  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64208  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64209  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64210  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64211  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64212    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64213    JVM_ARG_OK=true
64214  else
64215    $ECHO "Arg failed:" >&5
64216    $ECHO "$OUTPUT" >&5
64217    JVM_ARG_OK=false
64218  fi
64219
64220
64221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64222$as_echo "$boot_jdk_jvmargs" >&6; }
64223
64224  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64225  JAVA_FLAGS=$boot_jdk_jvmargs
64226
64227
64228
64229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64230$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64231
64232  # Starting amount of heap memory.
64233
64234  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64235  $ECHO "Command: $JAVA -Xms64M -version" >&5
64236  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64237  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64238  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64239  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64240    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64241    JVM_ARG_OK=true
64242  else
64243    $ECHO "Arg failed:" >&5
64244    $ECHO "$OUTPUT" >&5
64245    JVM_ARG_OK=false
64246  fi
64247
64248  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64249
64250  # Maximum amount of heap memory and stack size.
64251  JVM_HEAP_LIMIT_32="1024"
64252  # Running a 64 bit JVM allows for and requires a bigger heap
64253  JVM_HEAP_LIMIT_64="1600"
64254  STACK_SIZE_32=768
64255  STACK_SIZE_64=1536
64256  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64257  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64258    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64259  fi
64260  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64261    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64262  fi
64263  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64264    JVM_HEAP_LIMIT_32=512
64265    JVM_HEAP_LIMIT_64=512
64266  fi
64267
64268  if test "x$BOOT_JDK_BITS" = "x32"; then
64269    STACK_SIZE=$STACK_SIZE_32
64270    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64271  else
64272    STACK_SIZE=$STACK_SIZE_64
64273    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64274  fi
64275
64276  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64277  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64278  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64279  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64280  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64281  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64282    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64283    JVM_ARG_OK=true
64284  else
64285    $ECHO "Arg failed:" >&5
64286    $ECHO "$OUTPUT" >&5
64287    JVM_ARG_OK=false
64288  fi
64289
64290
64291  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64292  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64293  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64294  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64295  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64296  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64297    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64298    JVM_ARG_OK=true
64299  else
64300    $ECHO "Arg failed:" >&5
64301    $ECHO "$OUTPUT" >&5
64302    JVM_ARG_OK=false
64303  fi
64304
64305
64306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64307$as_echo "$boot_jdk_jvmargs_big" >&6; }
64308
64309  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64310
64311
64312  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64313    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64314    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64315  else
64316    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64317    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64318  fi
64319  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64320  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64321  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64322$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64324$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64325
64326
64327  # By default, the main javac compilations use big
64328  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64329
64330
64331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64332$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64333
64334  # Use serial gc for small short lived tools if possible
64335
64336  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64337  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64338  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64339  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64340  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64341  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64342    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64343    JVM_ARG_OK=true
64344  else
64345    $ECHO "Arg failed:" >&5
64346    $ECHO "$OUTPUT" >&5
64347    JVM_ARG_OK=false
64348  fi
64349
64350
64351  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64352  $ECHO "Command: $JAVA -Xms32M -version" >&5
64353  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64354  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64355  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64356  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64357    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64358    JVM_ARG_OK=true
64359  else
64360    $ECHO "Arg failed:" >&5
64361    $ECHO "$OUTPUT" >&5
64362    JVM_ARG_OK=false
64363  fi
64364
64365
64366  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64367  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64368  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64369  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64370  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64371  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64372    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64373    JVM_ARG_OK=true
64374  else
64375    $ECHO "Arg failed:" >&5
64376    $ECHO "$OUTPUT" >&5
64377    JVM_ARG_OK=false
64378  fi
64379
64380
64381  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64382  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64383  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64384  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64385  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64386  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64387    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64388    JVM_ARG_OK=true
64389  else
64390    $ECHO "Arg failed:" >&5
64391    $ECHO "$OUTPUT" >&5
64392    JVM_ARG_OK=false
64393  fi
64394
64395
64396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64397$as_echo "$boot_jdk_jvmargs_small" >&6; }
64398
64399  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64400
64401
64402  JAVA_TOOL_FLAGS_SMALL=""
64403  for f in $JAVA_FLAGS_SMALL; do
64404    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64405  done
64406
64407
64408
64409# Setup smart javac (after cores and memory have been setup)
64410
64411
64412# Check whether --with-sjavac-server-java was given.
64413if test "${with_sjavac_server_java+set}" = set; then :
64414  withval=$with_sjavac_server_java;
64415fi
64416
64417
64418  if test "x$with_sjavac_server_java" != x; then
64419    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64420    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64421    if test "x$FOUND_VERSION" = x; then
64422      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64423    fi
64424  else
64425    SJAVAC_SERVER_JAVA="$JAVA"
64426  fi
64427
64428
64429  if test "$MEMORY_SIZE" -gt "3000"; then
64430
64431  $ECHO "Check if jvm arg is ok: -d64" >&5
64432  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64433  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64434  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64435  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64436  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64437    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64438    JVM_ARG_OK=true
64439  else
64440    $ECHO "Arg failed:" >&5
64441    $ECHO "$OUTPUT" >&5
64442    JVM_ARG_OK=false
64443  fi
64444
64445    if test "$JVM_ARG_OK" = true; then
64446      JVM_64BIT=true
64447      JVM_ARG_OK=false
64448    fi
64449  fi
64450
64451  MX_VALUE=`expr $MEMORY_SIZE / 2`
64452  if test "$JVM_64BIT" = true; then
64453    # Set ms lower than mx since more than one instance of the server might
64454    # get launched at the same time before they figure out which instance won.
64455    MS_VALUE=512
64456    if test "$MX_VALUE" -gt "2048"; then
64457      MX_VALUE=2048
64458    fi
64459  else
64460    MS_VALUE=256
64461    if test "$MX_VALUE" -gt "1500"; then
64462      MX_VALUE=1500
64463    fi
64464  fi
64465  if test "$MX_VALUE" -lt "512"; then
64466    MX_VALUE=512
64467  fi
64468
64469  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64470  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64471  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64472  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64473  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64474  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64475    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64476    JVM_ARG_OK=true
64477  else
64478    $ECHO "Arg failed:" >&5
64479    $ECHO "$OUTPUT" >&5
64480    JVM_ARG_OK=false
64481  fi
64482
64483
64484
64485  # Check whether --enable-sjavac was given.
64486if test "${enable_sjavac+set}" = set; then :
64487  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64488else
64489  ENABLE_SJAVAC="no"
64490fi
64491
64492  if test "x$JVM_ARG_OK" = "xfalse"; then
64493    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64494$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64495    ENABLE_SJAVAC="no"
64496  fi
64497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64498$as_echo_n "checking whether to use sjavac... " >&6; }
64499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64500$as_echo "$ENABLE_SJAVAC" >&6; }
64501
64502
64503  # Check whether --enable-javac-server was given.
64504if test "${enable_javac_server+set}" = set; then :
64505  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64506else
64507  ENABLE_JAVAC_SERVER="yes"
64508fi
64509
64510  if test "x$JVM_ARG_OK" = "xfalse"; then
64511    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64512$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64513    ENABLE_JAVAC_SERVER="no"
64514  fi
64515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64516$as_echo_n "checking whether to use javac server... " >&6; }
64517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64518$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64519
64520
64521  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64522    # When using a server javac, the small client instances do not need much
64523    # resources.
64524    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64525  fi
64526
64527
64528# Setup use of icecc if requested
64529
64530  # Check whether --enable-icecc was given.
64531if test "${enable_icecc+set}" = set; then :
64532  enableval=$enable_icecc;
64533fi
64534
64535
64536  if test "x${enable_icecc}" = "xyes"; then
64537
64538
64539
64540  # Publish this variable in the help.
64541
64542
64543  if [ -z "${ICECC_CMD+x}" ]; then
64544    # The variable is not set by user, try to locate tool using the code snippet
64545    for ac_prog in icecc
64546do
64547  # Extract the first word of "$ac_prog", so it can be a program name with args.
64548set dummy $ac_prog; ac_word=$2
64549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64550$as_echo_n "checking for $ac_word... " >&6; }
64551if ${ac_cv_path_ICECC_CMD+:} false; then :
64552  $as_echo_n "(cached) " >&6
64553else
64554  case $ICECC_CMD in
64555  [\\/]* | ?:[\\/]*)
64556  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64557  ;;
64558  *)
64559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64560for as_dir in $PATH
64561do
64562  IFS=$as_save_IFS
64563  test -z "$as_dir" && as_dir=.
64564    for ac_exec_ext in '' $ac_executable_extensions; do
64565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64566    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64568    break 2
64569  fi
64570done
64571  done
64572IFS=$as_save_IFS
64573
64574  ;;
64575esac
64576fi
64577ICECC_CMD=$ac_cv_path_ICECC_CMD
64578if test -n "$ICECC_CMD"; then
64579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64580$as_echo "$ICECC_CMD" >&6; }
64581else
64582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64583$as_echo "no" >&6; }
64584fi
64585
64586
64587  test -n "$ICECC_CMD" && break
64588done
64589
64590  else
64591    # The variable is set, but is it from the command line or the environment?
64592
64593    # Try to remove the string !ICECC_CMD! from our list.
64594    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64595    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64596      # If it failed, the variable was not from the command line. Ignore it,
64597      # but warn the user (except for BASH, which is always set by the calling BASH).
64598      if test "xICECC_CMD" != xBASH; then
64599        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64600$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64601      fi
64602      # Try to locate tool using the code snippet
64603      for ac_prog in icecc
64604do
64605  # Extract the first word of "$ac_prog", so it can be a program name with args.
64606set dummy $ac_prog; ac_word=$2
64607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64608$as_echo_n "checking for $ac_word... " >&6; }
64609if ${ac_cv_path_ICECC_CMD+:} false; then :
64610  $as_echo_n "(cached) " >&6
64611else
64612  case $ICECC_CMD in
64613  [\\/]* | ?:[\\/]*)
64614  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64615  ;;
64616  *)
64617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64618for as_dir in $PATH
64619do
64620  IFS=$as_save_IFS
64621  test -z "$as_dir" && as_dir=.
64622    for ac_exec_ext in '' $ac_executable_extensions; do
64623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64624    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64626    break 2
64627  fi
64628done
64629  done
64630IFS=$as_save_IFS
64631
64632  ;;
64633esac
64634fi
64635ICECC_CMD=$ac_cv_path_ICECC_CMD
64636if test -n "$ICECC_CMD"; then
64637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64638$as_echo "$ICECC_CMD" >&6; }
64639else
64640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64641$as_echo "no" >&6; }
64642fi
64643
64644
64645  test -n "$ICECC_CMD" && break
64646done
64647
64648    else
64649      # If it succeeded, then it was overridden by the user. We will use it
64650      # for the tool.
64651
64652      # First remove it from the list of overridden variables, so we can test
64653      # for unknown variables in the end.
64654      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64655
64656      # Check if we try to supply an empty value
64657      if test "x$ICECC_CMD" = x; then
64658        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64659$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64661$as_echo_n "checking for ICECC_CMD... " >&6; }
64662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64663$as_echo "disabled" >&6; }
64664      else
64665        # Check if the provided tool contains a complete path.
64666        tool_specified="$ICECC_CMD"
64667        tool_basename="${tool_specified##*/}"
64668        if test "x$tool_basename" = "x$tool_specified"; then
64669          # A command without a complete path is provided, search $PATH.
64670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64671$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64672          # Extract the first word of "$tool_basename", so it can be a program name with args.
64673set dummy $tool_basename; ac_word=$2
64674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64675$as_echo_n "checking for $ac_word... " >&6; }
64676if ${ac_cv_path_ICECC_CMD+:} false; then :
64677  $as_echo_n "(cached) " >&6
64678else
64679  case $ICECC_CMD in
64680  [\\/]* | ?:[\\/]*)
64681  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64682  ;;
64683  *)
64684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64685for as_dir in $PATH
64686do
64687  IFS=$as_save_IFS
64688  test -z "$as_dir" && as_dir=.
64689    for ac_exec_ext in '' $ac_executable_extensions; do
64690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64691    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64693    break 2
64694  fi
64695done
64696  done
64697IFS=$as_save_IFS
64698
64699  ;;
64700esac
64701fi
64702ICECC_CMD=$ac_cv_path_ICECC_CMD
64703if test -n "$ICECC_CMD"; then
64704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64705$as_echo "$ICECC_CMD" >&6; }
64706else
64707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64708$as_echo "no" >&6; }
64709fi
64710
64711
64712          if test "x$ICECC_CMD" = x; then
64713            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64714          fi
64715        else
64716          # Otherwise we believe it is a complete path. Use it as it is.
64717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64718$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64719          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64720$as_echo_n "checking for ICECC_CMD... " >&6; }
64721          if test ! -x "$tool_specified"; then
64722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64723$as_echo "not found" >&6; }
64724            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64725          fi
64726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64727$as_echo "$tool_specified" >&6; }
64728        fi
64729      fi
64730    fi
64731
64732  fi
64733
64734
64735
64736  if test "x$ICECC_CMD" = x; then
64737    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64738  fi
64739
64740
64741    old_path="$PATH"
64742
64743    # Look for icecc-create-env in some known places
64744    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64745
64746
64747
64748  # Publish this variable in the help.
64749
64750
64751  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64752    # The variable is not set by user, try to locate tool using the code snippet
64753    for ac_prog in icecc-create-env
64754do
64755  # Extract the first word of "$ac_prog", so it can be a program name with args.
64756set dummy $ac_prog; ac_word=$2
64757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64758$as_echo_n "checking for $ac_word... " >&6; }
64759if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64760  $as_echo_n "(cached) " >&6
64761else
64762  case $ICECC_CREATE_ENV in
64763  [\\/]* | ?:[\\/]*)
64764  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64765  ;;
64766  *)
64767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64768for as_dir in $PATH
64769do
64770  IFS=$as_save_IFS
64771  test -z "$as_dir" && as_dir=.
64772    for ac_exec_ext in '' $ac_executable_extensions; do
64773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64774    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64776    break 2
64777  fi
64778done
64779  done
64780IFS=$as_save_IFS
64781
64782  ;;
64783esac
64784fi
64785ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64786if test -n "$ICECC_CREATE_ENV"; then
64787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64788$as_echo "$ICECC_CREATE_ENV" >&6; }
64789else
64790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64791$as_echo "no" >&6; }
64792fi
64793
64794
64795  test -n "$ICECC_CREATE_ENV" && break
64796done
64797
64798  else
64799    # The variable is set, but is it from the command line or the environment?
64800
64801    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64804      # If it failed, the variable was not from the command line. Ignore it,
64805      # but warn the user (except for BASH, which is always set by the calling BASH).
64806      if test "xICECC_CREATE_ENV" != xBASH; then
64807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64808$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64809      fi
64810      # Try to locate tool using the code snippet
64811      for ac_prog in icecc-create-env
64812do
64813  # Extract the first word of "$ac_prog", so it can be a program name with args.
64814set dummy $ac_prog; ac_word=$2
64815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64816$as_echo_n "checking for $ac_word... " >&6; }
64817if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64818  $as_echo_n "(cached) " >&6
64819else
64820  case $ICECC_CREATE_ENV in
64821  [\\/]* | ?:[\\/]*)
64822  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64823  ;;
64824  *)
64825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64826for as_dir in $PATH
64827do
64828  IFS=$as_save_IFS
64829  test -z "$as_dir" && as_dir=.
64830    for ac_exec_ext in '' $ac_executable_extensions; do
64831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64832    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64834    break 2
64835  fi
64836done
64837  done
64838IFS=$as_save_IFS
64839
64840  ;;
64841esac
64842fi
64843ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64844if test -n "$ICECC_CREATE_ENV"; then
64845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64846$as_echo "$ICECC_CREATE_ENV" >&6; }
64847else
64848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64849$as_echo "no" >&6; }
64850fi
64851
64852
64853  test -n "$ICECC_CREATE_ENV" && break
64854done
64855
64856    else
64857      # If it succeeded, then it was overridden by the user. We will use it
64858      # for the tool.
64859
64860      # First remove it from the list of overridden variables, so we can test
64861      # for unknown variables in the end.
64862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64863
64864      # Check if we try to supply an empty value
64865      if test "x$ICECC_CREATE_ENV" = x; then
64866        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64867$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64869$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64871$as_echo "disabled" >&6; }
64872      else
64873        # Check if the provided tool contains a complete path.
64874        tool_specified="$ICECC_CREATE_ENV"
64875        tool_basename="${tool_specified##*/}"
64876        if test "x$tool_basename" = "x$tool_specified"; then
64877          # A command without a complete path is provided, search $PATH.
64878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64879$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64880          # Extract the first word of "$tool_basename", so it can be a program name with args.
64881set dummy $tool_basename; ac_word=$2
64882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64883$as_echo_n "checking for $ac_word... " >&6; }
64884if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64885  $as_echo_n "(cached) " >&6
64886else
64887  case $ICECC_CREATE_ENV in
64888  [\\/]* | ?:[\\/]*)
64889  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64890  ;;
64891  *)
64892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64893for as_dir in $PATH
64894do
64895  IFS=$as_save_IFS
64896  test -z "$as_dir" && as_dir=.
64897    for ac_exec_ext in '' $ac_executable_extensions; do
64898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64899    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64901    break 2
64902  fi
64903done
64904  done
64905IFS=$as_save_IFS
64906
64907  ;;
64908esac
64909fi
64910ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64911if test -n "$ICECC_CREATE_ENV"; then
64912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64913$as_echo "$ICECC_CREATE_ENV" >&6; }
64914else
64915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64916$as_echo "no" >&6; }
64917fi
64918
64919
64920          if test "x$ICECC_CREATE_ENV" = x; then
64921            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64922          fi
64923        else
64924          # Otherwise we believe it is a complete path. Use it as it is.
64925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64926$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64927          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64928$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64929          if test ! -x "$tool_specified"; then
64930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64931$as_echo "not found" >&6; }
64932            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64933          fi
64934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64935$as_echo "$tool_specified" >&6; }
64936        fi
64937      fi
64938    fi
64939
64940  fi
64941
64942
64943
64944  if test "x$ICECC_CREATE_ENV" = x; then
64945    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64946  fi
64947
64948
64949    # Use icecc-create-env to create a minimal compilation environment that can
64950    # be sent to the other hosts in the icecream cluster.
64951    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64952    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64953    # Older versions of icecc does not have the --gcc parameter
64954    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64955      icecc_gcc_arg="--gcc"
64956    fi
64957    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64958
64959  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64960      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64961          ${icecc_create_env_log} 2>&1 )
64962  if test "$?" != "0"; then
64963    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64964$as_echo "$as_me: icecc-create-env output:" >&6;}
64965    cat \
64966          ${icecc_create_env_log}
64967    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64968  fi
64969
64970    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64971      # For clang, the icecc compilerwrapper is needed. It usually resides next
64972      # to icecc-create-env.
64973
64974
64975
64976  # Publish this variable in the help.
64977
64978
64979  if [ -z "${ICECC_WRAPPER+x}" ]; then
64980    # The variable is not set by user, try to locate tool using the code snippet
64981    for ac_prog in compilerwrapper
64982do
64983  # Extract the first word of "$ac_prog", so it can be a program name with args.
64984set dummy $ac_prog; ac_word=$2
64985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64986$as_echo_n "checking for $ac_word... " >&6; }
64987if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64988  $as_echo_n "(cached) " >&6
64989else
64990  case $ICECC_WRAPPER in
64991  [\\/]* | ?:[\\/]*)
64992  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64993  ;;
64994  *)
64995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64996for as_dir in $PATH
64997do
64998  IFS=$as_save_IFS
64999  test -z "$as_dir" && as_dir=.
65000    for ac_exec_ext in '' $ac_executable_extensions; do
65001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65002    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65004    break 2
65005  fi
65006done
65007  done
65008IFS=$as_save_IFS
65009
65010  ;;
65011esac
65012fi
65013ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65014if test -n "$ICECC_WRAPPER"; then
65015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65016$as_echo "$ICECC_WRAPPER" >&6; }
65017else
65018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65019$as_echo "no" >&6; }
65020fi
65021
65022
65023  test -n "$ICECC_WRAPPER" && break
65024done
65025
65026  else
65027    # The variable is set, but is it from the command line or the environment?
65028
65029    # Try to remove the string !ICECC_WRAPPER! from our list.
65030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65032      # If it failed, the variable was not from the command line. Ignore it,
65033      # but warn the user (except for BASH, which is always set by the calling BASH).
65034      if test "xICECC_WRAPPER" != xBASH; then
65035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65036$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65037      fi
65038      # Try to locate tool using the code snippet
65039      for ac_prog in compilerwrapper
65040do
65041  # Extract the first word of "$ac_prog", so it can be a program name with args.
65042set dummy $ac_prog; ac_word=$2
65043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65044$as_echo_n "checking for $ac_word... " >&6; }
65045if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65046  $as_echo_n "(cached) " >&6
65047else
65048  case $ICECC_WRAPPER in
65049  [\\/]* | ?:[\\/]*)
65050  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65051  ;;
65052  *)
65053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65054for as_dir in $PATH
65055do
65056  IFS=$as_save_IFS
65057  test -z "$as_dir" && as_dir=.
65058    for ac_exec_ext in '' $ac_executable_extensions; do
65059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65060    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65062    break 2
65063  fi
65064done
65065  done
65066IFS=$as_save_IFS
65067
65068  ;;
65069esac
65070fi
65071ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65072if test -n "$ICECC_WRAPPER"; then
65073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65074$as_echo "$ICECC_WRAPPER" >&6; }
65075else
65076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65077$as_echo "no" >&6; }
65078fi
65079
65080
65081  test -n "$ICECC_WRAPPER" && break
65082done
65083
65084    else
65085      # If it succeeded, then it was overridden by the user. We will use it
65086      # for the tool.
65087
65088      # First remove it from the list of overridden variables, so we can test
65089      # for unknown variables in the end.
65090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65091
65092      # Check if we try to supply an empty value
65093      if test "x$ICECC_WRAPPER" = x; then
65094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65095$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65097$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65099$as_echo "disabled" >&6; }
65100      else
65101        # Check if the provided tool contains a complete path.
65102        tool_specified="$ICECC_WRAPPER"
65103        tool_basename="${tool_specified##*/}"
65104        if test "x$tool_basename" = "x$tool_specified"; then
65105          # A command without a complete path is provided, search $PATH.
65106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65107$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65108          # Extract the first word of "$tool_basename", so it can be a program name with args.
65109set dummy $tool_basename; ac_word=$2
65110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65111$as_echo_n "checking for $ac_word... " >&6; }
65112if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65113  $as_echo_n "(cached) " >&6
65114else
65115  case $ICECC_WRAPPER in
65116  [\\/]* | ?:[\\/]*)
65117  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65118  ;;
65119  *)
65120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65121for as_dir in $PATH
65122do
65123  IFS=$as_save_IFS
65124  test -z "$as_dir" && as_dir=.
65125    for ac_exec_ext in '' $ac_executable_extensions; do
65126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65127    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65129    break 2
65130  fi
65131done
65132  done
65133IFS=$as_save_IFS
65134
65135  ;;
65136esac
65137fi
65138ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65139if test -n "$ICECC_WRAPPER"; then
65140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65141$as_echo "$ICECC_WRAPPER" >&6; }
65142else
65143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65144$as_echo "no" >&6; }
65145fi
65146
65147
65148          if test "x$ICECC_WRAPPER" = x; then
65149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65150          fi
65151        else
65152          # Otherwise we believe it is a complete path. Use it as it is.
65153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65154$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65156$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65157          if test ! -x "$tool_specified"; then
65158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65159$as_echo "not found" >&6; }
65160            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65161          fi
65162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65163$as_echo "$tool_specified" >&6; }
65164        fi
65165      fi
65166    fi
65167
65168  fi
65169
65170
65171
65172  if test "x$ICECC_WRAPPER" = x; then
65173    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65174  fi
65175
65176
65177
65178  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65179      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65180  if test "$?" != "0"; then
65181    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65182$as_echo "$as_me: icecc-create-env output:" >&6;}
65183    cat ${icecc_create_env_log}
65184    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65185  fi
65186
65187    else
65188      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65189    fi
65190    PATH="$old_path"
65191    # The bundle with the compiler gets a name based on checksums. Parse log file
65192    # to find it.
65193    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65194    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65195    if test ! -f ${ICECC_ENV_BUNDLE}; then
65196      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65197    fi
65198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65199$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65201$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65202    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65203
65204    if test "x${COMPILE_TYPE}" = "xcross"; then
65205      # If cross compiling, create a separate env package for the build compiler
65206      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65207      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65208      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65209
65210  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65211      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65212            ${icecc_create_env_log_build} 2>&1 )
65213  if test "$?" != "0"; then
65214    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65215$as_echo "$as_me: icecc-create-env output:" >&6;}
65216    cat \
65217            ${icecc_create_env_log_build}
65218    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65219  fi
65220
65221      elif test "x${BUILD_CC##*/}" = "xclang"; then
65222
65223  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65224      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65225  if test "$?" != "0"; then
65226    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65227$as_echo "$as_me: icecc-create-env output:" >&6;}
65228    cat ${icecc_create_env_log_build}
65229    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65230  fi
65231
65232      else
65233        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65234      fi
65235      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65236      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65237      if test ! -f ${ICECC_ENV_BUNDLE}; then
65238        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65239      fi
65240      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65241$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65242      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65243$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65244      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65245          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65246    else
65247      BUILD_ICECC="${ICECC}"
65248    fi
65249
65250
65251  fi
65252
65253
65254# Can the C/C++ compiler use precompiled headers?
65255
65256
65257  ###############################################################################
65258  #
65259  # Can the C/C++ compiler use precompiled headers?
65260  #
65261  # Check whether --enable-precompiled-headers was given.
65262if test "${enable_precompiled_headers+set}" = set; then :
65263  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65264else
65265  ENABLE_PRECOMPH=yes
65266fi
65267
65268
65269  USE_PRECOMPILED_HEADER=1
65270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65271$as_echo_n "checking If precompiled header is enabled... " >&6; }
65272  if test "x$ENABLE_PRECOMPH" = xno; then
65273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65274$as_echo "no, forced" >&6; }
65275    USE_PRECOMPILED_HEADER=0
65276  elif test "x$ICECC" != "x"; then
65277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65278$as_echo "no, does not work effectively with icecc" >&6; }
65279    USE_PRECOMPILED_HEADER=0
65280  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65282$as_echo "no, does not work with Solaris Studio" >&6; }
65283    USE_PRECOMPILED_HEADER=0
65284  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65286$as_echo "no, does not work with xlc" >&6; }
65287    USE_PRECOMPILED_HEADER=0
65288  else
65289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65290$as_echo "yes" >&6; }
65291  fi
65292
65293  if test "x$ENABLE_PRECOMPH" = xyes; then
65294    # Check that the compiler actually supports precomp headers.
65295    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65296      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65297$as_echo_n "checking that precompiled headers work... " >&6; }
65298      echo "int alfa();" > conftest.h
65299      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65300      if test ! -f conftest.hpp.gch; then
65301        USE_PRECOMPILED_HEADER=0
65302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65303$as_echo "no" >&6; }
65304      else
65305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65306$as_echo "yes" >&6; }
65307      fi
65308      $RM conftest.h conftest.hpp.gch
65309    fi
65310  fi
65311
65312
65313
65314
65315# Setup use of ccache, if available
65316
65317  # Check whether --enable-ccache was given.
65318if test "${enable_ccache+set}" = set; then :
65319  enableval=$enable_ccache;
65320fi
65321
65322
65323  CCACHE=
65324  CCACHE_STATUS=
65325  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65326$as_echo_n "checking is ccache enabled... " >&6; }
65327  if test "x$enable_ccache" = xyes; then
65328    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65330$as_echo "yes" >&6; }
65331      OLD_PATH="$PATH"
65332      if test "x$TOOLCHAIN_PATH" != x; then
65333        PATH=$TOOLCHAIN_PATH:$PATH
65334      fi
65335
65336
65337
65338  # Publish this variable in the help.
65339
65340
65341  if [ -z "${CCACHE+x}" ]; then
65342    # The variable is not set by user, try to locate tool using the code snippet
65343    for ac_prog in ccache
65344do
65345  # Extract the first word of "$ac_prog", so it can be a program name with args.
65346set dummy $ac_prog; ac_word=$2
65347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65348$as_echo_n "checking for $ac_word... " >&6; }
65349if ${ac_cv_path_CCACHE+:} false; then :
65350  $as_echo_n "(cached) " >&6
65351else
65352  case $CCACHE in
65353  [\\/]* | ?:[\\/]*)
65354  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65355  ;;
65356  *)
65357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65358for as_dir in $PATH
65359do
65360  IFS=$as_save_IFS
65361  test -z "$as_dir" && as_dir=.
65362    for ac_exec_ext in '' $ac_executable_extensions; do
65363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65364    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65366    break 2
65367  fi
65368done
65369  done
65370IFS=$as_save_IFS
65371
65372  ;;
65373esac
65374fi
65375CCACHE=$ac_cv_path_CCACHE
65376if test -n "$CCACHE"; then
65377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65378$as_echo "$CCACHE" >&6; }
65379else
65380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65381$as_echo "no" >&6; }
65382fi
65383
65384
65385  test -n "$CCACHE" && break
65386done
65387
65388  else
65389    # The variable is set, but is it from the command line or the environment?
65390
65391    # Try to remove the string !CCACHE! from our list.
65392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65394      # If it failed, the variable was not from the command line. Ignore it,
65395      # but warn the user (except for BASH, which is always set by the calling BASH).
65396      if test "xCCACHE" != xBASH; then
65397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65398$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65399      fi
65400      # Try to locate tool using the code snippet
65401      for ac_prog in ccache
65402do
65403  # Extract the first word of "$ac_prog", so it can be a program name with args.
65404set dummy $ac_prog; ac_word=$2
65405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65406$as_echo_n "checking for $ac_word... " >&6; }
65407if ${ac_cv_path_CCACHE+:} false; then :
65408  $as_echo_n "(cached) " >&6
65409else
65410  case $CCACHE in
65411  [\\/]* | ?:[\\/]*)
65412  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65413  ;;
65414  *)
65415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65416for as_dir in $PATH
65417do
65418  IFS=$as_save_IFS
65419  test -z "$as_dir" && as_dir=.
65420    for ac_exec_ext in '' $ac_executable_extensions; do
65421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65422    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65424    break 2
65425  fi
65426done
65427  done
65428IFS=$as_save_IFS
65429
65430  ;;
65431esac
65432fi
65433CCACHE=$ac_cv_path_CCACHE
65434if test -n "$CCACHE"; then
65435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65436$as_echo "$CCACHE" >&6; }
65437else
65438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65439$as_echo "no" >&6; }
65440fi
65441
65442
65443  test -n "$CCACHE" && break
65444done
65445
65446    else
65447      # If it succeeded, then it was overridden by the user. We will use it
65448      # for the tool.
65449
65450      # First remove it from the list of overridden variables, so we can test
65451      # for unknown variables in the end.
65452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65453
65454      # Check if we try to supply an empty value
65455      if test "x$CCACHE" = x; then
65456        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65457$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65459$as_echo_n "checking for CCACHE... " >&6; }
65460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65461$as_echo "disabled" >&6; }
65462      else
65463        # Check if the provided tool contains a complete path.
65464        tool_specified="$CCACHE"
65465        tool_basename="${tool_specified##*/}"
65466        if test "x$tool_basename" = "x$tool_specified"; then
65467          # A command without a complete path is provided, search $PATH.
65468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65469$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65470          # Extract the first word of "$tool_basename", so it can be a program name with args.
65471set dummy $tool_basename; ac_word=$2
65472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65473$as_echo_n "checking for $ac_word... " >&6; }
65474if ${ac_cv_path_CCACHE+:} false; then :
65475  $as_echo_n "(cached) " >&6
65476else
65477  case $CCACHE in
65478  [\\/]* | ?:[\\/]*)
65479  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65480  ;;
65481  *)
65482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65483for as_dir in $PATH
65484do
65485  IFS=$as_save_IFS
65486  test -z "$as_dir" && as_dir=.
65487    for ac_exec_ext in '' $ac_executable_extensions; do
65488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65489    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65491    break 2
65492  fi
65493done
65494  done
65495IFS=$as_save_IFS
65496
65497  ;;
65498esac
65499fi
65500CCACHE=$ac_cv_path_CCACHE
65501if test -n "$CCACHE"; then
65502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65503$as_echo "$CCACHE" >&6; }
65504else
65505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65506$as_echo "no" >&6; }
65507fi
65508
65509
65510          if test "x$CCACHE" = x; then
65511            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65512          fi
65513        else
65514          # Otherwise we believe it is a complete path. Use it as it is.
65515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65516$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65517          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65518$as_echo_n "checking for CCACHE... " >&6; }
65519          if test ! -x "$tool_specified"; then
65520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65521$as_echo "not found" >&6; }
65522            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65523          fi
65524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65525$as_echo "$tool_specified" >&6; }
65526        fi
65527      fi
65528    fi
65529
65530  fi
65531
65532
65533
65534  if test "x$CCACHE" = x; then
65535    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65536  fi
65537
65538
65539      PATH="$OLD_PATH"
65540      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65541      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65542    else
65543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65544$as_echo "no" >&6; }
65545      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65546$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65547    fi
65548  elif test "x$enable_ccache" = xno; then
65549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65550$as_echo "no, explicitly disabled" >&6; }
65551    CCACHE_STATUS="Disabled"
65552  elif test "x$enable_ccache" = x; then
65553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65554$as_echo "no" >&6; }
65555  else
65556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65557$as_echo "unknown" >&6; }
65558    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65559  fi
65560
65561
65562
65563# Check whether --with-ccache-dir was given.
65564if test "${with_ccache_dir+set}" = set; then :
65565  withval=$with_ccache_dir;
65566fi
65567
65568
65569  if test "x$with_ccache_dir" != x; then
65570    # When using a non home ccache directory, assume the use is to share ccache files
65571    # with other users. Thus change the umask.
65572    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65573    if test "x$CCACHE" = x; then
65574      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65575$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65576    fi
65577  fi
65578
65579  if test "x$CCACHE" != x; then
65580
65581  if test "x$CCACHE" != x; then
65582    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65583      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65584          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65585      if test "x$HAS_BAD_CCACHE" != "x"; then
65586        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65587      fi
65588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65589$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65590      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65591      PUSHED_FLAGS="$CXXFLAGS"
65592      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65593      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65594/* end confdefs.h.  */
65595
65596int
65597main ()
65598{
65599
65600  ;
65601  return 0;
65602}
65603_ACEOF
65604if ac_fn_cxx_try_compile "$LINENO"; then :
65605  CC_KNOWS_CCACHE_TRICK=yes
65606else
65607  CC_KNOWS_CCACHE_TRICK=no
65608fi
65609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65610      CXXFLAGS="$PUSHED_FLAGS"
65611      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65613$as_echo "yes" >&6; }
65614        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65615
65616        CCACHE_SLOPPINESS=pch_defines,time_macros
65617      else
65618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65619$as_echo "no" >&6; }
65620        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65621      fi
65622    fi
65623
65624    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65625        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65626
65627    if test "x$SET_CCACHE_DIR" != x; then
65628      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65629      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65630    fi
65631  fi
65632
65633  fi
65634
65635
65636###############################################################################
65637#
65638# And now the finish...
65639#
65640###############################################################################
65641
65642# Check for some common pitfalls
65643
65644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65645    file_to_test="$SRC_ROOT/LICENSE"
65646    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65647      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
65648    fi
65649  fi
65650
65651
65652  # Did user specify any unknown variables?
65653
65654  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65655    # Replace the separating ! with spaces before presenting for end user.
65656    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65658$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65659  fi
65660
65661
65662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65663$as_echo_n "checking if build directory is on local disk... " >&6; }
65664
65665  # df -l lists only local disks; if the given directory is not found then
65666  # a non-zero exit code is given
65667  if test "x$DF" = x; then
65668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65669      # msys does not have df; use Windows "net use" instead.
65670      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65671      if test "x$IS_NETWORK_DISK" = x; then
65672        OUTPUT_DIR_IS_LOCAL="yes"
65673      else
65674        OUTPUT_DIR_IS_LOCAL="no"
65675      fi
65676    else
65677      # No df here, say it's local
65678      OUTPUT_DIR_IS_LOCAL="yes"
65679    fi
65680  else
65681    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65682      OUTPUT_DIR_IS_LOCAL="yes"
65683    else
65684      OUTPUT_DIR_IS_LOCAL="no"
65685    fi
65686  fi
65687
65688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65689$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65690
65691
65692
65693  # Check if the user has any old-style ALT_ variables set.
65694  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65695
65696  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65697  # Since we can't properly handle the dependencies for this, warn the user about the situation
65698  if test -e $OUTPUT_ROOT/spec.gmk; then
65699    IS_RECONFIGURE=yes
65700  else
65701    IS_RECONFIGURE=no
65702  fi
65703
65704
65705# At the end, call the custom hook. (Dummy macro if no custom sources available)
65706
65707
65708# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65709
65710  # Keep feature lists sorted and free of duplicates
65711  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65712  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65713  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65714  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65715  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65716  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65717  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65718
65719  # Validate features
65720  for variant in $JVM_VARIANTS; do
65721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65722$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65723    features_var_name=JVM_FEATURES_$variant
65724    JVM_FEATURES_TO_TEST=${!features_var_name}
65725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65726$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65727    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65728    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65729    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65730    if test "x$INVALID_FEATURES" != x; then
65731      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65732    fi
65733  done
65734
65735
65736# We're messing a bit with internal autoconf variables to put the config.status
65737# in the output directory instead of the current directory.
65738CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65739
65740# Create the actual output files. Now the main work of configure is done.
65741cat >confcache <<\_ACEOF
65742# This file is a shell script that caches the results of configure
65743# tests run on this system so they can be shared between configure
65744# scripts and configure runs, see configure's option --config-cache.
65745# It is not useful on other systems.  If it contains results you don't
65746# want to keep, you may remove or edit it.
65747#
65748# config.status only pays attention to the cache file if you give it
65749# the --recheck option to rerun configure.
65750#
65751# `ac_cv_env_foo' variables (set or unset) will be overridden when
65752# loading this file, other *unset* `ac_cv_foo' will be assigned the
65753# following values.
65754
65755_ACEOF
65756
65757# The following way of writing the cache mishandles newlines in values,
65758# but we know of no workaround that is simple, portable, and efficient.
65759# So, we kill variables containing newlines.
65760# Ultrix sh set writes to stderr and can't be redirected directly,
65761# and sets the high bit in the cache file unless we assign to the vars.
65762(
65763  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65764    eval ac_val=\$$ac_var
65765    case $ac_val in #(
65766    *${as_nl}*)
65767      case $ac_var in #(
65768      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65769$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65770      esac
65771      case $ac_var in #(
65772      _ | IFS | as_nl) ;; #(
65773      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65774      *) { eval $ac_var=; unset $ac_var;} ;;
65775      esac ;;
65776    esac
65777  done
65778
65779  (set) 2>&1 |
65780    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65781    *${as_nl}ac_space=\ *)
65782      # `set' does not quote correctly, so add quotes: double-quote
65783      # substitution turns \\\\ into \\, and sed turns \\ into \.
65784      sed -n \
65785	"s/'/'\\\\''/g;
65786	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65787      ;; #(
65788    *)
65789      # `set' quotes correctly as required by POSIX, so do not add quotes.
65790      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65791      ;;
65792    esac |
65793    sort
65794) |
65795  sed '
65796     /^ac_cv_env_/b end
65797     t clear
65798     :clear
65799     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65800     t end
65801     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65802     :end' >>confcache
65803if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65804  if test -w "$cache_file"; then
65805    if test "x$cache_file" != "x/dev/null"; then
65806      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65807$as_echo "$as_me: updating cache $cache_file" >&6;}
65808      if test ! -f "$cache_file" || test -h "$cache_file"; then
65809	cat confcache >"$cache_file"
65810      else
65811        case $cache_file in #(
65812        */* | ?:*)
65813	  mv -f confcache "$cache_file"$$ &&
65814	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65815        *)
65816	  mv -f confcache "$cache_file" ;;
65817	esac
65818      fi
65819    fi
65820  else
65821    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65822$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65823  fi
65824fi
65825rm -f confcache
65826
65827test "x$prefix" = xNONE && prefix=$ac_default_prefix
65828# Let make expand exec_prefix.
65829test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65830
65831# Transform confdefs.h into DEFS.
65832# Protect against shell expansion while executing Makefile rules.
65833# Protect against Makefile macro expansion.
65834#
65835# If the first sed substitution is executed (which looks for macros that
65836# take arguments), then branch to the quote section.  Otherwise,
65837# look for a macro that doesn't take arguments.
65838ac_script='
65839:mline
65840/\\$/{
65841 N
65842 s,\\\n,,
65843 b mline
65844}
65845t clear
65846:clear
65847s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65848t quote
65849s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65850t quote
65851b any
65852:quote
65853s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65854s/\[/\\&/g
65855s/\]/\\&/g
65856s/\$/$$/g
65857H
65858:any
65859${
65860	g
65861	s/^\n//
65862	s/\n/ /g
65863	p
65864}
65865'
65866DEFS=`sed -n "$ac_script" confdefs.h`
65867
65868
65869ac_libobjs=
65870ac_ltlibobjs=
65871U=
65872for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65873  # 1. Remove the extension, and $U if already installed.
65874  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65875  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65876  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65877  #    will be set to the directory where LIBOBJS objects are built.
65878  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65879  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65880done
65881LIBOBJS=$ac_libobjs
65882
65883LTLIBOBJS=$ac_ltlibobjs
65884
65885
65886
65887: "${CONFIG_STATUS=./config.status}"
65888ac_write_fail=0
65889ac_clean_files_save=$ac_clean_files
65890ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65891{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65892$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65893as_write_fail=0
65894cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65895#! $SHELL
65896# Generated by $as_me.
65897# Run this file to recreate the current configuration.
65898# Compiler output produced by configure, useful for debugging
65899# configure, is in config.log if it exists.
65900
65901debug=false
65902ac_cs_recheck=false
65903ac_cs_silent=false
65904
65905SHELL=\${CONFIG_SHELL-$SHELL}
65906export SHELL
65907_ASEOF
65908cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65909## -------------------- ##
65910## M4sh Initialization. ##
65911## -------------------- ##
65912
65913# Be more Bourne compatible
65914DUALCASE=1; export DUALCASE # for MKS sh
65915if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65916  emulate sh
65917  NULLCMD=:
65918  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65919  # is contrary to our usage.  Disable this feature.
65920  alias -g '${1+"$@"}'='"$@"'
65921  setopt NO_GLOB_SUBST
65922else
65923  case `(set -o) 2>/dev/null` in #(
65924  *posix*) :
65925    set -o posix ;; #(
65926  *) :
65927     ;;
65928esac
65929fi
65930
65931
65932as_nl='
65933'
65934export as_nl
65935# Printing a long string crashes Solaris 7 /usr/bin/printf.
65936as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65937as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65938as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65939# Prefer a ksh shell builtin over an external printf program on Solaris,
65940# but without wasting forks for bash or zsh.
65941if test -z "$BASH_VERSION$ZSH_VERSION" \
65942    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65943  as_echo='print -r --'
65944  as_echo_n='print -rn --'
65945elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65946  as_echo='printf %s\n'
65947  as_echo_n='printf %s'
65948else
65949  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65950    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65951    as_echo_n='/usr/ucb/echo -n'
65952  else
65953    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65954    as_echo_n_body='eval
65955      arg=$1;
65956      case $arg in #(
65957      *"$as_nl"*)
65958	expr "X$arg" : "X\\(.*\\)$as_nl";
65959	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65960      esac;
65961      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65962    '
65963    export as_echo_n_body
65964    as_echo_n='sh -c $as_echo_n_body as_echo'
65965  fi
65966  export as_echo_body
65967  as_echo='sh -c $as_echo_body as_echo'
65968fi
65969
65970# The user is always right.
65971if test "${PATH_SEPARATOR+set}" != set; then
65972  PATH_SEPARATOR=:
65973  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65974    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65975      PATH_SEPARATOR=';'
65976  }
65977fi
65978
65979
65980# IFS
65981# We need space, tab and new line, in precisely that order.  Quoting is
65982# there to prevent editors from complaining about space-tab.
65983# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65984# splitting by setting IFS to empty value.)
65985IFS=" ""	$as_nl"
65986
65987# Find who we are.  Look in the path if we contain no directory separator.
65988as_myself=
65989case $0 in #((
65990  *[\\/]* ) as_myself=$0 ;;
65991  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65992for as_dir in $PATH
65993do
65994  IFS=$as_save_IFS
65995  test -z "$as_dir" && as_dir=.
65996    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65997  done
65998IFS=$as_save_IFS
65999
66000     ;;
66001esac
66002# We did not find ourselves, most probably we were run as `sh COMMAND'
66003# in which case we are not to be found in the path.
66004if test "x$as_myself" = x; then
66005  as_myself=$0
66006fi
66007if test ! -f "$as_myself"; then
66008  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66009  exit 1
66010fi
66011
66012# Unset variables that we do not need and which cause bugs (e.g. in
66013# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66014# suppresses any "Segmentation fault" message there.  '((' could
66015# trigger a bug in pdksh 5.2.14.
66016for as_var in BASH_ENV ENV MAIL MAILPATH
66017do eval test x\${$as_var+set} = xset \
66018  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66019done
66020PS1='$ '
66021PS2='> '
66022PS4='+ '
66023
66024# NLS nuisances.
66025LC_ALL=C
66026export LC_ALL
66027LANGUAGE=C
66028export LANGUAGE
66029
66030# CDPATH.
66031(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66032
66033
66034# as_fn_error STATUS ERROR [LINENO LOG_FD]
66035# ----------------------------------------
66036# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66037# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66038# script with STATUS, using 1 if that was 0.
66039as_fn_error ()
66040{
66041  as_status=$1; test $as_status -eq 0 && as_status=1
66042  if test "$4"; then
66043    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66044    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66045  fi
66046  $as_echo "$as_me: error: $2" >&2
66047  as_fn_exit $as_status
66048} # as_fn_error
66049
66050
66051# as_fn_set_status STATUS
66052# -----------------------
66053# Set $? to STATUS, without forking.
66054as_fn_set_status ()
66055{
66056  return $1
66057} # as_fn_set_status
66058
66059# as_fn_exit STATUS
66060# -----------------
66061# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66062as_fn_exit ()
66063{
66064  set +e
66065  as_fn_set_status $1
66066  exit $1
66067} # as_fn_exit
66068
66069# as_fn_unset VAR
66070# ---------------
66071# Portably unset VAR.
66072as_fn_unset ()
66073{
66074  { eval $1=; unset $1;}
66075}
66076as_unset=as_fn_unset
66077# as_fn_append VAR VALUE
66078# ----------------------
66079# Append the text in VALUE to the end of the definition contained in VAR. Take
66080# advantage of any shell optimizations that allow amortized linear growth over
66081# repeated appends, instead of the typical quadratic growth present in naive
66082# implementations.
66083if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66084  eval 'as_fn_append ()
66085  {
66086    eval $1+=\$2
66087  }'
66088else
66089  as_fn_append ()
66090  {
66091    eval $1=\$$1\$2
66092  }
66093fi # as_fn_append
66094
66095# as_fn_arith ARG...
66096# ------------------
66097# Perform arithmetic evaluation on the ARGs, and store the result in the
66098# global $as_val. Take advantage of shells that can avoid forks. The arguments
66099# must be portable across $(()) and expr.
66100if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66101  eval 'as_fn_arith ()
66102  {
66103    as_val=$(( $* ))
66104  }'
66105else
66106  as_fn_arith ()
66107  {
66108    as_val=`expr "$@" || test $? -eq 1`
66109  }
66110fi # as_fn_arith
66111
66112
66113if expr a : '\(a\)' >/dev/null 2>&1 &&
66114   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66115  as_expr=expr
66116else
66117  as_expr=false
66118fi
66119
66120if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66121  as_basename=basename
66122else
66123  as_basename=false
66124fi
66125
66126if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66127  as_dirname=dirname
66128else
66129  as_dirname=false
66130fi
66131
66132as_me=`$as_basename -- "$0" ||
66133$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66134	 X"$0" : 'X\(//\)$' \| \
66135	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66136$as_echo X/"$0" |
66137    sed '/^.*\/\([^/][^/]*\)\/*$/{
66138	    s//\1/
66139	    q
66140	  }
66141	  /^X\/\(\/\/\)$/{
66142	    s//\1/
66143	    q
66144	  }
66145	  /^X\/\(\/\).*/{
66146	    s//\1/
66147	    q
66148	  }
66149	  s/.*/./; q'`
66150
66151# Avoid depending upon Character Ranges.
66152as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66153as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66154as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66155as_cr_digits='0123456789'
66156as_cr_alnum=$as_cr_Letters$as_cr_digits
66157
66158ECHO_C= ECHO_N= ECHO_T=
66159case `echo -n x` in #(((((
66160-n*)
66161  case `echo 'xy\c'` in
66162  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66163  xy)  ECHO_C='\c';;
66164  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66165       ECHO_T='	';;
66166  esac;;
66167*)
66168  ECHO_N='-n';;
66169esac
66170
66171rm -f conf$$ conf$$.exe conf$$.file
66172if test -d conf$$.dir; then
66173  rm -f conf$$.dir/conf$$.file
66174else
66175  rm -f conf$$.dir
66176  mkdir conf$$.dir 2>/dev/null
66177fi
66178if (echo >conf$$.file) 2>/dev/null; then
66179  if ln -s conf$$.file conf$$ 2>/dev/null; then
66180    as_ln_s='ln -s'
66181    # ... but there are two gotchas:
66182    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66183    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66184    # In both cases, we have to default to `cp -pR'.
66185    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66186      as_ln_s='cp -pR'
66187  elif ln conf$$.file conf$$ 2>/dev/null; then
66188    as_ln_s=ln
66189  else
66190    as_ln_s='cp -pR'
66191  fi
66192else
66193  as_ln_s='cp -pR'
66194fi
66195rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66196rmdir conf$$.dir 2>/dev/null
66197
66198
66199# as_fn_mkdir_p
66200# -------------
66201# Create "$as_dir" as a directory, including parents if necessary.
66202as_fn_mkdir_p ()
66203{
66204
66205  case $as_dir in #(
66206  -*) as_dir=./$as_dir;;
66207  esac
66208  test -d "$as_dir" || eval $as_mkdir_p || {
66209    as_dirs=
66210    while :; do
66211      case $as_dir in #(
66212      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66213      *) as_qdir=$as_dir;;
66214      esac
66215      as_dirs="'$as_qdir' $as_dirs"
66216      as_dir=`$as_dirname -- "$as_dir" ||
66217$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66218	 X"$as_dir" : 'X\(//\)[^/]' \| \
66219	 X"$as_dir" : 'X\(//\)$' \| \
66220	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66221$as_echo X"$as_dir" |
66222    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66223	    s//\1/
66224	    q
66225	  }
66226	  /^X\(\/\/\)[^/].*/{
66227	    s//\1/
66228	    q
66229	  }
66230	  /^X\(\/\/\)$/{
66231	    s//\1/
66232	    q
66233	  }
66234	  /^X\(\/\).*/{
66235	    s//\1/
66236	    q
66237	  }
66238	  s/.*/./; q'`
66239      test -d "$as_dir" && break
66240    done
66241    test -z "$as_dirs" || eval "mkdir $as_dirs"
66242  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66243
66244
66245} # as_fn_mkdir_p
66246if mkdir -p . 2>/dev/null; then
66247  as_mkdir_p='mkdir -p "$as_dir"'
66248else
66249  test -d ./-p && rmdir ./-p
66250  as_mkdir_p=false
66251fi
66252
66253
66254# as_fn_executable_p FILE
66255# -----------------------
66256# Test if FILE is an executable regular file.
66257as_fn_executable_p ()
66258{
66259  test -f "$1" && test -x "$1"
66260} # as_fn_executable_p
66261as_test_x='test -x'
66262as_executable_p=as_fn_executable_p
66263
66264# Sed expression to map a string onto a valid CPP name.
66265as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66266
66267# Sed expression to map a string onto a valid variable name.
66268as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66269
66270
66271exec 6>&1
66272## ----------------------------------- ##
66273## Main body of $CONFIG_STATUS script. ##
66274## ----------------------------------- ##
66275_ASEOF
66276test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66277
66278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66279# Save the log message, to keep $0 and so on meaningful, and to
66280# report actual input values of CONFIG_FILES etc. instead of their
66281# values after options handling.
66282ac_log="
66283This file was extended by OpenJDK $as_me jdk9, which was
66284generated by GNU Autoconf 2.69.  Invocation command line was
66285
66286  CONFIG_FILES    = $CONFIG_FILES
66287  CONFIG_HEADERS  = $CONFIG_HEADERS
66288  CONFIG_LINKS    = $CONFIG_LINKS
66289  CONFIG_COMMANDS = $CONFIG_COMMANDS
66290  $ $0 $@
66291
66292on `(hostname || uname -n) 2>/dev/null | sed 1q`
66293"
66294
66295_ACEOF
66296
66297case $ac_config_files in *"
66298"*) set x $ac_config_files; shift; ac_config_files=$*;;
66299esac
66300
66301
66302
66303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66304# Files that config.status was made for.
66305config_files="$ac_config_files"
66306
66307_ACEOF
66308
66309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66310ac_cs_usage="\
66311\`$as_me' instantiates files and other configuration actions
66312from templates according to the current configuration.  Unless the files
66313and actions are specified as TAGs, all are instantiated by default.
66314
66315Usage: $0 [OPTION]... [TAG]...
66316
66317  -h, --help       print this help, then exit
66318  -V, --version    print version number and configuration settings, then exit
66319      --config     print configuration, then exit
66320  -q, --quiet, --silent
66321                   do not print progress messages
66322  -d, --debug      don't remove temporary files
66323      --recheck    update $as_me by reconfiguring in the same conditions
66324      --file=FILE[:TEMPLATE]
66325                   instantiate the configuration file FILE
66326
66327Configuration files:
66328$config_files
66329
66330Report bugs to <build-dev@openjdk.java.net>.
66331OpenJDK home page: <http://openjdk.java.net>."
66332
66333_ACEOF
66334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66335ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66336ac_cs_version="\\
66337OpenJDK config.status jdk9
66338configured by $0, generated by GNU Autoconf 2.69,
66339  with options \\"\$ac_cs_config\\"
66340
66341Copyright (C) 2012 Free Software Foundation, Inc.
66342This config.status script is free software; the Free Software Foundation
66343gives unlimited permission to copy, distribute and modify it."
66344
66345ac_pwd='$ac_pwd'
66346srcdir='$srcdir'
66347AWK='$AWK'
66348test -n "\$AWK" || AWK=awk
66349_ACEOF
66350
66351cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66352# The default lists apply if the user does not specify any file.
66353ac_need_defaults=:
66354while test $# != 0
66355do
66356  case $1 in
66357  --*=?*)
66358    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66359    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66360    ac_shift=:
66361    ;;
66362  --*=)
66363    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66364    ac_optarg=
66365    ac_shift=:
66366    ;;
66367  *)
66368    ac_option=$1
66369    ac_optarg=$2
66370    ac_shift=shift
66371    ;;
66372  esac
66373
66374  case $ac_option in
66375  # Handling of the options.
66376  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66377    ac_cs_recheck=: ;;
66378  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66379    $as_echo "$ac_cs_version"; exit ;;
66380  --config | --confi | --conf | --con | --co | --c )
66381    $as_echo "$ac_cs_config"; exit ;;
66382  --debug | --debu | --deb | --de | --d | -d )
66383    debug=: ;;
66384  --file | --fil | --fi | --f )
66385    $ac_shift
66386    case $ac_optarg in
66387    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66388    '') as_fn_error $? "missing file argument" ;;
66389    esac
66390    as_fn_append CONFIG_FILES " '$ac_optarg'"
66391    ac_need_defaults=false;;
66392  --he | --h |  --help | --hel | -h )
66393    $as_echo "$ac_cs_usage"; exit ;;
66394  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66395  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66396    ac_cs_silent=: ;;
66397
66398  # This is an error.
66399  -*) as_fn_error $? "unrecognized option: \`$1'
66400Try \`$0 --help' for more information." ;;
66401
66402  *) as_fn_append ac_config_targets " $1"
66403     ac_need_defaults=false ;;
66404
66405  esac
66406  shift
66407done
66408
66409ac_configure_extra_args=
66410
66411if $ac_cs_silent; then
66412  exec 6>/dev/null
66413  ac_configure_extra_args="$ac_configure_extra_args --silent"
66414fi
66415
66416_ACEOF
66417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66418if \$ac_cs_recheck; then
66419  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66420  shift
66421  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66422  CONFIG_SHELL='$SHELL'
66423  export CONFIG_SHELL
66424  exec "\$@"
66425fi
66426
66427_ACEOF
66428cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66429exec 5>>config.log
66430{
66431  echo
66432  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66433## Running $as_me. ##
66434_ASBOX
66435  $as_echo "$ac_log"
66436} >&5
66437
66438_ACEOF
66439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66440_ACEOF
66441
66442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66443
66444# Handling of arguments.
66445for ac_config_target in $ac_config_targets
66446do
66447  case $ac_config_target in
66448    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66449    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66450    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66451    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66452    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66453
66454  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66455  esac
66456done
66457
66458
66459# If the user did not use the arguments to specify the items to instantiate,
66460# then the envvar interface is used.  Set only those that are not.
66461# We use the long form for the default assignment because of an extremely
66462# bizarre bug on SunOS 4.1.3.
66463if $ac_need_defaults; then
66464  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66465fi
66466
66467# Have a temporary directory for convenience.  Make it in the build tree
66468# simply because there is no reason against having it here, and in addition,
66469# creating and moving files from /tmp can sometimes cause problems.
66470# Hook for its removal unless debugging.
66471# Note that there is a small window in which the directory will not be cleaned:
66472# after its creation but before its name has been assigned to `$tmp'.
66473$debug ||
66474{
66475  tmp= ac_tmp=
66476  trap 'exit_status=$?
66477  : "${ac_tmp:=$tmp}"
66478  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66479' 0
66480  trap 'as_fn_exit 1' 1 2 13 15
66481}
66482# Create a (secure) tmp directory for tmp files.
66483
66484{
66485  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66486  test -d "$tmp"
66487}  ||
66488{
66489  tmp=./conf$$-$RANDOM
66490  (umask 077 && mkdir "$tmp")
66491} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66492ac_tmp=$tmp
66493
66494# Set up the scripts for CONFIG_FILES section.
66495# No need to generate them if there are no CONFIG_FILES.
66496# This happens for instance with `./config.status config.h'.
66497if test -n "$CONFIG_FILES"; then
66498
66499
66500ac_cr=`echo X | tr X '\015'`
66501# On cygwin, bash can eat \r inside `` if the user requested igncr.
66502# But we know of no other shell where ac_cr would be empty at this
66503# point, so we can use a bashism as a fallback.
66504if test "x$ac_cr" = x; then
66505  eval ac_cr=\$\'\\r\'
66506fi
66507ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66508if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66509  ac_cs_awk_cr='\\r'
66510else
66511  ac_cs_awk_cr=$ac_cr
66512fi
66513
66514echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66515_ACEOF
66516
66517
66518{
66519  echo "cat >conf$$subs.awk <<_ACEOF" &&
66520  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66521  echo "_ACEOF"
66522} >conf$$subs.sh ||
66523  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66524ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66525ac_delim='%!_!# '
66526for ac_last_try in false false false false false :; do
66527  . ./conf$$subs.sh ||
66528    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66529
66530  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66531  if test $ac_delim_n = $ac_delim_num; then
66532    break
66533  elif $ac_last_try; then
66534    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66535  else
66536    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66537  fi
66538done
66539rm -f conf$$subs.sh
66540
66541cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66542cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66543_ACEOF
66544sed -n '
66545h
66546s/^/S["/; s/!.*/"]=/
66547p
66548g
66549s/^[^!]*!//
66550:repl
66551t repl
66552s/'"$ac_delim"'$//
66553t delim
66554:nl
66555h
66556s/\(.\{148\}\)..*/\1/
66557t more1
66558s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66559p
66560n
66561b repl
66562:more1
66563s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66564p
66565g
66566s/.\{148\}//
66567t nl
66568:delim
66569h
66570s/\(.\{148\}\)..*/\1/
66571t more2
66572s/["\\]/\\&/g; s/^/"/; s/$/"/
66573p
66574b
66575:more2
66576s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66577p
66578g
66579s/.\{148\}//
66580t delim
66581' <conf$$subs.awk | sed '
66582/^[^""]/{
66583  N
66584  s/\n//
66585}
66586' >>$CONFIG_STATUS || ac_write_fail=1
66587rm -f conf$$subs.awk
66588cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66589_ACAWK
66590cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66591  for (key in S) S_is_set[key] = 1
66592  FS = ""
66593
66594}
66595{
66596  line = $ 0
66597  nfields = split(line, field, "@")
66598  substed = 0
66599  len = length(field[1])
66600  for (i = 2; i < nfields; i++) {
66601    key = field[i]
66602    keylen = length(key)
66603    if (S_is_set[key]) {
66604      value = S[key]
66605      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66606      len += length(value) + length(field[++i])
66607      substed = 1
66608    } else
66609      len += 1 + keylen
66610  }
66611
66612  print line
66613}
66614
66615_ACAWK
66616_ACEOF
66617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66618if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66619  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66620else
66621  cat
66622fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66623  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66624_ACEOF
66625
66626# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66627# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66628# trailing colons and then remove the whole line if VPATH becomes empty
66629# (actually we leave an empty line to preserve line numbers).
66630if test "x$srcdir" = x.; then
66631  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66632h
66633s///
66634s/^/:/
66635s/[	 ]*$/:/
66636s/:\$(srcdir):/:/g
66637s/:\${srcdir}:/:/g
66638s/:@srcdir@:/:/g
66639s/^:*//
66640s/:*$//
66641x
66642s/\(=[	 ]*\).*/\1/
66643G
66644s/\n//
66645s/^[^=]*=[	 ]*$//
66646}'
66647fi
66648
66649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66650fi # test -n "$CONFIG_FILES"
66651
66652
66653eval set X "  :F $CONFIG_FILES      "
66654shift
66655for ac_tag
66656do
66657  case $ac_tag in
66658  :[FHLC]) ac_mode=$ac_tag; continue;;
66659  esac
66660  case $ac_mode$ac_tag in
66661  :[FHL]*:*);;
66662  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66663  :[FH]-) ac_tag=-:-;;
66664  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66665  esac
66666  ac_save_IFS=$IFS
66667  IFS=:
66668  set x $ac_tag
66669  IFS=$ac_save_IFS
66670  shift
66671  ac_file=$1
66672  shift
66673
66674  case $ac_mode in
66675  :L) ac_source=$1;;
66676  :[FH])
66677    ac_file_inputs=
66678    for ac_f
66679    do
66680      case $ac_f in
66681      -) ac_f="$ac_tmp/stdin";;
66682      *) # Look for the file first in the build tree, then in the source tree
66683	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66684	 # because $ac_f cannot contain `:'.
66685	 test -f "$ac_f" ||
66686	   case $ac_f in
66687	   [\\/$]*) false;;
66688	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66689	   esac ||
66690	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66691      esac
66692      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66693      as_fn_append ac_file_inputs " '$ac_f'"
66694    done
66695
66696    # Let's still pretend it is `configure' which instantiates (i.e., don't
66697    # use $as_me), people would be surprised to read:
66698    #    /* config.h.  Generated by config.status.  */
66699    configure_input='Generated from '`
66700	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66701	`' by configure.'
66702    if test x"$ac_file" != x-; then
66703      configure_input="$ac_file.  $configure_input"
66704      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66705$as_echo "$as_me: creating $ac_file" >&6;}
66706    fi
66707    # Neutralize special characters interpreted by sed in replacement strings.
66708    case $configure_input in #(
66709    *\&* | *\|* | *\\* )
66710       ac_sed_conf_input=`$as_echo "$configure_input" |
66711       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66712    *) ac_sed_conf_input=$configure_input;;
66713    esac
66714
66715    case $ac_tag in
66716    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66717      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66718    esac
66719    ;;
66720  esac
66721
66722  ac_dir=`$as_dirname -- "$ac_file" ||
66723$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66724	 X"$ac_file" : 'X\(//\)[^/]' \| \
66725	 X"$ac_file" : 'X\(//\)$' \| \
66726	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66727$as_echo X"$ac_file" |
66728    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66729	    s//\1/
66730	    q
66731	  }
66732	  /^X\(\/\/\)[^/].*/{
66733	    s//\1/
66734	    q
66735	  }
66736	  /^X\(\/\/\)$/{
66737	    s//\1/
66738	    q
66739	  }
66740	  /^X\(\/\).*/{
66741	    s//\1/
66742	    q
66743	  }
66744	  s/.*/./; q'`
66745  as_dir="$ac_dir"; as_fn_mkdir_p
66746  ac_builddir=.
66747
66748case "$ac_dir" in
66749.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66750*)
66751  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66752  # A ".." for each directory in $ac_dir_suffix.
66753  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66754  case $ac_top_builddir_sub in
66755  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66756  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66757  esac ;;
66758esac
66759ac_abs_top_builddir=$ac_pwd
66760ac_abs_builddir=$ac_pwd$ac_dir_suffix
66761# for backward compatibility:
66762ac_top_builddir=$ac_top_build_prefix
66763
66764case $srcdir in
66765  .)  # We are building in place.
66766    ac_srcdir=.
66767    ac_top_srcdir=$ac_top_builddir_sub
66768    ac_abs_top_srcdir=$ac_pwd ;;
66769  [\\/]* | ?:[\\/]* )  # Absolute name.
66770    ac_srcdir=$srcdir$ac_dir_suffix;
66771    ac_top_srcdir=$srcdir
66772    ac_abs_top_srcdir=$srcdir ;;
66773  *) # Relative name.
66774    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66775    ac_top_srcdir=$ac_top_build_prefix$srcdir
66776    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66777esac
66778ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66779
66780
66781  case $ac_mode in
66782  :F)
66783  #
66784  # CONFIG_FILE
66785  #
66786
66787_ACEOF
66788
66789cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66790# If the template does not know about datarootdir, expand it.
66791# FIXME: This hack should be removed a few years after 2.60.
66792ac_datarootdir_hack=; ac_datarootdir_seen=
66793ac_sed_dataroot='
66794/datarootdir/ {
66795  p
66796  q
66797}
66798/@datadir@/p
66799/@docdir@/p
66800/@infodir@/p
66801/@localedir@/p
66802/@mandir@/p'
66803case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66804*datarootdir*) ac_datarootdir_seen=yes;;
66805*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66806  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66807$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66808_ACEOF
66809cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66810  ac_datarootdir_hack='
66811  s&@datadir@&$datadir&g
66812  s&@docdir@&$docdir&g
66813  s&@infodir@&$infodir&g
66814  s&@localedir@&$localedir&g
66815  s&@mandir@&$mandir&g
66816  s&\\\${datarootdir}&$datarootdir&g' ;;
66817esac
66818_ACEOF
66819
66820# Neutralize VPATH when `$srcdir' = `.'.
66821# Shell code in configure.ac might set extrasub.
66822# FIXME: do we really want to maintain this feature?
66823cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66824ac_sed_extra="$ac_vpsub
66825$extrasub
66826_ACEOF
66827cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66828:t
66829/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66830s|@configure_input@|$ac_sed_conf_input|;t t
66831s&@top_builddir@&$ac_top_builddir_sub&;t t
66832s&@top_build_prefix@&$ac_top_build_prefix&;t t
66833s&@srcdir@&$ac_srcdir&;t t
66834s&@abs_srcdir@&$ac_abs_srcdir&;t t
66835s&@top_srcdir@&$ac_top_srcdir&;t t
66836s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66837s&@builddir@&$ac_builddir&;t t
66838s&@abs_builddir@&$ac_abs_builddir&;t t
66839s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66840$ac_datarootdir_hack
66841"
66842eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66843  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66844
66845test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66846  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66847  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66848      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66849  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66850which seems to be undefined.  Please make sure it is defined" >&5
66851$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66852which seems to be undefined.  Please make sure it is defined" >&2;}
66853
66854  rm -f "$ac_tmp/stdin"
66855  case $ac_file in
66856  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66857  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66858  esac \
66859  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66860 ;;
66861
66862
66863
66864  esac
66865
66866done # for ac_tag
66867
66868
66869as_fn_exit 0
66870_ACEOF
66871ac_clean_files=$ac_clean_files_save
66872
66873test $ac_write_fail = 0 ||
66874  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66875
66876
66877# configure is writing to config.log, and then calls config.status.
66878# config.status does its own redirection, appending to config.log.
66879# Unfortunately, on DOS this fails, as config.log is still kept open
66880# by configure, so config.status won't be able to write to it; its
66881# output is simply discarded.  So we exec the FD to /dev/null,
66882# effectively closing config.log, so it can be properly (re)opened and
66883# appended to by config.status.  When coming back to configure, we
66884# need to make the FD available again.
66885if test "$no_create" != yes; then
66886  ac_cs_success=:
66887  ac_config_status_args=
66888  test "$silent" = yes &&
66889    ac_config_status_args="$ac_config_status_args --quiet"
66890  exec 5>/dev/null
66891  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66892  exec 5>>config.log
66893  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66894  # would make configure fail if this is the last instruction.
66895  $ac_cs_success || as_fn_exit 1
66896fi
66897if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66898  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66899$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66900fi
66901
66902
66903# After AC_OUTPUT, we need to do final work
66904
66905
66906  # Try to move config.log (generated by autoconf) to the configure-support directory.
66907  if test -e ./config.log; then
66908    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66909  fi
66910
66911  # Rotate our log file (configure.log)
66912  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66913    $RM -f "$OUTPUT_ROOT/configure.log.old"
66914  fi
66915  if test -e "$OUTPUT_ROOT/configure.log"; then
66916    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66917  fi
66918
66919  # Move configure.log from current directory to the build output root
66920  if test -e ./configure.log; then
66921    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66922  fi
66923
66924  # Make the compare script executable
66925  $CHMOD +x $OUTPUT_ROOT/compare.sh
66926
66927
66928# Finally output some useful information to the user
66929
66930  # Finally output some useful information to the user
66931
66932  printf "\n"
66933  printf "====================================================\n"
66934  if test "x$no_create" != "xyes"; then
66935    if test "x$IS_RECONFIGURE" != "xyes"; then
66936      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66937    else
66938      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66939    fi
66940  else
66941    if test "x$IS_RECONFIGURE" != "xyes"; then
66942      printf "A configuration has been successfully checked but not created\n"
66943    else
66944      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66945    fi
66946  fi
66947  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66948    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66949  else
66950    printf "using default settings.\n"
66951  fi
66952
66953  printf "\n"
66954  printf "Configuration summary:\n"
66955  printf "* Debug level:    $DEBUG_LEVEL\n"
66956  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66957  printf "* JDK variant:    $JDK_VARIANT\n"
66958  printf "* JVM variants:   $JVM_VARIANTS\n"
66959  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66960  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66961
66962  printf "\n"
66963  printf "Tools summary:\n"
66964  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66965    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66966  fi
66967  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66968  if test "x$TOOLCHAIN_VERSION" != "x"; then
66969    print_version=" $TOOLCHAIN_VERSION"
66970  fi
66971  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66972  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66973  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66974
66975  printf "\n"
66976  printf "Build performance summary:\n"
66977  printf "* Cores to use:   $JOBS\n"
66978  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66979  if test "x$CCACHE_STATUS" != "x"; then
66980    printf "* ccache status:  $CCACHE_STATUS\n"
66981  fi
66982  printf "\n"
66983
66984  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66985    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66986    printf "will result in longer build times.\n"
66987    printf "\n"
66988  fi
66989
66990  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66991    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66992    printf "These are not respected, and will be ignored. It is recommended\n"
66993    printf "that you clean your environment. The following variables are set:\n"
66994    printf "$FOUND_ALT_VARIABLES\n"
66995    printf "\n"
66996  fi
66997
66998  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66999    printf "WARNING: Your build output directory is not on a local disk.\n"
67000    printf "This will severely degrade build performance!\n"
67001    printf "It is recommended that you create an output directory on a local disk,\n"
67002    printf "and run the configure script again from that directory.\n"
67003    printf "\n"
67004  fi
67005
67006  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67007    printf "WARNING: The result of this configuration has overridden an older\n"
67008    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67009    printf "proper build. Failure to do so might result in strange build problems.\n"
67010    printf "\n"
67011  fi
67012
67013  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67014    printf "WARNING: The result of this configuration was not saved.\n"
67015    printf "You should run without '--no-create | -n' to create the configuration.\n"
67016    printf "\n"
67017  fi
67018
67019
67020
67021  # Locate config.log.
67022  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67023    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67024  elif test -e "./config.log"; then
67025    CONFIG_LOG_PATH="."
67026  fi
67027
67028  if test -e "$CONFIG_LOG_PATH/config.log"; then
67029    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67030    if test $? -eq 0; then
67031      printf "The following warnings were produced. Repeated here for convenience:\n"
67032      # We must quote sed expression (using []) to stop m4 from eating the [].
67033      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67034      printf "\n"
67035    fi
67036  fi
67037
67038