generated-configure.sh revision 2084:7de7decfd096
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653BUILD_FAILURE_HANDLER
654ENABLE_INTREE_EC
655STLPORT_LIB
656LIBZIP_CAN_USE_MMAP
657LIBDL
658LIBM
659USE_EXTERNAL_LCMS
660LCMS_LIBS
661LCMS_CFLAGS
662USE_EXTERNAL_LIBZ
663USE_EXTERNAL_LIBPNG
664PNG_LIBS
665PNG_CFLAGS
666USE_EXTERNAL_LIBGIF
667USE_EXTERNAL_LIBJPEG
668LLVM_LIBS
669LLVM_LDFLAGS
670LLVM_CFLAGS
671LLVM_CONFIG
672LIBFFI_LIBS
673LIBFFI_CFLAGS
674ALSA_LIBS
675ALSA_CFLAGS
676FREETYPE_BUNDLE_LIB_PATH
677FREETYPE_LIBS
678FREETYPE_CFLAGS
679CUPS_CFLAGS
680X_EXTRA_LIBS
681X_LIBS
682X_PRE_LIBS
683X_CFLAGS
684XMKMF
685MSVCP_DLL
686MSVCR_DLL
687LIBCXX
688STATIC_CXX_SETTING
689FIXPATH_DETACH_FLAG
690FIXPATH
691VALID_JVM_FEATURES
692JVM_FEATURES_custom
693JVM_FEATURES_zeroshark
694JVM_FEATURES_zero
695JVM_FEATURES_minimal
696JVM_FEATURES_core
697JVM_FEATURES_client
698JVM_FEATURES_server
699INCLUDE_DTRACE
700GCOV_ENABLED
701STRIP_POLICY
702DEBUG_BINARIES
703ZIP_EXTERNAL_DEBUG_SYMBOLS
704COPY_DEBUG_SYMBOLS
705COMPILE_WITH_DEBUG_SYMBOLS
706CFLAGS_WARNINGS_ARE_ERRORS
707BUILD_CC_DISABLE_WARNING_PREFIX
708DISABLE_WARNING_PREFIX
709HOTSPOT_SET_WARNINGS_AS_ERRORS
710WARNINGS_AS_ERRORS
711COMPILER_SUPPORTS_TARGET_BITS_FLAG
712ZERO_ARCHFLAG
713LDFLAGS_TESTEXE
714LDFLAGS_TESTLIB
715CXXFLAGS_TESTEXE
716CXXFLAGS_TESTLIB
717CFLAGS_TESTEXE
718CFLAGS_TESTLIB
719OPENJDK_BUILD_JVM_LIBS
720OPENJDK_BUILD_JVM_ASFLAGS
721OPENJDK_BUILD_JVM_LDFLAGS
722OPENJDK_BUILD_JVM_CFLAGS
723OPENJDK_BUILD_LDFLAGS_HASH_STYLE
724OPENJDK_BUILD_LDFLAGS_CXX_JDK
725OPENJDK_BUILD_JDKEXE_LIBS
726OPENJDK_BUILD_JDKLIB_LIBS
727OPENJDK_BUILD_LDFLAGS_JDKEXE
728OPENJDK_BUILD_LDFLAGS_JDKLIB
729OPENJDK_BUILD_CXXFLAGS_JDKEXE
730OPENJDK_BUILD_CXXFLAGS_JDKLIB
731OPENJDK_BUILD_CFLAGS_JDKEXE
732OPENJDK_BUILD_CFLAGS_JDKLIB
733OPENJDK_BUILD_CXXSTD_CXXFLAG
734JVM_LIBS
735JVM_ASFLAGS
736JVM_LDFLAGS
737JVM_CFLAGS
738LDFLAGS_HASH_STYLE
739LDFLAGS_CXX_JDK
740JDKEXE_LIBS
741JDKLIB_LIBS
742LDFLAGS_JDKEXE
743LDFLAGS_JDKLIB
744CXXFLAGS_JDKEXE
745CXXFLAGS_JDKLIB
746CFLAGS_JDKEXE
747CFLAGS_JDKLIB
748MACOSX_VERSION_MIN
749NO_LIFETIME_DSE_CFLAG
750NO_NULL_POINTER_CHECK_CFLAG
751CXXSTD_CXXFLAG
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JT_HOME
790JTREGEXE
791HOTSPOT_TOOLCHAIN_TYPE
792USING_BROKEN_SUSE_LD
793PACKAGE_PATH
794USE_CLANG
795HOTSPOT_LD
796HOTSPOT_CXX
797HOTSPOT_RC
798HOTSPOT_MT
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857LEGACY_EXTRA_LDFLAGS
858LEGACY_EXTRA_CXXFLAGS
859LEGACY_EXTRA_CFLAGS
860EXE_SUFFIX
861OBJ_SUFFIX
862STATIC_LIBRARY
863SHARED_LIBRARY
864STATIC_LIBRARY_SUFFIX
865SHARED_LIBRARY_SUFFIX
866LIBRARY_PREFIX
867TOOLCHAIN_TYPE
868STATIC_BUILD
869IMPORT_MODULES_MAKE
870IMPORT_MODULES_SRC
871IMPORT_MODULES_CONF
872IMPORT_MODULES_LIBS
873IMPORT_MODULES_CMDS
874IMPORT_MODULES_CLASSES
875BUILD_HOTSPOT
876HOTSPOT_DIST
877BUILD_OUTPUT
878JDK_TOPDIR
879NASHORN_TOPDIR
880HOTSPOT_TOPDIR
881JAXWS_TOPDIR
882JAXP_TOPDIR
883CORBA_TOPDIR
884LANGTOOLS_TOPDIR
885EXTERNAL_BUILDJDK
886BUILD_JDK
887CREATE_BUILDJDK
888JLINK
889JMOD
890BOOT_JDK_BITS
891JAVAC_FLAGS
892BOOT_JDK_MODULAR
893BOOT_JDK_SOURCETARGET
894JARSIGNER
895JAR
896JAVAH
897JAVAC
898JAVA
899BOOT_JDK
900JAVA_CHECK
901JAVAC_CHECK
902VERSION_IS_GA
903VERSION_SHORT
904VERSION_STRING
905VERSION_NUMBER_FOUR_POSITIONS
906VERSION_NUMBER
907VERSION_OPT
908VERSION_BUILD
909VERSION_PRE
910VERSION_PATCH
911VERSION_SECURITY
912VERSION_MINOR
913VERSION_MAJOR
914MACOSX_BUNDLE_ID_BASE
915MACOSX_BUNDLE_NAME_BASE
916HOTSPOT_VM_DISTRO
917COMPANY_NAME
918JDK_RC_PLATFORM_NAME
919PRODUCT_SUFFIX
920PRODUCT_NAME
921LAUNCHER_NAME
922JLINK_KEEP_PACKAGED_MODULES
923COPYRIGHT_YEAR
924COMPRESS_JARS
925INCLUDE_SA
926UNLIMITED_CRYPTO
927CACERTS_FILE
928BUILD_HEADLESS
929SUPPORT_HEADFUL
930SUPPORT_HEADLESS
931DEFAULT_MAKE_TARGET
932OS_VERSION_MICRO
933OS_VERSION_MINOR
934OS_VERSION_MAJOR
935PKG_CONFIG
936BASH_ARGS
937SETFILE
938CODESIGN
939XATTR
940DSYMUTIL
941IS_GNU_TIME
942PATCH
943DTRACE
944TIME
945STAT
946HG
947READELF
948OTOOL
949LDD
950ZIP
951UNZIP
952TAR_SUPPORTS_TRANSFORM
953TAR_INCLUDE_PARAM
954FIND_DELETE
955OUTPUT_SYNC
956OUTPUT_SYNC_SUPPORTED
957CHECK_TOOLSDIR_MAKE
958CHECK_TOOLSDIR_GMAKE
959CHECK_MAKE
960CHECK_GMAKE
961MAKE
962PKGHANDLER
963CONFIGURESUPPORT_OUTPUTDIR
964OUTPUT_ROOT
965CONF_NAME
966SPEC
967SDKROOT
968XCODEBUILD
969VALID_JVM_VARIANTS
970JVM_VARIANTS
971DEBUG_LEVEL
972HOTSPOT_DEBUG_LEVEL
973JDK_VARIANT
974SET_OPENJDK
975USERNAME
976CANONICAL_TOPDIR
977ORIGINAL_TOPDIR
978TOPDIR
979PATH_SEP
980ZERO_ARCHDEF
981HOTSPOT_BUILD_CPU_DEFINE
982HOTSPOT_BUILD_CPU_ARCH
983HOTSPOT_BUILD_CPU
984HOTSPOT_BUILD_OS_TYPE
985HOTSPOT_BUILD_OS
986OPENJDK_BUILD_BUNDLE_PLATFORM
987OPENJDK_BUILD_CPU_BUNDLE
988OPENJDK_BUILD_OS_BUNDLE
989OPENJDK_BUILD_OS_EXPORT_DIR
990OPENJDK_BUILD_CPU_JLI_CFLAGS
991OPENJDK_BUILD_CPU_OSARCH
992OPENJDK_BUILD_CPU_ISADIR
993OPENJDK_BUILD_CPU_LIBDIR
994OPENJDK_BUILD_CPU_LEGACY_LIB
995OPENJDK_BUILD_CPU_LEGACY
996HOTSPOT_TARGET_CPU_DEFINE
997HOTSPOT_TARGET_CPU_ARCH
998HOTSPOT_TARGET_CPU
999HOTSPOT_TARGET_OS_TYPE
1000HOTSPOT_TARGET_OS
1001DEFINE_CROSS_COMPILE_ARCH
1002LP64
1003OPENJDK_TARGET_BUNDLE_PLATFORM
1004OPENJDK_TARGET_CPU_BUNDLE
1005OPENJDK_TARGET_OS_BUNDLE
1006OPENJDK_TARGET_OS_EXPORT_DIR
1007OPENJDK_TARGET_CPU_JLI_CFLAGS
1008OPENJDK_TARGET_CPU_OSARCH
1009OPENJDK_TARGET_CPU_ISADIR
1010OPENJDK_TARGET_CPU_LIBDIR
1011OPENJDK_TARGET_CPU_LEGACY_LIB
1012OPENJDK_TARGET_CPU_LEGACY
1013REQUIRED_OS_VERSION
1014REQUIRED_OS_NAME
1015COMPILE_TYPE
1016OPENJDK_TARGET_CPU_ENDIAN
1017OPENJDK_TARGET_CPU_BITS
1018OPENJDK_TARGET_CPU_ARCH
1019OPENJDK_TARGET_CPU
1020OPENJDK_TARGET_OS_ENV
1021OPENJDK_TARGET_OS_TYPE
1022OPENJDK_TARGET_OS
1023OPENJDK_BUILD_CPU_ENDIAN
1024OPENJDK_BUILD_CPU_BITS
1025OPENJDK_BUILD_CPU_ARCH
1026OPENJDK_BUILD_CPU
1027OPENJDK_BUILD_OS_ENV
1028OPENJDK_BUILD_OS_TYPE
1029OPENJDK_BUILD_OS
1030OPENJDK_BUILD_AUTOCONF_NAME
1031OPENJDK_TARGET_AUTOCONF_NAME
1032target_os
1033target_vendor
1034target_cpu
1035target
1036host_os
1037host_vendor
1038host_cpu
1039host
1040build_os
1041build_vendor
1042build_cpu
1043build
1044NICE
1045CPIO
1046DF
1047READLINK
1048CYGPATH
1049SED
1050FGREP
1051EGREP
1052GREP
1053AWK
1054XARGS
1055WHICH
1056WC
1057UNIQ
1058UNAME
1059TR
1060TOUCH
1061TEE
1062TAR
1063TAIL
1064SORT
1065SH
1066RMDIR
1067RM
1068PRINTF
1069NAWK
1070MV
1071MKTEMP
1072MKDIR
1073LS
1074LN
1075GZIP
1076GUNZIP
1077HEAD
1078FIND
1079FILE
1080EXPR
1081ECHO
1082DIRNAME
1083DIFF
1084DATE
1085CUT
1086CP
1087COMM
1088CMP
1089CHMOD
1090CAT
1091BASH
1092BASENAME
1093DATE_WHEN_CONFIGURED
1094ORIGINAL_PATH
1095CONFIGURE_COMMAND_LINE
1096target_alias
1097host_alias
1098build_alias
1099LIBS
1100ECHO_T
1101ECHO_N
1102ECHO_C
1103DEFS
1104mandir
1105localedir
1106libdir
1107psdir
1108pdfdir
1109dvidir
1110htmldir
1111infodir
1112docdir
1113oldincludedir
1114includedir
1115localstatedir
1116sharedstatedir
1117sysconfdir
1118datadir
1119datarootdir
1120libexecdir
1121sbindir
1122bindir
1123program_transform_name
1124prefix
1125exec_prefix
1126PACKAGE_URL
1127PACKAGE_BUGREPORT
1128PACKAGE_STRING
1129PACKAGE_VERSION
1130PACKAGE_TARNAME
1131PACKAGE_NAME
1132PATH_SEPARATOR
1133SHELL'
1134ac_subst_files=''
1135ac_user_opts='
1136enable_option_checking
1137with_target_bits
1138enable_openjdk_only
1139with_custom_make_dir
1140with_jdk_variant
1141enable_debug
1142with_debug_level
1143with_jvm_variants
1144with_devkit
1145with_sys_root
1146with_sysroot
1147with_tools_dir
1148with_toolchain_path
1149with_extra_path
1150with_sdk_name
1151with_conf_name
1152with_output_sync
1153with_default_make_target
1154enable_headful
1155with_cacerts_file
1156enable_unlimited_crypto
1157with_copyright_year
1158enable_keep_packaged_modules
1159with_milestone
1160with_update_version
1161with_user_release_suffix
1162with_build_number
1163with_version_string
1164with_version_pre
1165with_version_opt
1166with_version_build
1167with_version_major
1168with_version_minor
1169with_version_security
1170with_version_patch
1171with_boot_jdk
1172with_build_jdk
1173with_add_source_root
1174with_override_source_root
1175with_adds_and_overrides
1176with_override_langtools
1177with_override_corba
1178with_override_jaxp
1179with_override_jaxws
1180with_override_hotspot
1181with_override_nashorn
1182with_override_jdk
1183with_import_hotspot
1184with_import_modules
1185enable_static_build
1186with_toolchain_type
1187with_extra_cflags
1188with_extra_cxxflags
1189with_extra_ldflags
1190with_toolchain_version
1191with_build_devkit
1192with_jtreg
1193enable_warnings_as_errors
1194with_native_debug_symbols
1195enable_debug_symbols
1196enable_zip_debug_info
1197enable_native_coverage
1198enable_dtrace
1199with_jvm_features
1200with_jvm_interpreter
1201with_stdc__lib
1202with_msvcr_dll
1203with_msvcp_dll
1204with_x
1205with_cups
1206with_cups_include
1207with_freetype
1208with_freetype_include
1209with_freetype_lib
1210with_freetype_src
1211enable_freetype_bundling
1212with_alsa
1213with_alsa_include
1214with_alsa_lib
1215with_libffi
1216with_libffi_include
1217with_libffi_lib
1218with_libjpeg
1219with_giflib
1220with_libpng
1221with_zlib
1222with_lcms
1223with_dxsdk
1224with_dxsdk_lib
1225with_dxsdk_include
1226enable_jtreg_failure_handler
1227with_num_cores
1228with_memory_size
1229with_jobs
1230with_test_jobs
1231with_boot_jdk_jvmargs
1232with_sjavac_server_java
1233enable_sjavac
1234enable_javac_server
1235enable_icecc
1236enable_precompiled_headers
1237enable_ccache
1238with_ccache_dir
1239'
1240      ac_precious_vars='build_alias
1241host_alias
1242target_alias
1243BASENAME
1244BASH
1245CAT
1246CHMOD
1247CMP
1248COMM
1249CP
1250CUT
1251DATE
1252DIFF
1253DIRNAME
1254ECHO
1255EXPR
1256FILE
1257FIND
1258HEAD
1259GUNZIP
1260GZIP
1261LN
1262LS
1263MKDIR
1264MKTEMP
1265MV
1266NAWK
1267PRINTF
1268RM
1269RMDIR
1270SH
1271SORT
1272TAIL
1273TAR
1274TEE
1275TOUCH
1276TR
1277UNAME
1278UNIQ
1279WC
1280WHICH
1281XARGS
1282AWK
1283GREP
1284EGREP
1285FGREP
1286SED
1287CYGPATH
1288READLINK
1289DF
1290CPIO
1291NICE
1292MAKE
1293UNZIP
1294ZIP
1295LDD
1296OTOOL
1297READELF
1298HG
1299STAT
1300TIME
1301DTRACE
1302PATCH
1303DSYMUTIL
1304XATTR
1305CODESIGN
1306SETFILE
1307PKG_CONFIG
1308JAVA
1309JAVAC
1310JAVAH
1311JAR
1312JARSIGNER
1313CC
1314CFLAGS
1315LDFLAGS
1316LIBS
1317CPPFLAGS
1318CXX
1319CXXFLAGS
1320CCC
1321CPP
1322CXXCPP
1323AS
1324AR
1325LIPO
1326STRIP
1327NM
1328GNM
1329OBJCOPY
1330OBJDUMP
1331BUILD_CC
1332BUILD_CXX
1333BUILD_NM
1334BUILD_AR
1335BUILD_OBJCOPY
1336BUILD_STRIP
1337JTREGEXE
1338XMKMF
1339FREETYPE_CFLAGS
1340FREETYPE_LIBS
1341ALSA_CFLAGS
1342ALSA_LIBS
1343LIBFFI_CFLAGS
1344LIBFFI_LIBS
1345PNG_CFLAGS
1346PNG_LIBS
1347LCMS_CFLAGS
1348LCMS_LIBS
1349ICECC_CMD
1350ICECC_CREATE_ENV
1351ICECC_WRAPPER
1352CCACHE'
1353
1354
1355# Initialize some variables set by options.
1356ac_init_help=
1357ac_init_version=false
1358ac_unrecognized_opts=
1359ac_unrecognized_sep=
1360# The variables have the same names as the options, with
1361# dashes changed to underlines.
1362cache_file=/dev/null
1363exec_prefix=NONE
1364no_create=
1365no_recursion=
1366prefix=NONE
1367program_prefix=NONE
1368program_suffix=NONE
1369program_transform_name=s,x,x,
1370silent=
1371site=
1372srcdir=
1373verbose=
1374x_includes=NONE
1375x_libraries=NONE
1376
1377# Installation directory options.
1378# These are left unexpanded so users can "make install exec_prefix=/foo"
1379# and all the variables that are supposed to be based on exec_prefix
1380# by default will actually change.
1381# Use braces instead of parens because sh, perl, etc. also accept them.
1382# (The list follows the same order as the GNU Coding Standards.)
1383bindir='${exec_prefix}/bin'
1384sbindir='${exec_prefix}/sbin'
1385libexecdir='${exec_prefix}/libexec'
1386datarootdir='${prefix}/share'
1387datadir='${datarootdir}'
1388sysconfdir='${prefix}/etc'
1389sharedstatedir='${prefix}/com'
1390localstatedir='${prefix}/var'
1391includedir='${prefix}/include'
1392oldincludedir='/usr/include'
1393docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1394infodir='${datarootdir}/info'
1395htmldir='${docdir}'
1396dvidir='${docdir}'
1397pdfdir='${docdir}'
1398psdir='${docdir}'
1399libdir='${exec_prefix}/lib'
1400localedir='${datarootdir}/locale'
1401mandir='${datarootdir}/man'
1402
1403ac_prev=
1404ac_dashdash=
1405for ac_option
1406do
1407  # If the previous option needs an argument, assign it.
1408  if test -n "$ac_prev"; then
1409    eval $ac_prev=\$ac_option
1410    ac_prev=
1411    continue
1412  fi
1413
1414  case $ac_option in
1415  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1416  *=)   ac_optarg= ;;
1417  *)    ac_optarg=yes ;;
1418  esac
1419
1420  # Accept the important Cygnus configure options, so we can diagnose typos.
1421
1422  case $ac_dashdash$ac_option in
1423  --)
1424    ac_dashdash=yes ;;
1425
1426  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1427    ac_prev=bindir ;;
1428  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1429    bindir=$ac_optarg ;;
1430
1431  -build | --build | --buil | --bui | --bu)
1432    ac_prev=build_alias ;;
1433  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1434    build_alias=$ac_optarg ;;
1435
1436  -cache-file | --cache-file | --cache-fil | --cache-fi \
1437  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1438    ac_prev=cache_file ;;
1439  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1440  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1441    cache_file=$ac_optarg ;;
1442
1443  --config-cache | -C)
1444    cache_file=config.cache ;;
1445
1446  -datadir | --datadir | --datadi | --datad)
1447    ac_prev=datadir ;;
1448  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1449    datadir=$ac_optarg ;;
1450
1451  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1452  | --dataroo | --dataro | --datar)
1453    ac_prev=datarootdir ;;
1454  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1455  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1456    datarootdir=$ac_optarg ;;
1457
1458  -disable-* | --disable-*)
1459    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1460    # Reject names that are not valid shell variable names.
1461    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1462      as_fn_error $? "invalid feature name: $ac_useropt"
1463    ac_useropt_orig=$ac_useropt
1464    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1465    case $ac_user_opts in
1466      *"
1467"enable_$ac_useropt"
1468"*) ;;
1469      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1470	 ac_unrecognized_sep=', ';;
1471    esac
1472    eval enable_$ac_useropt=no ;;
1473
1474  -docdir | --docdir | --docdi | --doc | --do)
1475    ac_prev=docdir ;;
1476  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1477    docdir=$ac_optarg ;;
1478
1479  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1480    ac_prev=dvidir ;;
1481  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1482    dvidir=$ac_optarg ;;
1483
1484  -enable-* | --enable-*)
1485    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1486    # Reject names that are not valid shell variable names.
1487    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1488      as_fn_error $? "invalid feature name: $ac_useropt"
1489    ac_useropt_orig=$ac_useropt
1490    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1491    case $ac_user_opts in
1492      *"
1493"enable_$ac_useropt"
1494"*) ;;
1495      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1496	 ac_unrecognized_sep=', ';;
1497    esac
1498    eval enable_$ac_useropt=\$ac_optarg ;;
1499
1500  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1501  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1502  | --exec | --exe | --ex)
1503    ac_prev=exec_prefix ;;
1504  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1505  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1506  | --exec=* | --exe=* | --ex=*)
1507    exec_prefix=$ac_optarg ;;
1508
1509  -gas | --gas | --ga | --g)
1510    # Obsolete; use --with-gas.
1511    with_gas=yes ;;
1512
1513  -help | --help | --hel | --he | -h)
1514    ac_init_help=long ;;
1515  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1516    ac_init_help=recursive ;;
1517  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1518    ac_init_help=short ;;
1519
1520  -host | --host | --hos | --ho)
1521    ac_prev=host_alias ;;
1522  -host=* | --host=* | --hos=* | --ho=*)
1523    host_alias=$ac_optarg ;;
1524
1525  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1526    ac_prev=htmldir ;;
1527  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1528  | --ht=*)
1529    htmldir=$ac_optarg ;;
1530
1531  -includedir | --includedir | --includedi | --included | --include \
1532  | --includ | --inclu | --incl | --inc)
1533    ac_prev=includedir ;;
1534  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1535  | --includ=* | --inclu=* | --incl=* | --inc=*)
1536    includedir=$ac_optarg ;;
1537
1538  -infodir | --infodir | --infodi | --infod | --info | --inf)
1539    ac_prev=infodir ;;
1540  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1541    infodir=$ac_optarg ;;
1542
1543  -libdir | --libdir | --libdi | --libd)
1544    ac_prev=libdir ;;
1545  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1546    libdir=$ac_optarg ;;
1547
1548  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1549  | --libexe | --libex | --libe)
1550    ac_prev=libexecdir ;;
1551  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1552  | --libexe=* | --libex=* | --libe=*)
1553    libexecdir=$ac_optarg ;;
1554
1555  -localedir | --localedir | --localedi | --localed | --locale)
1556    ac_prev=localedir ;;
1557  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1558    localedir=$ac_optarg ;;
1559
1560  -localstatedir | --localstatedir | --localstatedi | --localstated \
1561  | --localstate | --localstat | --localsta | --localst | --locals)
1562    ac_prev=localstatedir ;;
1563  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1564  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1565    localstatedir=$ac_optarg ;;
1566
1567  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1568    ac_prev=mandir ;;
1569  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1570    mandir=$ac_optarg ;;
1571
1572  -nfp | --nfp | --nf)
1573    # Obsolete; use --without-fp.
1574    with_fp=no ;;
1575
1576  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1577  | --no-cr | --no-c | -n)
1578    no_create=yes ;;
1579
1580  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1581  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1582    no_recursion=yes ;;
1583
1584  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1585  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1586  | --oldin | --oldi | --old | --ol | --o)
1587    ac_prev=oldincludedir ;;
1588  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1589  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1590  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1591    oldincludedir=$ac_optarg ;;
1592
1593  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1594    ac_prev=prefix ;;
1595  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1596    prefix=$ac_optarg ;;
1597
1598  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1599  | --program-pre | --program-pr | --program-p)
1600    ac_prev=program_prefix ;;
1601  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1602  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1603    program_prefix=$ac_optarg ;;
1604
1605  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1606  | --program-suf | --program-su | --program-s)
1607    ac_prev=program_suffix ;;
1608  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1609  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1610    program_suffix=$ac_optarg ;;
1611
1612  -program-transform-name | --program-transform-name \
1613  | --program-transform-nam | --program-transform-na \
1614  | --program-transform-n | --program-transform- \
1615  | --program-transform | --program-transfor \
1616  | --program-transfo | --program-transf \
1617  | --program-trans | --program-tran \
1618  | --progr-tra | --program-tr | --program-t)
1619    ac_prev=program_transform_name ;;
1620  -program-transform-name=* | --program-transform-name=* \
1621  | --program-transform-nam=* | --program-transform-na=* \
1622  | --program-transform-n=* | --program-transform-=* \
1623  | --program-transform=* | --program-transfor=* \
1624  | --program-transfo=* | --program-transf=* \
1625  | --program-trans=* | --program-tran=* \
1626  | --progr-tra=* | --program-tr=* | --program-t=*)
1627    program_transform_name=$ac_optarg ;;
1628
1629  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1630    ac_prev=pdfdir ;;
1631  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1632    pdfdir=$ac_optarg ;;
1633
1634  -psdir | --psdir | --psdi | --psd | --ps)
1635    ac_prev=psdir ;;
1636  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1637    psdir=$ac_optarg ;;
1638
1639  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1640  | -silent | --silent | --silen | --sile | --sil)
1641    silent=yes ;;
1642
1643  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1644    ac_prev=sbindir ;;
1645  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1646  | --sbi=* | --sb=*)
1647    sbindir=$ac_optarg ;;
1648
1649  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1650  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1651  | --sharedst | --shareds | --shared | --share | --shar \
1652  | --sha | --sh)
1653    ac_prev=sharedstatedir ;;
1654  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1655  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1656  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1657  | --sha=* | --sh=*)
1658    sharedstatedir=$ac_optarg ;;
1659
1660  -site | --site | --sit)
1661    ac_prev=site ;;
1662  -site=* | --site=* | --sit=*)
1663    site=$ac_optarg ;;
1664
1665  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1666    ac_prev=srcdir ;;
1667  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1668    srcdir=$ac_optarg ;;
1669
1670  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1671  | --syscon | --sysco | --sysc | --sys | --sy)
1672    ac_prev=sysconfdir ;;
1673  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1674  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1675    sysconfdir=$ac_optarg ;;
1676
1677  -target | --target | --targe | --targ | --tar | --ta | --t)
1678    ac_prev=target_alias ;;
1679  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1680    target_alias=$ac_optarg ;;
1681
1682  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1683    verbose=yes ;;
1684
1685  -version | --version | --versio | --versi | --vers | -V)
1686    ac_init_version=: ;;
1687
1688  -with-* | --with-*)
1689    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1690    # Reject names that are not valid shell variable names.
1691    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1692      as_fn_error $? "invalid package name: $ac_useropt"
1693    ac_useropt_orig=$ac_useropt
1694    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1695    case $ac_user_opts in
1696      *"
1697"with_$ac_useropt"
1698"*) ;;
1699      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1700	 ac_unrecognized_sep=', ';;
1701    esac
1702    eval with_$ac_useropt=\$ac_optarg ;;
1703
1704  -without-* | --without-*)
1705    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1706    # Reject names that are not valid shell variable names.
1707    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1708      as_fn_error $? "invalid package name: $ac_useropt"
1709    ac_useropt_orig=$ac_useropt
1710    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1711    case $ac_user_opts in
1712      *"
1713"with_$ac_useropt"
1714"*) ;;
1715      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1716	 ac_unrecognized_sep=', ';;
1717    esac
1718    eval with_$ac_useropt=no ;;
1719
1720  --x)
1721    # Obsolete; use --with-x.
1722    with_x=yes ;;
1723
1724  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1725  | --x-incl | --x-inc | --x-in | --x-i)
1726    ac_prev=x_includes ;;
1727  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1728  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1729    x_includes=$ac_optarg ;;
1730
1731  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1732  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1733    ac_prev=x_libraries ;;
1734  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1735  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1736    x_libraries=$ac_optarg ;;
1737
1738  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1739Try \`$0 --help' for more information"
1740    ;;
1741
1742  *=*)
1743    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1744    # Reject names that are not valid shell variable names.
1745    case $ac_envvar in #(
1746      '' | [0-9]* | *[!_$as_cr_alnum]* )
1747      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1748    esac
1749    eval $ac_envvar=\$ac_optarg
1750    export $ac_envvar ;;
1751
1752  *)
1753    # FIXME: should be removed in autoconf 3.0.
1754    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1755    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1756      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1757    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1758    ;;
1759
1760  esac
1761done
1762
1763if test -n "$ac_prev"; then
1764  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1765  as_fn_error $? "missing argument to $ac_option"
1766fi
1767
1768if test -n "$ac_unrecognized_opts"; then
1769  case $enable_option_checking in
1770    no) ;;
1771    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1772    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1773  esac
1774fi
1775
1776# Check all directory arguments for consistency.
1777for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1778		datadir sysconfdir sharedstatedir localstatedir includedir \
1779		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1780		libdir localedir mandir
1781do
1782  eval ac_val=\$$ac_var
1783  # Remove trailing slashes.
1784  case $ac_val in
1785    */ )
1786      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1787      eval $ac_var=\$ac_val;;
1788  esac
1789  # Be sure to have absolute directory names.
1790  case $ac_val in
1791    [\\/$]* | ?:[\\/]* )  continue;;
1792    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1793  esac
1794  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1795done
1796
1797# There might be people who depend on the old broken behavior: `$host'
1798# used to hold the argument of --host etc.
1799# FIXME: To remove some day.
1800build=$build_alias
1801host=$host_alias
1802target=$target_alias
1803
1804# FIXME: To remove some day.
1805if test "x$host_alias" != x; then
1806  if test "x$build_alias" = x; then
1807    cross_compiling=maybe
1808  elif test "x$build_alias" != "x$host_alias"; then
1809    cross_compiling=yes
1810  fi
1811fi
1812
1813ac_tool_prefix=
1814test -n "$host_alias" && ac_tool_prefix=$host_alias-
1815
1816test "$silent" = yes && exec 6>/dev/null
1817
1818
1819ac_pwd=`pwd` && test -n "$ac_pwd" &&
1820ac_ls_di=`ls -di .` &&
1821ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1822  as_fn_error $? "working directory cannot be determined"
1823test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1824  as_fn_error $? "pwd does not report name of working directory"
1825
1826
1827# Find the source files, if location was not specified.
1828if test -z "$srcdir"; then
1829  ac_srcdir_defaulted=yes
1830  # Try the directory containing this script, then the parent directory.
1831  ac_confdir=`$as_dirname -- "$as_myself" ||
1832$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1833	 X"$as_myself" : 'X\(//\)[^/]' \| \
1834	 X"$as_myself" : 'X\(//\)$' \| \
1835	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1836$as_echo X"$as_myself" |
1837    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1838	    s//\1/
1839	    q
1840	  }
1841	  /^X\(\/\/\)[^/].*/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)$/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\).*/{
1850	    s//\1/
1851	    q
1852	  }
1853	  s/.*/./; q'`
1854  srcdir=$ac_confdir
1855  if test ! -r "$srcdir/$ac_unique_file"; then
1856    srcdir=..
1857  fi
1858else
1859  ac_srcdir_defaulted=no
1860fi
1861if test ! -r "$srcdir/$ac_unique_file"; then
1862  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1863  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1864fi
1865ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1866ac_abs_confdir=`(
1867	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1868	pwd)`
1869# When building in place, set srcdir=.
1870if test "$ac_abs_confdir" = "$ac_pwd"; then
1871  srcdir=.
1872fi
1873# Remove unnecessary trailing slashes from srcdir.
1874# Double slashes in file names in object file debugging info
1875# mess up M-x gdb in Emacs.
1876case $srcdir in
1877*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1878esac
1879for ac_var in $ac_precious_vars; do
1880  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1881  eval ac_env_${ac_var}_value=\$${ac_var}
1882  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1883  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1884done
1885
1886#
1887# Report the --help message.
1888#
1889if test "$ac_init_help" = "long"; then
1890  # Omit some internal or obsolete options to make the list less imposing.
1891  # This message is too long to be a string in the A/UX 3.1 sh.
1892  cat <<_ACEOF
1893\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1894
1895Usage: $0 [OPTION]... [VAR=VALUE]...
1896
1897To assign environment variables (e.g., CC, CFLAGS...), specify them as
1898VAR=VALUE.  See below for descriptions of some of the useful variables.
1899
1900Defaults for the options are specified in brackets.
1901
1902Configuration:
1903  -h, --help              display this help and exit
1904      --help=short        display options specific to this package
1905      --help=recursive    display the short help of all the included packages
1906  -V, --version           display version information and exit
1907  -q, --quiet, --silent   do not print \`checking ...' messages
1908      --cache-file=FILE   cache test results in FILE [disabled]
1909  -C, --config-cache      alias for \`--cache-file=config.cache'
1910  -n, --no-create         do not create output files
1911      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1912
1913Installation directories:
1914  --prefix=PREFIX         install architecture-independent files in PREFIX
1915                          [$ac_default_prefix]
1916  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1917                          [PREFIX]
1918
1919By default, \`make install' will install all the files in
1920\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1921an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1922for instance \`--prefix=\$HOME'.
1923
1924For better control, use the options below.
1925
1926Fine tuning of the installation directories:
1927  --bindir=DIR            user executables [EPREFIX/bin]
1928  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1929  --libexecdir=DIR        program executables [EPREFIX/libexec]
1930  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1931  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1932  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1933  --libdir=DIR            object code libraries [EPREFIX/lib]
1934  --includedir=DIR        C header files [PREFIX/include]
1935  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1936  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1937  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1938  --infodir=DIR           info documentation [DATAROOTDIR/info]
1939  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1940  --mandir=DIR            man documentation [DATAROOTDIR/man]
1941  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1942  --htmldir=DIR           html documentation [DOCDIR]
1943  --dvidir=DIR            dvi documentation [DOCDIR]
1944  --pdfdir=DIR            pdf documentation [DOCDIR]
1945  --psdir=DIR             ps documentation [DOCDIR]
1946_ACEOF
1947
1948  cat <<\_ACEOF
1949
1950X features:
1951  --x-includes=DIR    X include files are in DIR
1952  --x-libraries=DIR   X library files are in DIR
1953
1954System types:
1955  --build=BUILD     configure for building on BUILD [guessed]
1956  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1957  --target=TARGET   configure for building compilers for TARGET [HOST]
1958_ACEOF
1959fi
1960
1961if test -n "$ac_init_help"; then
1962  case $ac_init_help in
1963     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1964   esac
1965  cat <<\_ACEOF
1966
1967Optional Features:
1968  --disable-option-checking  ignore unrecognized --enable/--with options
1969  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1970  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1971  --enable-openjdk-only   suppress building custom source even if present
1972                          [disabled]
1973  --enable-debug          set the debug level to fastdebug (shorthand for
1974                          --with-debug-level=fastdebug) [disabled]
1975  --disable-headful       disable building headful support (graphical UI
1976                          support) [enabled]
1977  --enable-unlimited-crypto
1978                          Enable unlimited crypto policy [disabled]
1979  --disable-keep-packaged-modules
1980                          Do not keep packaged modules in jdk image [enable]
1981  --enable-static-build   enable static library build [disabled]
1982  --disable-warnings-as-errors
1983                          do not consider native warnings to be an error
1984                          [enabled]
1985  --enable-debug-symbols  Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --enable-zip-debug-info Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --enable-native-coverage
1990                          enable native compilation with code coverage
1991                          data[disabled]
1992  --enable-dtrace[=yes/no/auto]
1993                          enable dtrace. Default is auto, where dtrace is
1994                          enabled if all dependencies are present.
1995  --disable-freetype-bundling
1996                          disable bundling of the freetype library with the
1997                          build result [enabled on Windows or when using
1998                          --with-freetype, disabled otherwise]
1999  --enable-jtreg-failure-handler
2000                          forces build of the jtreg failure handler to be
2001                          enabled, missing dependencies become fatal errors.
2002                          Default is auto, where the failure handler is built
2003                          if all dependencies are present and otherwise just
2004                          disabled.
2005  --enable-sjavac         use sjavac to do fast incremental compiles
2006                          [disabled]
2007  --disable-javac-server  disable javac server [enabled]
2008  --enable-icecc          enable distribted compilation of native code using
2009                          icecc/icecream [disabled]
2010  --disable-precompiled-headers
2011                          disable using precompiled headers when compiling C++
2012                          [enabled]
2013  --enable-ccache         enable using ccache to speed up recompilations
2014                          [disabled]
2015
2016Optional Packages:
2017  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2018  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2019  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2020                          support it), e.g. --with-target-bits=32 [guessed]
2021  --with-custom-make-dir  Deprecated. Option is kept for backwards
2022                          compatibility and is ignored
2023  --with-jdk-variant      JDK variant to build (normal) [normal]
2024  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2025                          optimized) [release]
2026  --with-jvm-variants     JVM variants (separated by commas) to build
2027                          (server,client,minimal,core,zero,zeroshark,custom)
2028                          [server]
2029  --with-devkit           use this devkit for compilers, tools and resources
2030  --with-sys-root         alias for --with-sysroot for backwards compatability
2031  --with-sysroot          use this directory as sysroot
2032  --with-tools-dir        alias for --with-toolchain-path for backwards
2033                          compatibility
2034  --with-toolchain-path   prepend these directories when searching for
2035                          toolchain binaries (compilers etc)
2036  --with-extra-path       prepend these directories to the default path
2037  --with-sdk-name         use the platform SDK of the given name. [macosx]
2038  --with-conf-name        use this as the name of the configuration [generated
2039                          from important configuration options]
2040  --with-output-sync      set make output sync type if supported by make.
2041                          [recurse]
2042  --with-default-make-target
2043                          set the default make target [exploded-image]
2044  --with-cacerts-file     specify alternative cacerts file
2045  --with-copyright-year   Set copyright year value for build [current year]
2046  --with-milestone        Deprecated. Option is kept for backwards
2047                          compatibility and is ignored
2048  --with-update-version   Deprecated. Option is kept for backwards
2049                          compatibility and is ignored
2050  --with-user-release-suffix
2051                          Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-build-number     Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-version-string   Set version string [calculated]
2056  --with-version-pre      Set the base part of the version 'PRE' field
2057                          (pre-release identifier) ['internal']
2058  --with-version-opt      Set version 'OPT' field (build metadata)
2059                          [<timestamp>.<user>.<dirname>]
2060  --with-version-build    Set version 'BUILD' field (build number) [not
2061                          specified]
2062  --with-version-major    Set version 'MAJOR' field (first number) [current
2063                          source value]
2064  --with-version-minor    Set version 'MINOR' field (second number) [current
2065                          source value]
2066  --with-version-security Set version 'SECURITY' field (third number) [current
2067                          source value]
2068  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2069                          specified]
2070  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2071  --with-build-jdk        path to JDK of same version as is being built[the
2072                          newly built JDK]
2073  --with-add-source-root  Deprecated. Option is kept for backwards
2074                          compatibility and is ignored
2075  --with-override-source-root
2076                          Deprecated. Option is kept for backwards
2077                          compatibility and is ignored
2078  --with-adds-and-overrides
2079                          Deprecated. Option is kept for backwards
2080                          compatibility and is ignored
2081  --with-override-langtools
2082                          Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-corba   Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-jaxp    Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-jaxws   Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-hotspot Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-nashorn Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-jdk     Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-import-hotspot   import hotspot binaries from this jdk image or
2097                          hotspot build dist dir instead of building from
2098                          source
2099  --with-import-modules   import a set of prebuilt modules either as a zip
2100                          file or an exploded directory
2101  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2102                          to show possible values [platform dependent]
2103  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2104  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2105  --with-extra-ldflags    extra flags to be used when linking jdk
2106  --with-toolchain-version
2107                          the version of the toolchain to look for, use
2108                          '--help' to show possible values [platform
2109                          dependent]
2110  --with-build-devkit     Devkit to use for the build platform toolchain
2111  --with-jtreg            Regression Test Harness [probed]
2112  --with-native-debug-symbols
2113                          set the native debug symbol configuration (none,
2114                          internal, external, zipped) [varying]
2115  --with-jvm-features     additional JVM features to enable (separated by
2116                          comma), use '--help' to show possible values [none]
2117  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2118                          compatibility and is ignored
2119  --with-stdc++lib=<static>,<dynamic>,<default>
2120                          force linking of the C++ runtime on Linux to either
2121                          static or dynamic, default is static with dynamic as
2122                          fallback
2123  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2124                          (Windows only) [probed]
2125  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2126                          (Windows only) [probed]
2127  --with-x                use the X Window System
2128  --with-cups             specify prefix directory for the cups package
2129                          (expecting the headers under PATH/include)
2130  --with-cups-include     specify directory for the cups include files
2131  --with-freetype         specify prefix directory for the freetype package
2132                          (expecting the libraries under PATH/lib and the
2133                          headers under PATH/include)
2134  --with-freetype-include specify directory for the freetype include files
2135  --with-freetype-lib     specify directory for the freetype library
2136  --with-freetype-src     specify directory with freetype sources to
2137                          automatically build the library (experimental,
2138                          Windows-only)
2139  --with-alsa             specify prefix directory for the alsa package
2140                          (expecting the libraries under PATH/lib and the
2141                          headers under PATH/include)
2142  --with-alsa-include     specify directory for the alsa include files
2143  --with-alsa-lib         specify directory for the alsa library
2144  --with-libffi           specify prefix directory for the libffi package
2145                          (expecting the libraries under PATH/lib and the
2146                          headers under PATH/include)
2147  --with-libffi-include   specify directory for the libffi include files
2148  --with-libffi-lib       specify directory for the libffi library
2149  --with-libjpeg          use libjpeg from build system or OpenJDK source
2150                          (system, bundled) [bundled]
2151  --with-giflib           use giflib from build system or OpenJDK source
2152                          (system, bundled) [bundled]
2153  --with-libpng           use libpng from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-zlib             use zlib from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-lcms             use lcms2 from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-dxsdk            Deprecated. Option is kept for backwards
2160                          compatibility and is ignored
2161  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2162                          compatibility and is ignored
2163  --with-dxsdk-include    Deprecated. Option is kept for backwards
2164                          compatibility and is ignored
2165  --with-num-cores        number of cores in the build system, e.g.
2166                          --with-num-cores=8 [probed]
2167  --with-memory-size      memory (in MB) available in the build system, e.g.
2168                          --with-memory-size=1024 [probed]
2169  --with-jobs             number of parallel jobs to let make run [calculated
2170                          based on cores and memory]
2171  --with-test-jobs        number of parallel tests jobs to run [based on build
2172                          jobs]
2173  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2174                          invocations of boot JDK, overriding the default
2175                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2176                          -enableassertions"
2177  --with-sjavac-server-java
2178                          use this java binary for running the sjavac
2179                          background server [Boot JDK java]
2180  --with-ccache-dir       where to store ccache files [~/.ccache]
2181
2182Some influential environment variables:
2183  BASENAME    Override default value for BASENAME
2184  BASH        Override default value for BASH
2185  CAT         Override default value for CAT
2186  CHMOD       Override default value for CHMOD
2187  CMP         Override default value for CMP
2188  COMM        Override default value for COMM
2189  CP          Override default value for CP
2190  CUT         Override default value for CUT
2191  DATE        Override default value for DATE
2192  DIFF        Override default value for DIFF
2193  DIRNAME     Override default value for DIRNAME
2194  ECHO        Override default value for ECHO
2195  EXPR        Override default value for EXPR
2196  FILE        Override default value for FILE
2197  FIND        Override default value for FIND
2198  HEAD        Override default value for HEAD
2199  GUNZIP      Override default value for GUNZIP
2200  GZIP        Override default value for GZIP
2201  LN          Override default value for LN
2202  LS          Override default value for LS
2203  MKDIR       Override default value for MKDIR
2204  MKTEMP      Override default value for MKTEMP
2205  MV          Override default value for MV
2206  NAWK        Override default value for NAWK
2207  PRINTF      Override default value for PRINTF
2208  RM          Override default value for RM
2209  RMDIR       Override default value for RMDIR
2210  SH          Override default value for SH
2211  SORT        Override default value for SORT
2212  TAIL        Override default value for TAIL
2213  TAR         Override default value for TAR
2214  TEE         Override default value for TEE
2215  TOUCH       Override default value for TOUCH
2216  TR          Override default value for TR
2217  UNAME       Override default value for UNAME
2218  UNIQ        Override default value for UNIQ
2219  WC          Override default value for WC
2220  WHICH       Override default value for WHICH
2221  XARGS       Override default value for XARGS
2222  AWK         Override default value for AWK
2223  GREP        Override default value for GREP
2224  EGREP       Override default value for EGREP
2225  FGREP       Override default value for FGREP
2226  SED         Override default value for SED
2227  CYGPATH     Override default value for CYGPATH
2228  READLINK    Override default value for READLINK
2229  DF          Override default value for DF
2230  CPIO        Override default value for CPIO
2231  NICE        Override default value for NICE
2232  MAKE        Override default value for MAKE
2233  UNZIP       Override default value for UNZIP
2234  ZIP         Override default value for ZIP
2235  LDD         Override default value for LDD
2236  OTOOL       Override default value for OTOOL
2237  READELF     Override default value for READELF
2238  HG          Override default value for HG
2239  STAT        Override default value for STAT
2240  TIME        Override default value for TIME
2241  DTRACE      Override default value for DTRACE
2242  PATCH       Override default value for PATCH
2243  DSYMUTIL    Override default value for DSYMUTIL
2244  XATTR       Override default value for XATTR
2245  CODESIGN    Override default value for CODESIGN
2246  SETFILE     Override default value for SETFILE
2247  PKG_CONFIG  path to pkg-config utility
2248  JAVA        Override default value for JAVA
2249  JAVAC       Override default value for JAVAC
2250  JAVAH       Override default value for JAVAH
2251  JAR         Override default value for JAR
2252  JARSIGNER   Override default value for JARSIGNER
2253  CC          C compiler command
2254  CFLAGS      C compiler flags
2255  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2256              nonstandard directory <lib dir>
2257  LIBS        libraries to pass to the linker, e.g. -l<library>
2258  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2259              you have headers in a nonstandard directory <include dir>
2260  CXX         C++ compiler command
2261  CXXFLAGS    C++ compiler flags
2262  CPP         C preprocessor
2263  CXXCPP      C++ preprocessor
2264  AS          Override default value for AS
2265  AR          Override default value for AR
2266  LIPO        Override default value for LIPO
2267  STRIP       Override default value for STRIP
2268  NM          Override default value for NM
2269  GNM         Override default value for GNM
2270  OBJCOPY     Override default value for OBJCOPY
2271  OBJDUMP     Override default value for OBJDUMP
2272  BUILD_CC    Override default value for BUILD_CC
2273  BUILD_CXX   Override default value for BUILD_CXX
2274  BUILD_NM    Override default value for BUILD_NM
2275  BUILD_AR    Override default value for BUILD_AR
2276  BUILD_OBJCOPY
2277              Override default value for BUILD_OBJCOPY
2278  BUILD_STRIP Override default value for BUILD_STRIP
2279  JTREGEXE    Override default value for JTREGEXE
2280  XMKMF       Path to xmkmf, Makefile generator for X Window System
2281  FREETYPE_CFLAGS
2282              C compiler flags for FREETYPE, overriding pkg-config
2283  FREETYPE_LIBS
2284              linker flags for FREETYPE, overriding pkg-config
2285  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2286  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2287  LIBFFI_CFLAGS
2288              C compiler flags for LIBFFI, overriding pkg-config
2289  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2290  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2291  PNG_LIBS    linker flags for PNG, overriding pkg-config
2292  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2293  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2294  ICECC_CMD   Override default value for ICECC_CMD
2295  ICECC_CREATE_ENV
2296              Override default value for ICECC_CREATE_ENV
2297  ICECC_WRAPPER
2298              Override default value for ICECC_WRAPPER
2299  CCACHE      Override default value for CCACHE
2300
2301Use these variables to override the choices made by `configure' or to help
2302it to find libraries and programs with nonstandard names/locations.
2303
2304Report bugs to <build-dev@openjdk.java.net>.
2305OpenJDK home page: <http://openjdk.java.net>.
2306_ACEOF
2307ac_status=$?
2308fi
2309
2310if test "$ac_init_help" = "recursive"; then
2311  # If there are subdirs, report their specific --help.
2312  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2313    test -d "$ac_dir" ||
2314      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2315      continue
2316    ac_builddir=.
2317
2318case "$ac_dir" in
2319.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2320*)
2321  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2322  # A ".." for each directory in $ac_dir_suffix.
2323  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2324  case $ac_top_builddir_sub in
2325  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2326  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2327  esac ;;
2328esac
2329ac_abs_top_builddir=$ac_pwd
2330ac_abs_builddir=$ac_pwd$ac_dir_suffix
2331# for backward compatibility:
2332ac_top_builddir=$ac_top_build_prefix
2333
2334case $srcdir in
2335  .)  # We are building in place.
2336    ac_srcdir=.
2337    ac_top_srcdir=$ac_top_builddir_sub
2338    ac_abs_top_srcdir=$ac_pwd ;;
2339  [\\/]* | ?:[\\/]* )  # Absolute name.
2340    ac_srcdir=$srcdir$ac_dir_suffix;
2341    ac_top_srcdir=$srcdir
2342    ac_abs_top_srcdir=$srcdir ;;
2343  *) # Relative name.
2344    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2345    ac_top_srcdir=$ac_top_build_prefix$srcdir
2346    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2347esac
2348ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2349
2350    cd "$ac_dir" || { ac_status=$?; continue; }
2351    # Check for guested configure.
2352    if test -f "$ac_srcdir/configure.gnu"; then
2353      echo &&
2354      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2355    elif test -f "$ac_srcdir/configure"; then
2356      echo &&
2357      $SHELL "$ac_srcdir/configure" --help=recursive
2358    else
2359      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2360    fi || ac_status=$?
2361    cd "$ac_pwd" || { ac_status=$?; break; }
2362  done
2363fi
2364
2365test -n "$ac_init_help" && exit $ac_status
2366if $ac_init_version; then
2367  cat <<\_ACEOF
2368OpenJDK configure jdk9
2369generated by GNU Autoconf 2.69
2370
2371Copyright (C) 2012 Free Software Foundation, Inc.
2372This configure script is free software; the Free Software Foundation
2373gives unlimited permission to copy, distribute and modify it.
2374_ACEOF
2375  exit
2376fi
2377
2378## ------------------------ ##
2379## Autoconf initialization. ##
2380## ------------------------ ##
2381
2382# ac_fn_c_try_compile LINENO
2383# --------------------------
2384# Try to compile conftest.$ac_ext, and return whether this succeeded.
2385ac_fn_c_try_compile ()
2386{
2387  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2388  rm -f conftest.$ac_objext
2389  if { { ac_try="$ac_compile"
2390case "(($ac_try" in
2391  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2392  *) ac_try_echo=$ac_try;;
2393esac
2394eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2395$as_echo "$ac_try_echo"; } >&5
2396  (eval "$ac_compile") 2>conftest.err
2397  ac_status=$?
2398  if test -s conftest.err; then
2399    grep -v '^ *+' conftest.err >conftest.er1
2400    cat conftest.er1 >&5
2401    mv -f conftest.er1 conftest.err
2402  fi
2403  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2404  test $ac_status = 0; } && {
2405	 test -z "$ac_c_werror_flag" ||
2406	 test ! -s conftest.err
2407       } && test -s conftest.$ac_objext; then :
2408  ac_retval=0
2409else
2410  $as_echo "$as_me: failed program was:" >&5
2411sed 's/^/| /' conftest.$ac_ext >&5
2412
2413	ac_retval=1
2414fi
2415  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2416  as_fn_set_status $ac_retval
2417
2418} # ac_fn_c_try_compile
2419
2420# ac_fn_cxx_try_compile LINENO
2421# ----------------------------
2422# Try to compile conftest.$ac_ext, and return whether this succeeded.
2423ac_fn_cxx_try_compile ()
2424{
2425  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2426  rm -f conftest.$ac_objext
2427  if { { ac_try="$ac_compile"
2428case "(($ac_try" in
2429  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2430  *) ac_try_echo=$ac_try;;
2431esac
2432eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2433$as_echo "$ac_try_echo"; } >&5
2434  (eval "$ac_compile") 2>conftest.err
2435  ac_status=$?
2436  if test -s conftest.err; then
2437    grep -v '^ *+' conftest.err >conftest.er1
2438    cat conftest.er1 >&5
2439    mv -f conftest.er1 conftest.err
2440  fi
2441  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2442  test $ac_status = 0; } && {
2443	 test -z "$ac_cxx_werror_flag" ||
2444	 test ! -s conftest.err
2445       } && test -s conftest.$ac_objext; then :
2446  ac_retval=0
2447else
2448  $as_echo "$as_me: failed program was:" >&5
2449sed 's/^/| /' conftest.$ac_ext >&5
2450
2451	ac_retval=1
2452fi
2453  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2454  as_fn_set_status $ac_retval
2455
2456} # ac_fn_cxx_try_compile
2457
2458# ac_fn_c_try_cpp LINENO
2459# ----------------------
2460# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2461ac_fn_c_try_cpp ()
2462{
2463  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2464  if { { ac_try="$ac_cpp conftest.$ac_ext"
2465case "(($ac_try" in
2466  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2467  *) ac_try_echo=$ac_try;;
2468esac
2469eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2470$as_echo "$ac_try_echo"; } >&5
2471  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2472  ac_status=$?
2473  if test -s conftest.err; then
2474    grep -v '^ *+' conftest.err >conftest.er1
2475    cat conftest.er1 >&5
2476    mv -f conftest.er1 conftest.err
2477  fi
2478  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2479  test $ac_status = 0; } > conftest.i && {
2480	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2481	 test ! -s conftest.err
2482       }; then :
2483  ac_retval=0
2484else
2485  $as_echo "$as_me: failed program was:" >&5
2486sed 's/^/| /' conftest.$ac_ext >&5
2487
2488    ac_retval=1
2489fi
2490  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2491  as_fn_set_status $ac_retval
2492
2493} # ac_fn_c_try_cpp
2494
2495# ac_fn_cxx_try_cpp LINENO
2496# ------------------------
2497# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2498ac_fn_cxx_try_cpp ()
2499{
2500  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2501  if { { ac_try="$ac_cpp conftest.$ac_ext"
2502case "(($ac_try" in
2503  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2504  *) ac_try_echo=$ac_try;;
2505esac
2506eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2507$as_echo "$ac_try_echo"; } >&5
2508  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2509  ac_status=$?
2510  if test -s conftest.err; then
2511    grep -v '^ *+' conftest.err >conftest.er1
2512    cat conftest.er1 >&5
2513    mv -f conftest.er1 conftest.err
2514  fi
2515  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2516  test $ac_status = 0; } > conftest.i && {
2517	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2518	 test ! -s conftest.err
2519       }; then :
2520  ac_retval=0
2521else
2522  $as_echo "$as_me: failed program was:" >&5
2523sed 's/^/| /' conftest.$ac_ext >&5
2524
2525    ac_retval=1
2526fi
2527  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2528  as_fn_set_status $ac_retval
2529
2530} # ac_fn_cxx_try_cpp
2531
2532# ac_fn_c_try_link LINENO
2533# -----------------------
2534# Try to link conftest.$ac_ext, and return whether this succeeded.
2535ac_fn_c_try_link ()
2536{
2537  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2538  rm -f conftest.$ac_objext conftest$ac_exeext
2539  if { { ac_try="$ac_link"
2540case "(($ac_try" in
2541  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2542  *) ac_try_echo=$ac_try;;
2543esac
2544eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2545$as_echo "$ac_try_echo"; } >&5
2546  (eval "$ac_link") 2>conftest.err
2547  ac_status=$?
2548  if test -s conftest.err; then
2549    grep -v '^ *+' conftest.err >conftest.er1
2550    cat conftest.er1 >&5
2551    mv -f conftest.er1 conftest.err
2552  fi
2553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2554  test $ac_status = 0; } && {
2555	 test -z "$ac_c_werror_flag" ||
2556	 test ! -s conftest.err
2557       } && test -s conftest$ac_exeext && {
2558	 test "$cross_compiling" = yes ||
2559	 test -x conftest$ac_exeext
2560       }; then :
2561  ac_retval=0
2562else
2563  $as_echo "$as_me: failed program was:" >&5
2564sed 's/^/| /' conftest.$ac_ext >&5
2565
2566	ac_retval=1
2567fi
2568  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2569  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2570  # interfere with the next link command; also delete a directory that is
2571  # left behind by Apple's compiler.  We do this before executing the actions.
2572  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2573  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2574  as_fn_set_status $ac_retval
2575
2576} # ac_fn_c_try_link
2577
2578# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2579# ---------------------------------------------------------
2580# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2581# the include files in INCLUDES and setting the cache variable VAR
2582# accordingly.
2583ac_fn_cxx_check_header_mongrel ()
2584{
2585  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2586  if eval \${$3+:} false; then :
2587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2588$as_echo_n "checking for $2... " >&6; }
2589if eval \${$3+:} false; then :
2590  $as_echo_n "(cached) " >&6
2591fi
2592eval ac_res=\$$3
2593	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2594$as_echo "$ac_res" >&6; }
2595else
2596  # Is the header compilable?
2597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2598$as_echo_n "checking $2 usability... " >&6; }
2599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2600/* end confdefs.h.  */
2601$4
2602#include <$2>
2603_ACEOF
2604if ac_fn_cxx_try_compile "$LINENO"; then :
2605  ac_header_compiler=yes
2606else
2607  ac_header_compiler=no
2608fi
2609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2611$as_echo "$ac_header_compiler" >&6; }
2612
2613# Is the header present?
2614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2615$as_echo_n "checking $2 presence... " >&6; }
2616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2617/* end confdefs.h.  */
2618#include <$2>
2619_ACEOF
2620if ac_fn_cxx_try_cpp "$LINENO"; then :
2621  ac_header_preproc=yes
2622else
2623  ac_header_preproc=no
2624fi
2625rm -f conftest.err conftest.i conftest.$ac_ext
2626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2627$as_echo "$ac_header_preproc" >&6; }
2628
2629# So?  What about this header?
2630case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2631  yes:no: )
2632    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2633$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2634    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2635$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2636    ;;
2637  no:yes:* )
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2639$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2641$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2643$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2645$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2647$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2648( $as_echo "## ----------------------------------------- ##
2649## Report this to build-dev@openjdk.java.net ##
2650## ----------------------------------------- ##"
2651     ) | sed "s/^/$as_me: WARNING:     /" >&2
2652    ;;
2653esac
2654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2655$as_echo_n "checking for $2... " >&6; }
2656if eval \${$3+:} false; then :
2657  $as_echo_n "(cached) " >&6
2658else
2659  eval "$3=\$ac_header_compiler"
2660fi
2661eval ac_res=\$$3
2662	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2663$as_echo "$ac_res" >&6; }
2664fi
2665  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2666
2667} # ac_fn_cxx_check_header_mongrel
2668
2669# ac_fn_cxx_try_run LINENO
2670# ------------------------
2671# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2672# that executables *can* be run.
2673ac_fn_cxx_try_run ()
2674{
2675  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2676  if { { ac_try="$ac_link"
2677case "(($ac_try" in
2678  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2679  *) ac_try_echo=$ac_try;;
2680esac
2681eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2682$as_echo "$ac_try_echo"; } >&5
2683  (eval "$ac_link") 2>&5
2684  ac_status=$?
2685  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2686  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2687  { { case "(($ac_try" in
2688  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689  *) ac_try_echo=$ac_try;;
2690esac
2691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2692$as_echo "$ac_try_echo"; } >&5
2693  (eval "$ac_try") 2>&5
2694  ac_status=$?
2695  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2696  test $ac_status = 0; }; }; then :
2697  ac_retval=0
2698else
2699  $as_echo "$as_me: program exited with status $ac_status" >&5
2700       $as_echo "$as_me: failed program was:" >&5
2701sed 's/^/| /' conftest.$ac_ext >&5
2702
2703       ac_retval=$ac_status
2704fi
2705  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2706  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2707  as_fn_set_status $ac_retval
2708
2709} # ac_fn_cxx_try_run
2710
2711# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2712# ---------------------------------------------------------
2713# Tests whether HEADER exists and can be compiled using the include files in
2714# INCLUDES, setting the cache variable VAR accordingly.
2715ac_fn_cxx_check_header_compile ()
2716{
2717  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2719$as_echo_n "checking for $2... " >&6; }
2720if eval \${$3+:} false; then :
2721  $as_echo_n "(cached) " >&6
2722else
2723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2724/* end confdefs.h.  */
2725$4
2726#include <$2>
2727_ACEOF
2728if ac_fn_cxx_try_compile "$LINENO"; then :
2729  eval "$3=yes"
2730else
2731  eval "$3=no"
2732fi
2733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2734fi
2735eval ac_res=\$$3
2736	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2737$as_echo "$ac_res" >&6; }
2738  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2739
2740} # ac_fn_cxx_check_header_compile
2741
2742# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2743# ----------------------------------------------
2744# Tries to find the compile-time value of EXPR in a program that includes
2745# INCLUDES, setting VAR accordingly. Returns whether the value could be
2746# computed
2747ac_fn_cxx_compute_int ()
2748{
2749  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2750  if test "$cross_compiling" = yes; then
2751    # Depending upon the size, compute the lo and hi bounds.
2752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2753/* end confdefs.h.  */
2754$4
2755int
2756main ()
2757{
2758static int test_array [1 - 2 * !(($2) >= 0)];
2759test_array [0] = 0;
2760return test_array [0];
2761
2762  ;
2763  return 0;
2764}
2765_ACEOF
2766if ac_fn_cxx_try_compile "$LINENO"; then :
2767  ac_lo=0 ac_mid=0
2768  while :; do
2769    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2770/* end confdefs.h.  */
2771$4
2772int
2773main ()
2774{
2775static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2776test_array [0] = 0;
2777return test_array [0];
2778
2779  ;
2780  return 0;
2781}
2782_ACEOF
2783if ac_fn_cxx_try_compile "$LINENO"; then :
2784  ac_hi=$ac_mid; break
2785else
2786  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2787			if test $ac_lo -le $ac_mid; then
2788			  ac_lo= ac_hi=
2789			  break
2790			fi
2791			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2792fi
2793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2794  done
2795else
2796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797/* end confdefs.h.  */
2798$4
2799int
2800main ()
2801{
2802static int test_array [1 - 2 * !(($2) < 0)];
2803test_array [0] = 0;
2804return test_array [0];
2805
2806  ;
2807  return 0;
2808}
2809_ACEOF
2810if ac_fn_cxx_try_compile "$LINENO"; then :
2811  ac_hi=-1 ac_mid=-1
2812  while :; do
2813    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2814/* end confdefs.h.  */
2815$4
2816int
2817main ()
2818{
2819static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2820test_array [0] = 0;
2821return test_array [0];
2822
2823  ;
2824  return 0;
2825}
2826_ACEOF
2827if ac_fn_cxx_try_compile "$LINENO"; then :
2828  ac_lo=$ac_mid; break
2829else
2830  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2831			if test $ac_mid -le $ac_hi; then
2832			  ac_lo= ac_hi=
2833			  break
2834			fi
2835			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2836fi
2837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2838  done
2839else
2840  ac_lo= ac_hi=
2841fi
2842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843fi
2844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2845# Binary search between lo and hi bounds.
2846while test "x$ac_lo" != "x$ac_hi"; do
2847  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2849/* end confdefs.h.  */
2850$4
2851int
2852main ()
2853{
2854static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2855test_array [0] = 0;
2856return test_array [0];
2857
2858  ;
2859  return 0;
2860}
2861_ACEOF
2862if ac_fn_cxx_try_compile "$LINENO"; then :
2863  ac_hi=$ac_mid
2864else
2865  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2866fi
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868done
2869case $ac_lo in #((
2870?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2871'') ac_retval=1 ;;
2872esac
2873  else
2874    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2875/* end confdefs.h.  */
2876$4
2877static long int longval () { return $2; }
2878static unsigned long int ulongval () { return $2; }
2879#include <stdio.h>
2880#include <stdlib.h>
2881int
2882main ()
2883{
2884
2885  FILE *f = fopen ("conftest.val", "w");
2886  if (! f)
2887    return 1;
2888  if (($2) < 0)
2889    {
2890      long int i = longval ();
2891      if (i != ($2))
2892	return 1;
2893      fprintf (f, "%ld", i);
2894    }
2895  else
2896    {
2897      unsigned long int i = ulongval ();
2898      if (i != ($2))
2899	return 1;
2900      fprintf (f, "%lu", i);
2901    }
2902  /* Do not output a trailing newline, as this causes \r\n confusion
2903     on some platforms.  */
2904  return ferror (f) || fclose (f) != 0;
2905
2906  ;
2907  return 0;
2908}
2909_ACEOF
2910if ac_fn_cxx_try_run "$LINENO"; then :
2911  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2912else
2913  ac_retval=1
2914fi
2915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2916  conftest.$ac_objext conftest.beam conftest.$ac_ext
2917rm -f conftest.val
2918
2919  fi
2920  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2921  as_fn_set_status $ac_retval
2922
2923} # ac_fn_cxx_compute_int
2924
2925# ac_fn_cxx_try_link LINENO
2926# -------------------------
2927# Try to link conftest.$ac_ext, and return whether this succeeded.
2928ac_fn_cxx_try_link ()
2929{
2930  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2931  rm -f conftest.$ac_objext conftest$ac_exeext
2932  if { { ac_try="$ac_link"
2933case "(($ac_try" in
2934  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2935  *) ac_try_echo=$ac_try;;
2936esac
2937eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2938$as_echo "$ac_try_echo"; } >&5
2939  (eval "$ac_link") 2>conftest.err
2940  ac_status=$?
2941  if test -s conftest.err; then
2942    grep -v '^ *+' conftest.err >conftest.er1
2943    cat conftest.er1 >&5
2944    mv -f conftest.er1 conftest.err
2945  fi
2946  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2947  test $ac_status = 0; } && {
2948	 test -z "$ac_cxx_werror_flag" ||
2949	 test ! -s conftest.err
2950       } && test -s conftest$ac_exeext && {
2951	 test "$cross_compiling" = yes ||
2952	 test -x conftest$ac_exeext
2953       }; then :
2954  ac_retval=0
2955else
2956  $as_echo "$as_me: failed program was:" >&5
2957sed 's/^/| /' conftest.$ac_ext >&5
2958
2959	ac_retval=1
2960fi
2961  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2962  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2963  # interfere with the next link command; also delete a directory that is
2964  # left behind by Apple's compiler.  We do this before executing the actions.
2965  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2966  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2967  as_fn_set_status $ac_retval
2968
2969} # ac_fn_cxx_try_link
2970
2971# ac_fn_cxx_check_func LINENO FUNC VAR
2972# ------------------------------------
2973# Tests whether FUNC exists, setting the cache variable VAR accordingly
2974ac_fn_cxx_check_func ()
2975{
2976  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2977  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2978$as_echo_n "checking for $2... " >&6; }
2979if eval \${$3+:} false; then :
2980  $as_echo_n "(cached) " >&6
2981else
2982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2983/* end confdefs.h.  */
2984/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2985   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2986#define $2 innocuous_$2
2987
2988/* System header to define __stub macros and hopefully few prototypes,
2989    which can conflict with char $2 (); below.
2990    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2991    <limits.h> exists even on freestanding compilers.  */
2992
2993#ifdef __STDC__
2994# include <limits.h>
2995#else
2996# include <assert.h>
2997#endif
2998
2999#undef $2
3000
3001/* Override any GCC internal prototype to avoid an error.
3002   Use char because int might match the return type of a GCC
3003   builtin and then its argument prototype would still apply.  */
3004#ifdef __cplusplus
3005extern "C"
3006#endif
3007char $2 ();
3008/* The GNU C library defines this for functions which it implements
3009    to always fail with ENOSYS.  Some functions are actually named
3010    something starting with __ and the normal name is an alias.  */
3011#if defined __stub_$2 || defined __stub___$2
3012choke me
3013#endif
3014
3015int
3016main ()
3017{
3018return $2 ();
3019  ;
3020  return 0;
3021}
3022_ACEOF
3023if ac_fn_cxx_try_link "$LINENO"; then :
3024  eval "$3=yes"
3025else
3026  eval "$3=no"
3027fi
3028rm -f core conftest.err conftest.$ac_objext \
3029    conftest$ac_exeext conftest.$ac_ext
3030fi
3031eval ac_res=\$$3
3032	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3033$as_echo "$ac_res" >&6; }
3034  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3035
3036} # ac_fn_cxx_check_func
3037
3038# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3039# -------------------------------------------------------
3040# Tests whether HEADER exists and can be compiled using the include files in
3041# INCLUDES, setting the cache variable VAR accordingly.
3042ac_fn_c_check_header_compile ()
3043{
3044  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3045  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3046$as_echo_n "checking for $2... " >&6; }
3047if eval \${$3+:} false; then :
3048  $as_echo_n "(cached) " >&6
3049else
3050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3051/* end confdefs.h.  */
3052$4
3053#include <$2>
3054_ACEOF
3055if ac_fn_c_try_compile "$LINENO"; then :
3056  eval "$3=yes"
3057else
3058  eval "$3=no"
3059fi
3060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3061fi
3062eval ac_res=\$$3
3063	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3064$as_echo "$ac_res" >&6; }
3065  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3066
3067} # ac_fn_c_check_header_compile
3068cat >config.log <<_ACEOF
3069This file contains any messages produced by compilers while
3070running configure, to aid debugging if configure makes a mistake.
3071
3072It was created by OpenJDK $as_me jdk9, which was
3073generated by GNU Autoconf 2.69.  Invocation command line was
3074
3075  $ $0 $@
3076
3077_ACEOF
3078exec 5>>config.log
3079{
3080cat <<_ASUNAME
3081## --------- ##
3082## Platform. ##
3083## --------- ##
3084
3085hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3086uname -m = `(uname -m) 2>/dev/null || echo unknown`
3087uname -r = `(uname -r) 2>/dev/null || echo unknown`
3088uname -s = `(uname -s) 2>/dev/null || echo unknown`
3089uname -v = `(uname -v) 2>/dev/null || echo unknown`
3090
3091/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3092/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3093
3094/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3095/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3096/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3097/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3098/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3099/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3100/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3101
3102_ASUNAME
3103
3104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3105for as_dir in $PATH
3106do
3107  IFS=$as_save_IFS
3108  test -z "$as_dir" && as_dir=.
3109    $as_echo "PATH: $as_dir"
3110  done
3111IFS=$as_save_IFS
3112
3113} >&5
3114
3115cat >&5 <<_ACEOF
3116
3117
3118## ----------- ##
3119## Core tests. ##
3120## ----------- ##
3121
3122_ACEOF
3123
3124
3125# Keep a trace of the command line.
3126# Strip out --no-create and --no-recursion so they do not pile up.
3127# Strip out --silent because we don't want to record it for future runs.
3128# Also quote any args containing shell meta-characters.
3129# Make two passes to allow for proper duplicate-argument suppression.
3130ac_configure_args=
3131ac_configure_args0=
3132ac_configure_args1=
3133ac_must_keep_next=false
3134for ac_pass in 1 2
3135do
3136  for ac_arg
3137  do
3138    case $ac_arg in
3139    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3140    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3141    | -silent | --silent | --silen | --sile | --sil)
3142      continue ;;
3143    *\'*)
3144      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3145    esac
3146    case $ac_pass in
3147    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3148    2)
3149      as_fn_append ac_configure_args1 " '$ac_arg'"
3150      if test $ac_must_keep_next = true; then
3151	ac_must_keep_next=false # Got value, back to normal.
3152      else
3153	case $ac_arg in
3154	  *=* | --config-cache | -C | -disable-* | --disable-* \
3155	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3156	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3157	  | -with-* | --with-* | -without-* | --without-* | --x)
3158	    case "$ac_configure_args0 " in
3159	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3160	    esac
3161	    ;;
3162	  -* ) ac_must_keep_next=true ;;
3163	esac
3164      fi
3165      as_fn_append ac_configure_args " '$ac_arg'"
3166      ;;
3167    esac
3168  done
3169done
3170{ ac_configure_args0=; unset ac_configure_args0;}
3171{ ac_configure_args1=; unset ac_configure_args1;}
3172
3173# When interrupted or exit'd, cleanup temporary files, and complete
3174# config.log.  We remove comments because anyway the quotes in there
3175# would cause problems or look ugly.
3176# WARNING: Use '\'' to represent an apostrophe within the trap.
3177# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3178trap 'exit_status=$?
3179  # Save into config.log some information that might help in debugging.
3180  {
3181    echo
3182
3183    $as_echo "## ---------------- ##
3184## Cache variables. ##
3185## ---------------- ##"
3186    echo
3187    # The following way of writing the cache mishandles newlines in values,
3188(
3189  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3190    eval ac_val=\$$ac_var
3191    case $ac_val in #(
3192    *${as_nl}*)
3193      case $ac_var in #(
3194      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3195$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3196      esac
3197      case $ac_var in #(
3198      _ | IFS | as_nl) ;; #(
3199      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3200      *) { eval $ac_var=; unset $ac_var;} ;;
3201      esac ;;
3202    esac
3203  done
3204  (set) 2>&1 |
3205    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3206    *${as_nl}ac_space=\ *)
3207      sed -n \
3208	"s/'\''/'\''\\\\'\'''\''/g;
3209	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3210      ;; #(
3211    *)
3212      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3213      ;;
3214    esac |
3215    sort
3216)
3217    echo
3218
3219    $as_echo "## ----------------- ##
3220## Output variables. ##
3221## ----------------- ##"
3222    echo
3223    for ac_var in $ac_subst_vars
3224    do
3225      eval ac_val=\$$ac_var
3226      case $ac_val in
3227      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3228      esac
3229      $as_echo "$ac_var='\''$ac_val'\''"
3230    done | sort
3231    echo
3232
3233    if test -n "$ac_subst_files"; then
3234      $as_echo "## ------------------- ##
3235## File substitutions. ##
3236## ------------------- ##"
3237      echo
3238      for ac_var in $ac_subst_files
3239      do
3240	eval ac_val=\$$ac_var
3241	case $ac_val in
3242	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3243	esac
3244	$as_echo "$ac_var='\''$ac_val'\''"
3245      done | sort
3246      echo
3247    fi
3248
3249    if test -s confdefs.h; then
3250      $as_echo "## ----------- ##
3251## confdefs.h. ##
3252## ----------- ##"
3253      echo
3254      cat confdefs.h
3255      echo
3256    fi
3257    test "$ac_signal" != 0 &&
3258      $as_echo "$as_me: caught signal $ac_signal"
3259    $as_echo "$as_me: exit $exit_status"
3260  } >&5
3261  rm -f core *.core core.conftest.* &&
3262    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3263    exit $exit_status
3264' 0
3265for ac_signal in 1 2 13 15; do
3266  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3267done
3268ac_signal=0
3269
3270# confdefs.h avoids OS command line length limits that DEFS can exceed.
3271rm -f -r conftest* confdefs.h
3272
3273$as_echo "/* confdefs.h */" > confdefs.h
3274
3275# Predefined preprocessor variables.
3276
3277cat >>confdefs.h <<_ACEOF
3278#define PACKAGE_NAME "$PACKAGE_NAME"
3279_ACEOF
3280
3281cat >>confdefs.h <<_ACEOF
3282#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3283_ACEOF
3284
3285cat >>confdefs.h <<_ACEOF
3286#define PACKAGE_VERSION "$PACKAGE_VERSION"
3287_ACEOF
3288
3289cat >>confdefs.h <<_ACEOF
3290#define PACKAGE_STRING "$PACKAGE_STRING"
3291_ACEOF
3292
3293cat >>confdefs.h <<_ACEOF
3294#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3295_ACEOF
3296
3297cat >>confdefs.h <<_ACEOF
3298#define PACKAGE_URL "$PACKAGE_URL"
3299_ACEOF
3300
3301
3302# Let the site file select an alternate cache file if it wants to.
3303# Prefer an explicitly selected file to automatically selected ones.
3304ac_site_file1=NONE
3305ac_site_file2=NONE
3306if test -n "$CONFIG_SITE"; then
3307  # We do not want a PATH search for config.site.
3308  case $CONFIG_SITE in #((
3309    -*)  ac_site_file1=./$CONFIG_SITE;;
3310    */*) ac_site_file1=$CONFIG_SITE;;
3311    *)   ac_site_file1=./$CONFIG_SITE;;
3312  esac
3313elif test "x$prefix" != xNONE; then
3314  ac_site_file1=$prefix/share/config.site
3315  ac_site_file2=$prefix/etc/config.site
3316else
3317  ac_site_file1=$ac_default_prefix/share/config.site
3318  ac_site_file2=$ac_default_prefix/etc/config.site
3319fi
3320for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3321do
3322  test "x$ac_site_file" = xNONE && continue
3323  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3324    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3325$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3326    sed 's/^/| /' "$ac_site_file" >&5
3327    . "$ac_site_file" \
3328      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3330as_fn_error $? "failed to load site script $ac_site_file
3331See \`config.log' for more details" "$LINENO" 5; }
3332  fi
3333done
3334
3335if test -r "$cache_file"; then
3336  # Some versions of bash will fail to source /dev/null (special files
3337  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3338  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3339    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3340$as_echo "$as_me: loading cache $cache_file" >&6;}
3341    case $cache_file in
3342      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3343      *)                      . "./$cache_file";;
3344    esac
3345  fi
3346else
3347  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3348$as_echo "$as_me: creating cache $cache_file" >&6;}
3349  >$cache_file
3350fi
3351
3352# Check that the precious variables saved in the cache have kept the same
3353# value.
3354ac_cache_corrupted=false
3355for ac_var in $ac_precious_vars; do
3356  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3357  eval ac_new_set=\$ac_env_${ac_var}_set
3358  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3359  eval ac_new_val=\$ac_env_${ac_var}_value
3360  case $ac_old_set,$ac_new_set in
3361    set,)
3362      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3363$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3364      ac_cache_corrupted=: ;;
3365    ,set)
3366      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3367$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3368      ac_cache_corrupted=: ;;
3369    ,);;
3370    *)
3371      if test "x$ac_old_val" != "x$ac_new_val"; then
3372	# differences in whitespace do not lead to failure.
3373	ac_old_val_w=`echo x $ac_old_val`
3374	ac_new_val_w=`echo x $ac_new_val`
3375	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3376	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3377$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3378	  ac_cache_corrupted=:
3379	else
3380	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3381$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3382	  eval $ac_var=\$ac_old_val
3383	fi
3384	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3385$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3386	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3387$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3388      fi;;
3389  esac
3390  # Pass precious variables to config.status.
3391  if test "$ac_new_set" = set; then
3392    case $ac_new_val in
3393    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3394    *) ac_arg=$ac_var=$ac_new_val ;;
3395    esac
3396    case " $ac_configure_args " in
3397      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3398      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3399    esac
3400  fi
3401done
3402if $ac_cache_corrupted; then
3403  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3405  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3406$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3407  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3408fi
3409## -------------------- ##
3410## Main body of script. ##
3411## -------------------- ##
3412
3413ac_ext=c
3414ac_cpp='$CPP $CPPFLAGS'
3415ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3416ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3417ac_compiler_gnu=$ac_cv_c_compiler_gnu
3418
3419
3420
3421ac_aux_dir=
3422for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3423  if test -f "$ac_dir/install-sh"; then
3424    ac_aux_dir=$ac_dir
3425    ac_install_sh="$ac_aux_dir/install-sh -c"
3426    break
3427  elif test -f "$ac_dir/install.sh"; then
3428    ac_aux_dir=$ac_dir
3429    ac_install_sh="$ac_aux_dir/install.sh -c"
3430    break
3431  elif test -f "$ac_dir/shtool"; then
3432    ac_aux_dir=$ac_dir
3433    ac_install_sh="$ac_aux_dir/shtool install -c"
3434    break
3435  fi
3436done
3437if test -z "$ac_aux_dir"; then
3438  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
3439fi
3440
3441# These three variables are undocumented and unsupported,
3442# and are intended to be withdrawn in a future Autoconf release.
3443# They can cause serious problems if a builder's source tree is in a directory
3444# whose full name contains unusual characters.
3445ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3446ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3447ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3448
3449
3450# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3451
3452#
3453# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3454# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3455#
3456# This code is free software; you can redistribute it and/or modify it
3457# under the terms of the GNU General Public License version 2 only, as
3458# published by the Free Software Foundation.  Oracle designates this
3459# particular file as subject to the "Classpath" exception as provided
3460# by Oracle in the LICENSE file that accompanied this code.
3461#
3462# This code is distributed in the hope that it will be useful, but WITHOUT
3463# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3464# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3465# version 2 for more details (a copy is included in the LICENSE file that
3466# accompanied this code).
3467#
3468# You should have received a copy of the GNU General Public License version
3469# 2 along with this work; if not, write to the Free Software Foundation,
3470# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3471#
3472# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3473# or visit www.oracle.com if you need additional information or have any
3474# questions.
3475#
3476
3477#
3478# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3479#
3480# This program is free software; you can redistribute it and/or modify
3481# it under the terms of the GNU General Public License as published by
3482# the Free Software Foundation; either version 2 of the License, or
3483# (at your option) any later version.
3484#
3485# This program is distributed in the hope that it will be useful, but
3486# WITHOUT ANY WARRANTY; without even the implied warranty of
3487# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3488# General Public License for more details.
3489#
3490# You should have received a copy of the GNU General Public License
3491# along with this program; if not, write to the Free Software
3492# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3493#
3494# As a special exception to the GNU General Public License, if you
3495# distribute this file as part of a program that contains a
3496# configuration script generated by Autoconf, you may include it under
3497# the same distribution terms that you use for the rest of that program.
3498
3499# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3500# ----------------------------------
3501# PKG_PROG_PKG_CONFIG
3502
3503# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3504#
3505# Check to see whether a particular set of modules exists.  Similar
3506# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3507#
3508#
3509# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3510# this or PKG_CHECK_MODULES is called, or make sure to call
3511# PKG_CHECK_EXISTS manually
3512# --------------------------------------------------------------
3513
3514
3515
3516# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3517# ---------------------------------------------
3518# _PKG_CONFIG
3519
3520# _PKG_SHORT_ERRORS_SUPPORTED
3521# -----------------------------
3522# _PKG_SHORT_ERRORS_SUPPORTED
3523
3524
3525# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3526# [ACTION-IF-NOT-FOUND])
3527#
3528#
3529# Note that if there is a possibility the first call to
3530# PKG_CHECK_MODULES might not happen, you should be sure to include an
3531# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3532#
3533#
3534# --------------------------------------------------------------
3535# PKG_CHECK_MODULES
3536
3537
3538# Include these first...
3539#
3540# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3541# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3542#
3543# This code is free software; you can redistribute it and/or modify it
3544# under the terms of the GNU General Public License version 2 only, as
3545# published by the Free Software Foundation.  Oracle designates this
3546# particular file as subject to the "Classpath" exception as provided
3547# by Oracle in the LICENSE file that accompanied this code.
3548#
3549# This code is distributed in the hope that it will be useful, but WITHOUT
3550# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3551# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3552# version 2 for more details (a copy is included in the LICENSE file that
3553# accompanied this code).
3554#
3555# You should have received a copy of the GNU General Public License version
3556# 2 along with this work; if not, write to the Free Software Foundation,
3557# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3558#
3559# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3560# or visit www.oracle.com if you need additional information or have any
3561# questions.
3562#
3563
3564# Create a function/macro that takes a series of named arguments. The call is
3565# similar to AC_DEFUN, but the setup of the function looks like this:
3566# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3567# ... do something
3568#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3569# ])
3570# A star (*) in front of a named argument means that it is required and it's
3571# presence will be verified. To pass e.g. the first value as a normal indexed
3572# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3573# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3574# "ARG_FOO".
3575#
3576# The generated function can be called like this:
3577# MYFUNC(FOO: [foo-val],
3578#     BAR: [
3579#         $ECHO hello world
3580#     ])
3581# Note that the argument value must start on the same line as the argument name.
3582#
3583# Argument 1: Name of the function to define
3584# Argument 2: List of legal named arguments, with a * prefix for required arguments
3585# Argument 3: Argument array to treat as named, typically $@
3586# Argument 4: The main function body
3587
3588
3589# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3590# If so, then append $1 to $2 \
3591# Also set JVM_ARG_OK to true/false depending on outcome.
3592
3593
3594# Appends a string to a path variable, only adding the : when needed.
3595
3596
3597# Prepends a string to a path variable, only adding the : when needed.
3598
3599
3600# This will make sure the given variable points to a full and proper
3601# path. This means:
3602# 1) There will be no spaces in the path. On unix platforms,
3603#    spaces in the path will result in an error. On Windows,
3604#    the path will be rewritten using short-style to be space-free.
3605# 2) The path will be absolute, and it will be in unix-style (on
3606#     cygwin).
3607# $1: The name of the variable to fix
3608
3609
3610# This will make sure the given variable points to a executable
3611# with a full and proper path. This means:
3612# 1) There will be no spaces in the path. On unix platforms,
3613#    spaces in the path will result in an error. On Windows,
3614#    the path will be rewritten using short-style to be space-free.
3615# 2) The path will be absolute, and it will be in unix-style (on
3616#     cygwin).
3617# Any arguments given to the executable is preserved.
3618# If the input variable does not have a directory specification, then
3619# it need to be in the PATH.
3620# $1: The name of the variable to fix
3621
3622
3623
3624
3625# Register a --with argument but mark it as deprecated
3626# $1: The name of the with argument to deprecate, not including --with-
3627
3628
3629# Register a --enable argument but mark it as deprecated
3630# $1: The name of the with argument to deprecate, not including --enable-
3631# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3632# $3: Messages to user.
3633
3634
3635
3636
3637# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3638# $1: variable to check
3639
3640
3641# Check that there are no unprocessed overridden variables left.
3642# If so, they are an incorrect argument and we will exit with an error.
3643
3644
3645# Setup a tool for the given variable. If correctly specified by the user,
3646# use that value, otherwise search for the tool using the supplied code snippet.
3647# $1: variable to set
3648# $2: code snippet to call to look for the tool
3649# $3: code snippet to call if variable was used to find tool
3650
3651
3652# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3653# $1: variable to set
3654# $2: executable name (or list of names) to look for
3655
3656
3657# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3658# $1: variable to set
3659# $2: executable name (or list of names) to look for
3660
3661
3662# Like BASIC_PATH_PROGS but fails if no tool was found.
3663# $1: variable to set
3664# $2: executable name (or list of names) to look for
3665
3666
3667# Like BASIC_SETUP_TOOL but fails if no tool was found.
3668# $1: variable to set
3669# $2: autoconf macro to call to look for the special tool
3670
3671
3672# Setup the most fundamental tools that relies on not much else to set up,
3673# but is used by much of the early bootstrap code.
3674
3675
3676# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3677
3678
3679# Evaluates platform specific overrides for devkit variables.
3680# $1: Name of variable
3681
3682
3683
3684
3685
3686
3687#%%% Simple tools %%%
3688
3689# Check if we have found a usable version of make
3690# $1: the path to a potential make binary (or empty)
3691# $2: the description on how we found this
3692
3693
3694
3695
3696# Goes looking for a usable version of GNU make.
3697
3698
3699
3700
3701
3702
3703
3704
3705# Check if build directory is on local disk. If not possible to determine,
3706# we prefer to claim it's local.
3707# Argument 1: directory to test
3708# Argument 2: what to do if it is on local disk
3709# Argument 3: what to do otherwise (remote disk or failure)
3710
3711
3712# Check that source files have basic read permissions set. This might
3713# not be the case in cygwin in certain conditions.
3714
3715
3716
3717
3718# Check for support for specific options in bash
3719
3720
3721################################################################################
3722#
3723# Default make target
3724#
3725
3726
3727# Code to run after AC_OUTPUT
3728
3729
3730#
3731# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3732# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3733#
3734# This code is free software; you can redistribute it and/or modify it
3735# under the terms of the GNU General Public License version 2 only, as
3736# published by the Free Software Foundation.  Oracle designates this
3737# particular file as subject to the "Classpath" exception as provided
3738# by Oracle in the LICENSE file that accompanied this code.
3739#
3740# This code is distributed in the hope that it will be useful, but WITHOUT
3741# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3742# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3743# version 2 for more details (a copy is included in the LICENSE file that
3744# accompanied this code).
3745#
3746# You should have received a copy of the GNU General Public License version
3747# 2 along with this work; if not, write to the Free Software Foundation,
3748# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3749#
3750# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3751# or visit www.oracle.com if you need additional information or have any
3752# questions.
3753#
3754
3755
3756
3757
3758
3759# Helper function which possibly converts a path using DOS-style short mode.
3760# If so, the updated path is stored in $new_path.
3761# $1: The path to check
3762
3763
3764# Helper function which possibly converts a path using DOS-style short mode.
3765# If so, the updated path is stored in $new_path.
3766# $1: The path to check
3767
3768
3769# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3770# and could probably be heavily simplified. However, all changes in this
3771# area tend to need lot of testing in different scenarios, and in lack of
3772# proper unit testing, cleaning this up has not been deemed worth the effort
3773# at the moment.
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3784
3785
3786
3787
3788# ... then the rest
3789#
3790# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3791# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3792#
3793# This code is free software; you can redistribute it and/or modify it
3794# under the terms of the GNU General Public License version 2 only, as
3795# published by the Free Software Foundation.  Oracle designates this
3796# particular file as subject to the "Classpath" exception as provided
3797# by Oracle in the LICENSE file that accompanied this code.
3798#
3799# This code is distributed in the hope that it will be useful, but WITHOUT
3800# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3801# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3802# version 2 for more details (a copy is included in the LICENSE file that
3803# accompanied this code).
3804#
3805# You should have received a copy of the GNU General Public License version
3806# 2 along with this work; if not, write to the Free Software Foundation,
3807# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3808#
3809# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3810# or visit www.oracle.com if you need additional information or have any
3811# questions.
3812#
3813
3814########################################################################
3815# This file handles detection of the Boot JDK. The Boot JDK detection
3816# process has been developed as a response to solve a complex real-world
3817# problem. Initially, it was simple, but it has grown as platform after
3818# platform, idiosyncracy after idiosyncracy has been supported.
3819#
3820# The basic idea is this:
3821# 1) You need an acceptable *) JDK to use as a Boot JDK
3822# 2) There are several ways to locate a JDK, that are mostly platform
3823#    dependent **)
3824# 3) You can have multiple JDKs installed
3825# 4) If possible, configure should try to dig out an acceptable JDK
3826#    automatically, without having to resort to command-line options
3827#
3828# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3829#     javac) and not a JRE, etc.
3830#
3831# **) On Windows we typically use a well-known path.
3832#     On MacOSX we typically use the tool java_home.
3833#     On Linux we typically find javac in the $PATH, and then follow a
3834#     chain of symlinks that often ends up in a real JDK.
3835#
3836# This leads to the code where we check in different ways to locate a
3837# JDK, and if one is found, check if it is acceptable. If not, we print
3838# our reasons for rejecting it (useful when debugging non-working
3839# configure situations) and continue checking the next one.
3840########################################################################
3841
3842# Execute the check given as argument, and verify the result
3843# If the Boot JDK was previously found, do nothing
3844# $1 A command line (typically autoconf macro) to execute
3845
3846
3847# Test: Is bootjdk explicitely set by command line arguments?
3848
3849
3850# Test: Is $JAVA_HOME set?
3851
3852
3853# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3854
3855
3856# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3857# $1: Argument to the java_home binary (optional)
3858
3859
3860# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3861
3862
3863# Look for a jdk in the given path. If there are multiple, try to select the newest.
3864# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3865# $1 = Path to directory containing jdk installations.
3866# $2 = String to append to the found JDK directory to get the proper JDK home
3867
3868
3869# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3870# environmental variable as base for where to look.
3871# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3872
3873
3874# Test: Is there a JDK installed in default, well-known locations?
3875
3876
3877# Check that a command-line tool in the Boot JDK is correct
3878# $1 = name of variable to assign
3879# $2 = name of binary
3880
3881
3882###############################################################################
3883#
3884# We need a Boot JDK to bootstrap the build.
3885#
3886
3887
3888
3889
3890
3891# BUILD_JDK: the location of the latest JDK that can run
3892#   on the host system and supports the target class file version
3893#   generated in this JDK build.  This variable should only be
3894#   used after the launchers are built.
3895#
3896
3897# Execute the check given as argument, and verify the result.
3898# If the JDK was previously found, do nothing.
3899# $1 A command line (typically autoconf macro) to execute
3900
3901
3902# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3903# is different than the host system doing the build (e.g. cross-compilation),
3904# a special BUILD_JDK is built as part of the build process.  An external
3905# prebuilt BUILD_JDK can also be supplied.
3906
3907
3908#
3909# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3910# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3911#
3912# This code is free software; you can redistribute it and/or modify it
3913# under the terms of the GNU General Public License version 2 only, as
3914# published by the Free Software Foundation.  Oracle designates this
3915# particular file as subject to the "Classpath" exception as provided
3916# by Oracle in the LICENSE file that accompanied this code.
3917#
3918# This code is distributed in the hope that it will be useful, but WITHOUT
3919# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3920# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3921# version 2 for more details (a copy is included in the LICENSE file that
3922# accompanied this code).
3923#
3924# You should have received a copy of the GNU General Public License version
3925# 2 along with this work; if not, write to the Free Software Foundation,
3926# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3927#
3928# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3929# or visit www.oracle.com if you need additional information or have any
3930# questions.
3931#
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949################################################################################
3950#
3951# Runs icecc-create-env once and prints the error if it fails
3952#
3953# $1: arguments to icecc-create-env
3954# $2: log file
3955#
3956
3957
3958################################################################################
3959#
3960# Optionally enable distributed compilation of native code using icecc/icecream
3961#
3962
3963
3964
3965
3966
3967
3968
3969#
3970# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3971# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3972#
3973# This code is free software; you can redistribute it and/or modify it
3974# under the terms of the GNU General Public License version 2 only, as
3975# published by the Free Software Foundation.  Oracle designates this
3976# particular file as subject to the "Classpath" exception as provided
3977# by Oracle in the LICENSE file that accompanied this code.
3978#
3979# This code is distributed in the hope that it will be useful, but WITHOUT
3980# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3981# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3982# version 2 for more details (a copy is included in the LICENSE file that
3983# accompanied this code).
3984#
3985# You should have received a copy of the GNU General Public License version
3986# 2 along with this work; if not, write to the Free Software Foundation,
3987# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3988#
3989# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3990# or visit www.oracle.com if you need additional information or have any
3991# questions.
3992#
3993
3994# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3995# corresponding configure arguments instead
3996
3997
3998# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3999# that configure can use them while detecting compilers.
4000# TOOLCHAIN_TYPE is available here.
4001# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4002
4003
4004
4005
4006
4007
4008# Documentation on common flags used for solstudio in HIGHEST.
4009#
4010# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4011#          done with care, there are some assumptions below that need to
4012#          be understood about the use of pointers, and IEEE behavior.
4013#
4014# -fns: Use non-standard floating point mode (not IEEE 754)
4015# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4016# -fsingle: Use single precision floating point with 'float'
4017# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4018#   (Source with excessing pointer casting and data access with mixed
4019#    pointer types are not recommended)
4020# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4021#   (If you expect perfect errno behavior, do not use this)
4022# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4023# -xrestrict: Pointer parameters to functions do not overlap
4024#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4025#    If you pass in multiple pointers to the same data, do not use this)
4026# -xlibmil: Inline some library routines
4027#   (If you expect perfect errno behavior, do not use this)
4028# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4029#   (If you expect perfect errno behavior, do not use this)
4030#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4031
4032    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4033    # Bug?
4034    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4035    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4036    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4037    #fi
4038
4039
4040
4041
4042
4043
4044################################################################################
4045# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4046#      conditionals against.
4047# $2 - Optional prefix for each variable defined.
4048
4049
4050# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4051#                                  IF_FALSE: [RUN-IF-FALSE])
4052# ------------------------------------------------------------
4053# Check that the C compiler supports an argument
4054
4055
4056
4057
4058# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4059#                                    IF_FALSE: [RUN-IF-FALSE])
4060# ------------------------------------------------------------
4061# Check that the C++ compiler supports an argument
4062
4063
4064
4065
4066# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4067#                                IF_FALSE: [RUN-IF-FALSE])
4068# ------------------------------------------------------------
4069# Check that the C and C++ compilers support an argument
4070
4071
4072
4073
4074# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4075#                                   IF_FALSE: [RUN-IF-FALSE])
4076# ------------------------------------------------------------
4077# Check that the linker support an argument
4078
4079
4080
4081
4082
4083
4084
4085
4086#
4087# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4088# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4089#
4090# This code is free software; you can redistribute it and/or modify it
4091# under the terms of the GNU General Public License version 2 only, as
4092# published by the Free Software Foundation.  Oracle designates this
4093# particular file as subject to the "Classpath" exception as provided
4094# by Oracle in the LICENSE file that accompanied this code.
4095#
4096# This code is distributed in the hope that it will be useful, but WITHOUT
4097# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4098# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4099# version 2 for more details (a copy is included in the LICENSE file that
4100# accompanied this code).
4101#
4102# You should have received a copy of the GNU General Public License version
4103# 2 along with this work; if not, write to the Free Software Foundation,
4104# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4105#
4106# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4107# or visit www.oracle.com if you need additional information or have any
4108# questions.
4109#
4110
4111
4112
4113
4114
4115cygwin_help() {
4116  case $1 in
4117    unzip)
4118      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4119      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4120      ;;
4121    zip)
4122      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4123      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4124      ;;
4125    make)
4126      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4127      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4128      ;;
4129    freetype)
4130      HELP_MSG="
4131The freetype library can now be build during the configure process.
4132Download the freetype sources and unpack them into an arbitrary directory:
4133
4134wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4135tar -xzf freetype-2.5.3.tar.gz
4136
4137Then run configure with '--with-freetype-src=<freetype_src>'. This will
4138automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4139builds or into '<freetype_src>/lib32' for 32-bit builds.
4140Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4141and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4142
4143Alternatively you can unpack the sources like this to use the default directory:
4144
4145tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4146      ;;
4147  esac
4148}
4149
4150msys_help() {
4151  PKGHANDLER_COMMAND=""
4152}
4153
4154apt_help() {
4155  case $1 in
4156    reduced)
4157      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4158    devkit)
4159      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4160    openjdk)
4161      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4162    alsa)
4163      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4164    cups)
4165      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4166    freetype)
4167      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4168    ffi)
4169      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4170    x11)
4171      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4172    ccache)
4173      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4174    dtrace)
4175      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4176  esac
4177}
4178
4179yum_help() {
4180  case $1 in
4181    devkit)
4182      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4183    openjdk)
4184      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4185    alsa)
4186      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4187    cups)
4188      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4189    freetype)
4190      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4191    x11)
4192      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4193    ccache)
4194      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4195  esac
4196}
4197
4198port_help() {
4199  PKGHANDLER_COMMAND=""
4200}
4201
4202pkgutil_help() {
4203  PKGHANDLER_COMMAND=""
4204}
4205
4206pkgadd_help() {
4207  PKGHANDLER_COMMAND=""
4208}
4209
4210# This function will check if we're called from the "configure" wrapper while
4211# printing --help. If so, we will print out additional information that can
4212# only be extracted within the autoconf script, and then exit. This must be
4213# called at the very beginning in configure.ac.
4214
4215
4216
4217
4218
4219
4220#
4221# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4222# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4223#
4224# This code is free software; you can redistribute it and/or modify it
4225# under the terms of the GNU General Public License version 2 only, as
4226# published by the Free Software Foundation.  Oracle designates this
4227# particular file as subject to the "Classpath" exception as provided
4228# by Oracle in the LICENSE file that accompanied this code.
4229#
4230# This code is distributed in the hope that it will be useful, but WITHOUT
4231# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4232# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4233# version 2 for more details (a copy is included in the LICENSE file that
4234# accompanied this code).
4235#
4236# You should have received a copy of the GNU General Public License version
4237# 2 along with this work; if not, write to the Free Software Foundation,
4238# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4239#
4240# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4241# or visit www.oracle.com if you need additional information or have any
4242# questions.
4243#
4244
4245# All valid JVM features, regardless of platform
4246VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4247    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4248
4249# All valid JVM variants
4250VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4251
4252###############################################################################
4253# Check if the specified JVM variant should be built. To be used in shell if
4254# constructs, like this:
4255# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4256#
4257# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4258
4259# Definition kept in one line to allow inlining in if statements.
4260# Additional [] needed to keep m4 from mangling shell constructs.
4261
4262
4263###############################################################################
4264# Check if the specified JVM features are explicitly enabled. To be used in
4265# shell if constructs, like this:
4266# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4267#
4268# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4269
4270# Definition kept in one line to allow inlining in if statements.
4271# Additional [] needed to keep m4 from mangling shell constructs.
4272
4273
4274###############################################################################
4275# Check which variants of the JVM that we want to build. Available variants are:
4276#   server: normal interpreter, and a tiered C1/C2 compiler
4277#   client: normal interpreter, and C1 (no C2 compiler)
4278#   minimal: reduced form of client with optional features stripped out
4279#   core: normal interpreter only, no compiler
4280#   zero: C++ based interpreter only, no compiler
4281#   zeroshark: C++ based interpreter, and a llvm-based compiler
4282#   custom: baseline JVM with no default features
4283#
4284
4285
4286###############################################################################
4287# Check if dtrace should be enabled and has all prerequisites present.
4288#
4289
4290
4291###############################################################################
4292# Set up all JVM features for each JVM variant.
4293#
4294
4295
4296###############################################################################
4297# Validate JVM features once all setup is complete, including custom setup.
4298#
4299
4300
4301#
4302# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4303# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4304#
4305# This code is free software; you can redistribute it and/or modify it
4306# under the terms of the GNU General Public License version 2 only, as
4307# published by the Free Software Foundation.  Oracle designates this
4308# particular file as subject to the "Classpath" exception as provided
4309# by Oracle in the LICENSE file that accompanied this code.
4310#
4311# This code is distributed in the hope that it will be useful, but WITHOUT
4312# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4313# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4314# version 2 for more details (a copy is included in the LICENSE file that
4315# accompanied this code).
4316#
4317# You should have received a copy of the GNU General Public License version
4318# 2 along with this work; if not, write to the Free Software Foundation,
4319# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4320#
4321# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4322# or visit www.oracle.com if you need additional information or have any
4323# questions.
4324#
4325
4326###############################################################################
4327# Check which variant of the JDK that we want to build.
4328# Currently we have:
4329#    normal:   standard edition
4330# but the custom make system may add other variants
4331#
4332# Effectively the JDK variant gives a name to a specific set of
4333# modules to compile into the JDK.
4334
4335
4336###############################################################################
4337# Set the debug level
4338#    release: no debug information, all optimizations, no asserts.
4339#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4340#    fastdebug: debug information (-g), all optimizations, all asserts
4341#    slowdebug: debug information (-g), no optimizations, all asserts
4342
4343
4344###############################################################################
4345#
4346# Should we build only OpenJDK even if closed sources are present?
4347#
4348
4349
4350
4351
4352###############################################################################
4353#
4354# Enable or disable the elliptic curve crypto implementation
4355#
4356
4357
4358
4359
4360################################################################################
4361#
4362# Gcov coverage data for hotspot
4363#
4364
4365
4366################################################################################
4367#
4368# Static build support.  When enabled will generate static
4369# libraries instead of shared libraries for all JDK libs.
4370#
4371
4372
4373################################################################################
4374#
4375# jlink options.
4376# We always keep packaged modules in JDK image.
4377#
4378
4379
4380################################################################################
4381#
4382# Check if building of the jtreg failure handler should be enabled.
4383#
4384
4385
4386#
4387# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4388# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4389#
4390# This code is free software; you can redistribute it and/or modify it
4391# under the terms of the GNU General Public License version 2 only, as
4392# published by the Free Software Foundation.  Oracle designates this
4393# particular file as subject to the "Classpath" exception as provided
4394# by Oracle in the LICENSE file that accompanied this code.
4395#
4396# This code is distributed in the hope that it will be useful, but WITHOUT
4397# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4398# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4399# version 2 for more details (a copy is included in the LICENSE file that
4400# accompanied this code).
4401#
4402# You should have received a copy of the GNU General Public License version
4403# 2 along with this work; if not, write to the Free Software Foundation,
4404# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4405#
4406# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4407# or visit www.oracle.com if you need additional information or have any
4408# questions.
4409#
4410
4411###############################################################################
4412#
4413# Setup version numbers
4414#
4415
4416# Verify that a given string represents a valid version number, and assign it
4417# to a variable.
4418
4419# Argument 1: the variable to assign to
4420# Argument 2: the value given by the user
4421
4422
4423
4424
4425#
4426# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4427# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4428#
4429# This code is free software; you can redistribute it and/or modify it
4430# under the terms of the GNU General Public License version 2 only, as
4431# published by the Free Software Foundation.  Oracle designates this
4432# particular file as subject to the "Classpath" exception as provided
4433# by Oracle in the LICENSE file that accompanied this code.
4434#
4435# This code is distributed in the hope that it will be useful, but WITHOUT
4436# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4437# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4438# version 2 for more details (a copy is included in the LICENSE file that
4439# accompanied this code).
4440#
4441# You should have received a copy of the GNU General Public License version
4442# 2 along with this work; if not, write to the Free Software Foundation,
4443# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4444#
4445# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4446# or visit www.oracle.com if you need additional information or have any
4447# questions.
4448#
4449
4450# Major library component reside in separate files.
4451#
4452# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4453# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4454#
4455# This code is free software; you can redistribute it and/or modify it
4456# under the terms of the GNU General Public License version 2 only, as
4457# published by the Free Software Foundation.  Oracle designates this
4458# particular file as subject to the "Classpath" exception as provided
4459# by Oracle in the LICENSE file that accompanied this code.
4460#
4461# This code is distributed in the hope that it will be useful, but WITHOUT
4462# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4463# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4464# version 2 for more details (a copy is included in the LICENSE file that
4465# accompanied this code).
4466#
4467# You should have received a copy of the GNU General Public License version
4468# 2 along with this work; if not, write to the Free Software Foundation,
4469# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4470#
4471# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4472# or visit www.oracle.com if you need additional information or have any
4473# questions.
4474#
4475
4476################################################################################
4477# Setup alsa (Advanced Linux Sound Architecture)
4478################################################################################
4479
4480
4481#
4482# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4483# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4484#
4485# This code is free software; you can redistribute it and/or modify it
4486# under the terms of the GNU General Public License version 2 only, as
4487# published by the Free Software Foundation.  Oracle designates this
4488# particular file as subject to the "Classpath" exception as provided
4489# by Oracle in the LICENSE file that accompanied this code.
4490#
4491# This code is distributed in the hope that it will be useful, but WITHOUT
4492# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4493# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4494# version 2 for more details (a copy is included in the LICENSE file that
4495# accompanied this code).
4496#
4497# You should have received a copy of the GNU General Public License version
4498# 2 along with this work; if not, write to the Free Software Foundation,
4499# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4500#
4501# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4502# or visit www.oracle.com if you need additional information or have any
4503# questions.
4504#
4505
4506################################################################################
4507# Setup bundled libraries.
4508#
4509# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4510# OpenJDK repository. Default is to use these libraries as bundled, but they
4511# might be replaced by en external version by the user.
4512################################################################################
4513
4514
4515################################################################################
4516# Setup libjpeg
4517################################################################################
4518
4519
4520################################################################################
4521# Setup giflib
4522################################################################################
4523
4524
4525################################################################################
4526# Setup libpng
4527################################################################################
4528
4529
4530################################################################################
4531# Setup zlib
4532################################################################################
4533
4534
4535################################################################################
4536# Setup lcms (Little CMS)
4537################################################################################
4538
4539
4540#
4541# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4542# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4543#
4544# This code is free software; you can redistribute it and/or modify it
4545# under the terms of the GNU General Public License version 2 only, as
4546# published by the Free Software Foundation.  Oracle designates this
4547# particular file as subject to the "Classpath" exception as provided
4548# by Oracle in the LICENSE file that accompanied this code.
4549#
4550# This code is distributed in the hope that it will be useful, but WITHOUT
4551# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4552# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4553# version 2 for more details (a copy is included in the LICENSE file that
4554# accompanied this code).
4555#
4556# You should have received a copy of the GNU General Public License version
4557# 2 along with this work; if not, write to the Free Software Foundation,
4558# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4559#
4560# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4561# or visit www.oracle.com if you need additional information or have any
4562# questions.
4563#
4564
4565################################################################################
4566# Setup cups (Common Unix Printing System)
4567################################################################################
4568
4569
4570#
4571# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4572# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4573#
4574# This code is free software; you can redistribute it and/or modify it
4575# under the terms of the GNU General Public License version 2 only, as
4576# published by the Free Software Foundation.  Oracle designates this
4577# particular file as subject to the "Classpath" exception as provided
4578# by Oracle in the LICENSE file that accompanied this code.
4579#
4580# This code is distributed in the hope that it will be useful, but WITHOUT
4581# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4582# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4583# version 2 for more details (a copy is included in the LICENSE file that
4584# accompanied this code).
4585#
4586# You should have received a copy of the GNU General Public License version
4587# 2 along with this work; if not, write to the Free Software Foundation,
4588# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4589#
4590# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4591# or visit www.oracle.com if you need additional information or have any
4592# questions.
4593#
4594
4595################################################################################
4596# Setup libffi (Foreign Function Interface)
4597################################################################################
4598
4599
4600#
4601# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4602# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4603#
4604# This code is free software; you can redistribute it and/or modify it
4605# under the terms of the GNU General Public License version 2 only, as
4606# published by the Free Software Foundation.  Oracle designates this
4607# particular file as subject to the "Classpath" exception as provided
4608# by Oracle in the LICENSE file that accompanied this code.
4609#
4610# This code is distributed in the hope that it will be useful, but WITHOUT
4611# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4612# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4613# version 2 for more details (a copy is included in the LICENSE file that
4614# accompanied this code).
4615#
4616# You should have received a copy of the GNU General Public License version
4617# 2 along with this work; if not, write to the Free Software Foundation,
4618# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4619#
4620# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4621# or visit www.oracle.com if you need additional information or have any
4622# questions.
4623#
4624
4625################################################################################
4626# Build the freetype lib from source
4627################################################################################
4628
4629
4630################################################################################
4631# Check if a potential freeype library match is correct and usable
4632################################################################################
4633
4634
4635################################################################################
4636# Setup freetype (The FreeType2 font rendering library)
4637################################################################################
4638
4639
4640#
4641# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4642# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4643#
4644# This code is free software; you can redistribute it and/or modify it
4645# under the terms of the GNU General Public License version 2 only, as
4646# published by the Free Software Foundation.  Oracle designates this
4647# particular file as subject to the "Classpath" exception as provided
4648# by Oracle in the LICENSE file that accompanied this code.
4649#
4650# This code is distributed in the hope that it will be useful, but WITHOUT
4651# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4652# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4653# version 2 for more details (a copy is included in the LICENSE file that
4654# accompanied this code).
4655#
4656# You should have received a copy of the GNU General Public License version
4657# 2 along with this work; if not, write to the Free Software Foundation,
4658# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4659#
4660# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4661# or visit www.oracle.com if you need additional information or have any
4662# questions.
4663#
4664
4665################################################################################
4666# Setup the standard C/C++ runtime libraries.
4667#
4668# Most importantly, determine if stdc++ should be linked statically or
4669# dynamically.
4670################################################################################
4671
4672
4673#
4674# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4675# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4676#
4677# This code is free software; you can redistribute it and/or modify it
4678# under the terms of the GNU General Public License version 2 only, as
4679# published by the Free Software Foundation.  Oracle designates this
4680# particular file as subject to the "Classpath" exception as provided
4681# by Oracle in the LICENSE file that accompanied this code.
4682#
4683# This code is distributed in the hope that it will be useful, but WITHOUT
4684# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4685# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4686# version 2 for more details (a copy is included in the LICENSE file that
4687# accompanied this code).
4688#
4689# You should have received a copy of the GNU General Public License version
4690# 2 along with this work; if not, write to the Free Software Foundation,
4691# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4692#
4693# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4694# or visit www.oracle.com if you need additional information or have any
4695# questions.
4696#
4697
4698################################################################################
4699# Setup X11 Windows system
4700################################################################################
4701
4702
4703
4704################################################################################
4705# Determine which libraries are needed for this configuration
4706################################################################################
4707
4708
4709################################################################################
4710# Parse library options, and setup needed libraries
4711################################################################################
4712
4713
4714################################################################################
4715# Setup llvm (Low-Level VM)
4716################################################################################
4717
4718
4719################################################################################
4720# Setup various libraries, typically small system libraries
4721################################################################################
4722
4723
4724################################################################################
4725# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4726# redistribute it in the test image.
4727################################################################################
4728
4729
4730
4731#
4732# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4733# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4734#
4735# This code is free software; you can redistribute it and/or modify it
4736# under the terms of the GNU General Public License version 2 only, as
4737# published by the Free Software Foundation.  Oracle designates this
4738# particular file as subject to the "Classpath" exception as provided
4739# by Oracle in the LICENSE file that accompanied this code.
4740#
4741# This code is distributed in the hope that it will be useful, but WITHOUT
4742# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4743# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4744# version 2 for more details (a copy is included in the LICENSE file that
4745# accompanied this code).
4746#
4747# You should have received a copy of the GNU General Public License version
4748# 2 along with this work; if not, write to the Free Software Foundation,
4749# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4750#
4751# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4752# or visit www.oracle.com if you need additional information or have any
4753# questions.
4754#
4755
4756# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4757# Converts autoconf style CPU name to OpenJDK style, into
4758# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4759
4760
4761# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4762# Converts autoconf style OS name to OpenJDK style, into
4763# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4764
4765
4766# Expects $host_os $host_cpu $build_os and $build_cpu
4767# and $with_target_bits to have been setup!
4768#
4769# Translate the standard triplet(quadruplet) definition
4770# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4771# OPENJDK_BUILD_OS, etc.
4772
4773
4774# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4775# accordingly. Must be done after setting up build and target system, but before
4776# doing anything else with these values.
4777
4778
4779# Setup the legacy variables, for controlling the old makefiles.
4780#
4781
4782
4783# $1 - Either TARGET or BUILD to setup the variables for.
4784
4785
4786
4787
4788#%%% Build and target systems %%%
4789
4790
4791
4792
4793# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4794# Add -mX to various FLAGS variables.
4795
4796
4797
4798
4799
4800
4801#
4802# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4803# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4804#
4805# This code is free software; you can redistribute it and/or modify it
4806# under the terms of the GNU General Public License version 2 only, as
4807# published by the Free Software Foundation.  Oracle designates this
4808# particular file as subject to the "Classpath" exception as provided
4809# by Oracle in the LICENSE file that accompanied this code.
4810#
4811# This code is distributed in the hope that it will be useful, but WITHOUT
4812# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4813# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4814# version 2 for more details (a copy is included in the LICENSE file that
4815# accompanied this code).
4816#
4817# You should have received a copy of the GNU General Public License version
4818# 2 along with this work; if not, write to the Free Software Foundation,
4819# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4820#
4821# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4822# or visit www.oracle.com if you need additional information or have any
4823# questions.
4824#
4825
4826
4827
4828
4829
4830
4831
4832################################################################################
4833# Define a mechanism for importing extra prebuilt modules
4834#
4835
4836
4837
4838#
4839# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4840# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4841#
4842# This code is free software; you can redistribute it and/or modify it
4843# under the terms of the GNU General Public License version 2 only, as
4844# published by the Free Software Foundation.  Oracle designates this
4845# particular file as subject to the "Classpath" exception as provided
4846# by Oracle in the LICENSE file that accompanied this code.
4847#
4848# This code is distributed in the hope that it will be useful, but WITHOUT
4849# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4850# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4851# version 2 for more details (a copy is included in the LICENSE file that
4852# accompanied this code).
4853#
4854# You should have received a copy of the GNU General Public License version
4855# 2 along with this work; if not, write to the Free Software Foundation,
4856# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4857#
4858# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4859# or visit www.oracle.com if you need additional information or have any
4860# questions.
4861#
4862
4863########################################################################
4864# This file is responsible for detecting, verifying and setting up the
4865# toolchain, i.e. the compiler, linker and related utilities. It will setup
4866# proper paths to the binaries, but it will not setup any flags.
4867#
4868# The binaries used is determined by the toolchain type, which is the family of
4869# compilers and related tools that are used.
4870########################################################################
4871
4872
4873# All valid toolchains, regardless of platform (used by help.m4)
4874VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4875
4876# These toolchains are valid on different platforms
4877VALID_TOOLCHAINS_linux="gcc clang"
4878VALID_TOOLCHAINS_solaris="solstudio"
4879VALID_TOOLCHAINS_macosx="gcc clang"
4880VALID_TOOLCHAINS_aix="xlc"
4881VALID_TOOLCHAINS_windows="microsoft"
4882
4883# Toolchain descriptions
4884TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4885TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4886TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4887TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4888TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4889
4890# Minimum supported versions, empty means unspecified
4891TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4892TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4893TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4894TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4895TOOLCHAIN_MINIMUM_VERSION_xlc=""
4896
4897# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4898# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4899# $1 - optional variable prefix for compiler and version variables (BUILD_)
4900# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4901
4902
4903# Check if the configured compiler (C and C++) is of a specific version or
4904# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4905#
4906# Arguments:
4907#   VERSION:   The version string to check against the found version
4908#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4909#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4910#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4911
4912
4913
4914
4915# Setup a number of variables describing how native output files are
4916# named on this platform/toolchain.
4917
4918
4919# Determine which toolchain type to use, and make sure it is valid for this
4920# platform. Setup various information about the selected toolchain.
4921
4922
4923# Before we start detecting the toolchain executables, we might need some
4924# special setup, e.g. additional paths etc.
4925
4926
4927# Restore path, etc
4928
4929
4930# Check if a compiler is of the toolchain type we expect, and save the version
4931# information from it. If the compiler does not match the expected type,
4932# this function will abort using AC_MSG_ERROR. If it matches, the version will
4933# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4934# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4935#
4936# $1 = compiler to test (CC or CXX)
4937# $2 = human readable name of compiler (C or C++)
4938
4939
4940# Try to locate the given C or C++ compiler in the path, or otherwise.
4941#
4942# $1 = compiler to test (CC or CXX)
4943# $2 = human readable name of compiler (C or C++)
4944# $3 = list of compiler names to search for
4945
4946
4947# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4948# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4949# archiver (AR). Verify that the compilers are correct according to the
4950# toolchain type.
4951
4952
4953# Setup additional tools that is considered a part of the toolchain, but not the
4954# core part. Many of these are highly platform-specific and do not exist,
4955# and/or are not needed on all platforms.
4956
4957
4958# Setup the build tools (i.e, the compiler and linker used to build programs
4959# that should be run on the build platform, not the target platform, as a build
4960# helper). Since the non-cross-compile case uses the normal, target compilers
4961# for this, we can only do this after these have been setup.
4962
4963
4964# Setup legacy variables that are still needed as alternative ways to refer to
4965# parts of the toolchain.
4966
4967
4968# Do some additional checks on the detected tools.
4969
4970
4971# Setup the JTReg Regression Test Harness.
4972
4973
4974#
4975# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4976# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4977#
4978# This code is free software; you can redistribute it and/or modify it
4979# under the terms of the GNU General Public License version 2 only, as
4980# published by the Free Software Foundation.  Oracle designates this
4981# particular file as subject to the "Classpath" exception as provided
4982# by Oracle in the LICENSE file that accompanied this code.
4983#
4984# This code is distributed in the hope that it will be useful, but WITHOUT
4985# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4986# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4987# version 2 for more details (a copy is included in the LICENSE file that
4988# accompanied this code).
4989#
4990# You should have received a copy of the GNU General Public License version
4991# 2 along with this work; if not, write to the Free Software Foundation,
4992# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4993#
4994# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4995# or visit www.oracle.com if you need additional information or have any
4996# questions.
4997#
4998
4999################################################################################
5000# The order of these defines the priority by which we try to find them.
5001VALID_VS_VERSIONS="2013 2012 2010"
5002
5003VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5004VS_VERSION_INTERNAL_2010=100
5005VS_MSVCR_2010=msvcr100.dll
5006# We don't use msvcp on Visual Studio 2010
5007#VS_MSVCP_2010=msvcp100.dll
5008VS_ENVVAR_2010="VS100COMNTOOLS"
5009VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5010VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5011VS_VS_PLATFORM_NAME_2010="v100"
5012VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5013
5014VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5015VS_VERSION_INTERNAL_2012=110
5016VS_MSVCR_2012=msvcr110.dll
5017VS_MSVCP_2012=msvcp110.dll
5018VS_ENVVAR_2012="VS110COMNTOOLS"
5019VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5020VS_SDK_INSTALLDIR_2012=
5021VS_VS_PLATFORM_NAME_2012="v110"
5022VS_SDK_PLATFORM_NAME_2012=
5023
5024VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5025VS_VERSION_INTERNAL_2013=120
5026VS_MSVCR_2013=msvcr120.dll
5027VS_MSVCP_2013=msvcp120.dll
5028VS_ENVVAR_2013="VS120COMNTOOLS"
5029VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5030VS_SDK_INSTALLDIR_2013=
5031VS_VS_PLATFORM_NAME_2013="v120"
5032VS_SDK_PLATFORM_NAME_2013=
5033
5034################################################################################
5035
5036
5037
5038################################################################################
5039
5040
5041
5042################################################################################
5043# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5044# build environment and assigns it to VS_ENV_CMD
5045
5046
5047################################################################################
5048
5049
5050
5051################################################################################
5052# Check if the VS env variables were setup prior to running configure.
5053# If not, then find vcvarsall.bat and run it automatically, and integrate
5054# the set env variables into the spec file.
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069# This line needs to be here, verbatim, after all includes and the dummy hook
5070# definitions. It is replaced with custom functionality when building
5071# custom sources.
5072#CUSTOM_AUTOCONF_INCLUDE
5073
5074# Do not change or remove the following line, it is needed for consistency checks:
5075DATE_WHEN_GENERATED=1463500649
5076
5077###############################################################################
5078#
5079# Initialization / Boot-strapping
5080#
5081# The bootstrapping process needs to solve the "chicken or the egg" problem,
5082# thus it jumps back and forth, each time gaining something needed later on.
5083#
5084###############################################################################
5085
5086# If we are requested to print additional help, do that and then exit.
5087# This must be the very first call.
5088
5089  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5090
5091    # Print available toolchains
5092    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5093    $PRINTF "Which are valid to use depends on the build platform.\n"
5094    for toolchain in $VALID_TOOLCHAINS_all; do
5095      # Use indirect variable referencing
5096      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5097      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5098      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5099    done
5100    $PRINTF "\n"
5101
5102    # Print available jvm features
5103    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5104    $PRINTF "Which are valid to use depends on the target platform.\n  "
5105    $PRINTF "%s " $VALID_JVM_FEATURES
5106    $PRINTF "\n"
5107
5108    # And now exit directly
5109    exit 0
5110  fi
5111
5112
5113# Basic initialization that must happen first of all in the normal process.
5114
5115  # Save the original command line. This is passed to us by the wrapper configure script.
5116
5117  # Save the path variable before it gets changed
5118  ORIGINAL_PATH="$PATH"
5119
5120  DATE_WHEN_CONFIGURED=`LANG=C date`
5121
5122  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5123$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5124  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5125$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5126
5127
5128  # Start with tools that do not need have cross compilation support
5129  # and can be expected to be found in the default PATH. These tools are
5130  # used by configure.
5131
5132  # First are all the simple required tools.
5133
5134
5135
5136  # Publish this variable in the help.
5137
5138
5139  if [ -z "${BASENAME+x}" ]; then
5140    # The variable is not set by user, try to locate tool using the code snippet
5141    for ac_prog in basename
5142do
5143  # Extract the first word of "$ac_prog", so it can be a program name with args.
5144set dummy $ac_prog; ac_word=$2
5145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5146$as_echo_n "checking for $ac_word... " >&6; }
5147if ${ac_cv_path_BASENAME+:} false; then :
5148  $as_echo_n "(cached) " >&6
5149else
5150  case $BASENAME in
5151  [\\/]* | ?:[\\/]*)
5152  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5153  ;;
5154  *)
5155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156for as_dir in $PATH
5157do
5158  IFS=$as_save_IFS
5159  test -z "$as_dir" && as_dir=.
5160    for ac_exec_ext in '' $ac_executable_extensions; do
5161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5162    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5164    break 2
5165  fi
5166done
5167  done
5168IFS=$as_save_IFS
5169
5170  ;;
5171esac
5172fi
5173BASENAME=$ac_cv_path_BASENAME
5174if test -n "$BASENAME"; then
5175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5176$as_echo "$BASENAME" >&6; }
5177else
5178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179$as_echo "no" >&6; }
5180fi
5181
5182
5183  test -n "$BASENAME" && break
5184done
5185
5186  else
5187    # The variable is set, but is it from the command line or the environment?
5188
5189    # Try to remove the string !BASENAME! from our list.
5190    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5191    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5192      # If it failed, the variable was not from the command line. Ignore it,
5193      # but warn the user (except for BASH, which is always set by the calling BASH).
5194      if test "xBASENAME" != xBASH; then
5195        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5196$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5197      fi
5198      # Try to locate tool using the code snippet
5199      for ac_prog in basename
5200do
5201  # Extract the first word of "$ac_prog", so it can be a program name with args.
5202set dummy $ac_prog; ac_word=$2
5203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5204$as_echo_n "checking for $ac_word... " >&6; }
5205if ${ac_cv_path_BASENAME+:} false; then :
5206  $as_echo_n "(cached) " >&6
5207else
5208  case $BASENAME in
5209  [\\/]* | ?:[\\/]*)
5210  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5211  ;;
5212  *)
5213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5214for as_dir in $PATH
5215do
5216  IFS=$as_save_IFS
5217  test -z "$as_dir" && as_dir=.
5218    for ac_exec_ext in '' $ac_executable_extensions; do
5219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5220    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5222    break 2
5223  fi
5224done
5225  done
5226IFS=$as_save_IFS
5227
5228  ;;
5229esac
5230fi
5231BASENAME=$ac_cv_path_BASENAME
5232if test -n "$BASENAME"; then
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5234$as_echo "$BASENAME" >&6; }
5235else
5236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5237$as_echo "no" >&6; }
5238fi
5239
5240
5241  test -n "$BASENAME" && break
5242done
5243
5244    else
5245      # If it succeeded, then it was overridden by the user. We will use it
5246      # for the tool.
5247
5248      # First remove it from the list of overridden variables, so we can test
5249      # for unknown variables in the end.
5250      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5251
5252      # Check if we try to supply an empty value
5253      if test "x$BASENAME" = x; then
5254        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5255$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5257$as_echo_n "checking for BASENAME... " >&6; }
5258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5259$as_echo "disabled" >&6; }
5260      else
5261        # Check if the provided tool contains a complete path.
5262        tool_specified="$BASENAME"
5263        tool_basename="${tool_specified##*/}"
5264        if test "x$tool_basename" = "x$tool_specified"; then
5265          # A command without a complete path is provided, search $PATH.
5266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5267$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5268          # Extract the first word of "$tool_basename", so it can be a program name with args.
5269set dummy $tool_basename; ac_word=$2
5270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5271$as_echo_n "checking for $ac_word... " >&6; }
5272if ${ac_cv_path_BASENAME+:} false; then :
5273  $as_echo_n "(cached) " >&6
5274else
5275  case $BASENAME in
5276  [\\/]* | ?:[\\/]*)
5277  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5278  ;;
5279  *)
5280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5281for as_dir in $PATH
5282do
5283  IFS=$as_save_IFS
5284  test -z "$as_dir" && as_dir=.
5285    for ac_exec_ext in '' $ac_executable_extensions; do
5286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5287    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5289    break 2
5290  fi
5291done
5292  done
5293IFS=$as_save_IFS
5294
5295  ;;
5296esac
5297fi
5298BASENAME=$ac_cv_path_BASENAME
5299if test -n "$BASENAME"; then
5300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5301$as_echo "$BASENAME" >&6; }
5302else
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5304$as_echo "no" >&6; }
5305fi
5306
5307
5308          if test "x$BASENAME" = x; then
5309            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5310          fi
5311        else
5312          # Otherwise we believe it is a complete path. Use it as it is.
5313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5314$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5315          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5316$as_echo_n "checking for BASENAME... " >&6; }
5317          if test ! -x "$tool_specified"; then
5318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5319$as_echo "not found" >&6; }
5320            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5321          fi
5322          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5323$as_echo "$tool_specified" >&6; }
5324        fi
5325      fi
5326    fi
5327
5328  fi
5329
5330
5331
5332  if test "x$BASENAME" = x; then
5333    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5334  fi
5335
5336
5337
5338
5339
5340  # Publish this variable in the help.
5341
5342
5343  if [ -z "${BASH+x}" ]; then
5344    # The variable is not set by user, try to locate tool using the code snippet
5345    for ac_prog in bash
5346do
5347  # Extract the first word of "$ac_prog", so it can be a program name with args.
5348set dummy $ac_prog; ac_word=$2
5349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5350$as_echo_n "checking for $ac_word... " >&6; }
5351if ${ac_cv_path_BASH+:} false; then :
5352  $as_echo_n "(cached) " >&6
5353else
5354  case $BASH in
5355  [\\/]* | ?:[\\/]*)
5356  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5357  ;;
5358  *)
5359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5360for as_dir in $PATH
5361do
5362  IFS=$as_save_IFS
5363  test -z "$as_dir" && as_dir=.
5364    for ac_exec_ext in '' $ac_executable_extensions; do
5365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5366    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5368    break 2
5369  fi
5370done
5371  done
5372IFS=$as_save_IFS
5373
5374  ;;
5375esac
5376fi
5377BASH=$ac_cv_path_BASH
5378if test -n "$BASH"; then
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5380$as_echo "$BASH" >&6; }
5381else
5382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
5384fi
5385
5386
5387  test -n "$BASH" && break
5388done
5389
5390  else
5391    # The variable is set, but is it from the command line or the environment?
5392
5393    # Try to remove the string !BASH! from our list.
5394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5396      # If it failed, the variable was not from the command line. Ignore it,
5397      # but warn the user (except for BASH, which is always set by the calling BASH).
5398      if test "xBASH" != xBASH; then
5399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5400$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5401      fi
5402      # Try to locate tool using the code snippet
5403      for ac_prog in bash
5404do
5405  # Extract the first word of "$ac_prog", so it can be a program name with args.
5406set dummy $ac_prog; ac_word=$2
5407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5408$as_echo_n "checking for $ac_word... " >&6; }
5409if ${ac_cv_path_BASH+:} false; then :
5410  $as_echo_n "(cached) " >&6
5411else
5412  case $BASH in
5413  [\\/]* | ?:[\\/]*)
5414  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5415  ;;
5416  *)
5417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5418for as_dir in $PATH
5419do
5420  IFS=$as_save_IFS
5421  test -z "$as_dir" && as_dir=.
5422    for ac_exec_ext in '' $ac_executable_extensions; do
5423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5424    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5426    break 2
5427  fi
5428done
5429  done
5430IFS=$as_save_IFS
5431
5432  ;;
5433esac
5434fi
5435BASH=$ac_cv_path_BASH
5436if test -n "$BASH"; then
5437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5438$as_echo "$BASH" >&6; }
5439else
5440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5441$as_echo "no" >&6; }
5442fi
5443
5444
5445  test -n "$BASH" && break
5446done
5447
5448    else
5449      # If it succeeded, then it was overridden by the user. We will use it
5450      # for the tool.
5451
5452      # First remove it from the list of overridden variables, so we can test
5453      # for unknown variables in the end.
5454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5455
5456      # Check if we try to supply an empty value
5457      if test "x$BASH" = x; then
5458        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5459$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5460        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5461$as_echo_n "checking for BASH... " >&6; }
5462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5463$as_echo "disabled" >&6; }
5464      else
5465        # Check if the provided tool contains a complete path.
5466        tool_specified="$BASH"
5467        tool_basename="${tool_specified##*/}"
5468        if test "x$tool_basename" = "x$tool_specified"; then
5469          # A command without a complete path is provided, search $PATH.
5470          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5471$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5472          # Extract the first word of "$tool_basename", so it can be a program name with args.
5473set dummy $tool_basename; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
5476if ${ac_cv_path_BASH+:} false; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479  case $BASH in
5480  [\\/]* | ?:[\\/]*)
5481  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5482  ;;
5483  *)
5484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485for as_dir in $PATH
5486do
5487  IFS=$as_save_IFS
5488  test -z "$as_dir" && as_dir=.
5489    for ac_exec_ext in '' $ac_executable_extensions; do
5490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5491    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493    break 2
5494  fi
5495done
5496  done
5497IFS=$as_save_IFS
5498
5499  ;;
5500esac
5501fi
5502BASH=$ac_cv_path_BASH
5503if test -n "$BASH"; then
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5505$as_echo "$BASH" >&6; }
5506else
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508$as_echo "no" >&6; }
5509fi
5510
5511
5512          if test "x$BASH" = x; then
5513            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5514          fi
5515        else
5516          # Otherwise we believe it is a complete path. Use it as it is.
5517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5518$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5519          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5520$as_echo_n "checking for BASH... " >&6; }
5521          if test ! -x "$tool_specified"; then
5522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5523$as_echo "not found" >&6; }
5524            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5525          fi
5526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5527$as_echo "$tool_specified" >&6; }
5528        fi
5529      fi
5530    fi
5531
5532  fi
5533
5534
5535
5536  if test "x$BASH" = x; then
5537    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5538  fi
5539
5540
5541
5542
5543
5544  # Publish this variable in the help.
5545
5546
5547  if [ -z "${CAT+x}" ]; then
5548    # The variable is not set by user, try to locate tool using the code snippet
5549    for ac_prog in cat
5550do
5551  # Extract the first word of "$ac_prog", so it can be a program name with args.
5552set dummy $ac_prog; ac_word=$2
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5554$as_echo_n "checking for $ac_word... " >&6; }
5555if ${ac_cv_path_CAT+:} false; then :
5556  $as_echo_n "(cached) " >&6
5557else
5558  case $CAT in
5559  [\\/]* | ?:[\\/]*)
5560  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5561  ;;
5562  *)
5563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5564for as_dir in $PATH
5565do
5566  IFS=$as_save_IFS
5567  test -z "$as_dir" && as_dir=.
5568    for ac_exec_ext in '' $ac_executable_extensions; do
5569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5570    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5572    break 2
5573  fi
5574done
5575  done
5576IFS=$as_save_IFS
5577
5578  ;;
5579esac
5580fi
5581CAT=$ac_cv_path_CAT
5582if test -n "$CAT"; then
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5584$as_echo "$CAT" >&6; }
5585else
5586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5587$as_echo "no" >&6; }
5588fi
5589
5590
5591  test -n "$CAT" && break
5592done
5593
5594  else
5595    # The variable is set, but is it from the command line or the environment?
5596
5597    # Try to remove the string !CAT! from our list.
5598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5600      # If it failed, the variable was not from the command line. Ignore it,
5601      # but warn the user (except for BASH, which is always set by the calling BASH).
5602      if test "xCAT" != xBASH; then
5603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5604$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5605      fi
5606      # Try to locate tool using the code snippet
5607      for ac_prog in cat
5608do
5609  # Extract the first word of "$ac_prog", so it can be a program name with args.
5610set dummy $ac_prog; ac_word=$2
5611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5612$as_echo_n "checking for $ac_word... " >&6; }
5613if ${ac_cv_path_CAT+:} false; then :
5614  $as_echo_n "(cached) " >&6
5615else
5616  case $CAT in
5617  [\\/]* | ?:[\\/]*)
5618  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5619  ;;
5620  *)
5621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5622for as_dir in $PATH
5623do
5624  IFS=$as_save_IFS
5625  test -z "$as_dir" && as_dir=.
5626    for ac_exec_ext in '' $ac_executable_extensions; do
5627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5628    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5630    break 2
5631  fi
5632done
5633  done
5634IFS=$as_save_IFS
5635
5636  ;;
5637esac
5638fi
5639CAT=$ac_cv_path_CAT
5640if test -n "$CAT"; then
5641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5642$as_echo "$CAT" >&6; }
5643else
5644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5645$as_echo "no" >&6; }
5646fi
5647
5648
5649  test -n "$CAT" && break
5650done
5651
5652    else
5653      # If it succeeded, then it was overridden by the user. We will use it
5654      # for the tool.
5655
5656      # First remove it from the list of overridden variables, so we can test
5657      # for unknown variables in the end.
5658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5659
5660      # Check if we try to supply an empty value
5661      if test "x$CAT" = x; then
5662        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5663$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5665$as_echo_n "checking for CAT... " >&6; }
5666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5667$as_echo "disabled" >&6; }
5668      else
5669        # Check if the provided tool contains a complete path.
5670        tool_specified="$CAT"
5671        tool_basename="${tool_specified##*/}"
5672        if test "x$tool_basename" = "x$tool_specified"; then
5673          # A command without a complete path is provided, search $PATH.
5674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5675$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5676          # Extract the first word of "$tool_basename", so it can be a program name with args.
5677set dummy $tool_basename; ac_word=$2
5678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5679$as_echo_n "checking for $ac_word... " >&6; }
5680if ${ac_cv_path_CAT+:} false; then :
5681  $as_echo_n "(cached) " >&6
5682else
5683  case $CAT in
5684  [\\/]* | ?:[\\/]*)
5685  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5686  ;;
5687  *)
5688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5689for as_dir in $PATH
5690do
5691  IFS=$as_save_IFS
5692  test -z "$as_dir" && as_dir=.
5693    for ac_exec_ext in '' $ac_executable_extensions; do
5694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5695    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5697    break 2
5698  fi
5699done
5700  done
5701IFS=$as_save_IFS
5702
5703  ;;
5704esac
5705fi
5706CAT=$ac_cv_path_CAT
5707if test -n "$CAT"; then
5708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5709$as_echo "$CAT" >&6; }
5710else
5711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712$as_echo "no" >&6; }
5713fi
5714
5715
5716          if test "x$CAT" = x; then
5717            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5718          fi
5719        else
5720          # Otherwise we believe it is a complete path. Use it as it is.
5721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5722$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5723          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5724$as_echo_n "checking for CAT... " >&6; }
5725          if test ! -x "$tool_specified"; then
5726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5727$as_echo "not found" >&6; }
5728            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5729          fi
5730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5731$as_echo "$tool_specified" >&6; }
5732        fi
5733      fi
5734    fi
5735
5736  fi
5737
5738
5739
5740  if test "x$CAT" = x; then
5741    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5742  fi
5743
5744
5745
5746
5747
5748  # Publish this variable in the help.
5749
5750
5751  if [ -z "${CHMOD+x}" ]; then
5752    # The variable is not set by user, try to locate tool using the code snippet
5753    for ac_prog in chmod
5754do
5755  # Extract the first word of "$ac_prog", so it can be a program name with args.
5756set dummy $ac_prog; ac_word=$2
5757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5758$as_echo_n "checking for $ac_word... " >&6; }
5759if ${ac_cv_path_CHMOD+:} false; then :
5760  $as_echo_n "(cached) " >&6
5761else
5762  case $CHMOD in
5763  [\\/]* | ?:[\\/]*)
5764  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5765  ;;
5766  *)
5767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5768for as_dir in $PATH
5769do
5770  IFS=$as_save_IFS
5771  test -z "$as_dir" && as_dir=.
5772    for ac_exec_ext in '' $ac_executable_extensions; do
5773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5774    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5776    break 2
5777  fi
5778done
5779  done
5780IFS=$as_save_IFS
5781
5782  ;;
5783esac
5784fi
5785CHMOD=$ac_cv_path_CHMOD
5786if test -n "$CHMOD"; then
5787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5788$as_echo "$CHMOD" >&6; }
5789else
5790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5791$as_echo "no" >&6; }
5792fi
5793
5794
5795  test -n "$CHMOD" && break
5796done
5797
5798  else
5799    # The variable is set, but is it from the command line or the environment?
5800
5801    # Try to remove the string !CHMOD! from our list.
5802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5804      # If it failed, the variable was not from the command line. Ignore it,
5805      # but warn the user (except for BASH, which is always set by the calling BASH).
5806      if test "xCHMOD" != xBASH; then
5807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5808$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5809      fi
5810      # Try to locate tool using the code snippet
5811      for ac_prog in chmod
5812do
5813  # Extract the first word of "$ac_prog", so it can be a program name with args.
5814set dummy $ac_prog; ac_word=$2
5815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5816$as_echo_n "checking for $ac_word... " >&6; }
5817if ${ac_cv_path_CHMOD+:} false; then :
5818  $as_echo_n "(cached) " >&6
5819else
5820  case $CHMOD in
5821  [\\/]* | ?:[\\/]*)
5822  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5823  ;;
5824  *)
5825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5826for as_dir in $PATH
5827do
5828  IFS=$as_save_IFS
5829  test -z "$as_dir" && as_dir=.
5830    for ac_exec_ext in '' $ac_executable_extensions; do
5831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5832    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5834    break 2
5835  fi
5836done
5837  done
5838IFS=$as_save_IFS
5839
5840  ;;
5841esac
5842fi
5843CHMOD=$ac_cv_path_CHMOD
5844if test -n "$CHMOD"; then
5845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5846$as_echo "$CHMOD" >&6; }
5847else
5848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5849$as_echo "no" >&6; }
5850fi
5851
5852
5853  test -n "$CHMOD" && break
5854done
5855
5856    else
5857      # If it succeeded, then it was overridden by the user. We will use it
5858      # for the tool.
5859
5860      # First remove it from the list of overridden variables, so we can test
5861      # for unknown variables in the end.
5862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5863
5864      # Check if we try to supply an empty value
5865      if test "x$CHMOD" = x; then
5866        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5867$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5869$as_echo_n "checking for CHMOD... " >&6; }
5870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5871$as_echo "disabled" >&6; }
5872      else
5873        # Check if the provided tool contains a complete path.
5874        tool_specified="$CHMOD"
5875        tool_basename="${tool_specified##*/}"
5876        if test "x$tool_basename" = "x$tool_specified"; then
5877          # A command without a complete path is provided, search $PATH.
5878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5879$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5880          # Extract the first word of "$tool_basename", so it can be a program name with args.
5881set dummy $tool_basename; ac_word=$2
5882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5883$as_echo_n "checking for $ac_word... " >&6; }
5884if ${ac_cv_path_CHMOD+:} false; then :
5885  $as_echo_n "(cached) " >&6
5886else
5887  case $CHMOD in
5888  [\\/]* | ?:[\\/]*)
5889  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5890  ;;
5891  *)
5892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5893for as_dir in $PATH
5894do
5895  IFS=$as_save_IFS
5896  test -z "$as_dir" && as_dir=.
5897    for ac_exec_ext in '' $ac_executable_extensions; do
5898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5899    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5901    break 2
5902  fi
5903done
5904  done
5905IFS=$as_save_IFS
5906
5907  ;;
5908esac
5909fi
5910CHMOD=$ac_cv_path_CHMOD
5911if test -n "$CHMOD"; then
5912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5913$as_echo "$CHMOD" >&6; }
5914else
5915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5916$as_echo "no" >&6; }
5917fi
5918
5919
5920          if test "x$CHMOD" = x; then
5921            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5922          fi
5923        else
5924          # Otherwise we believe it is a complete path. Use it as it is.
5925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5926$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5927          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5928$as_echo_n "checking for CHMOD... " >&6; }
5929          if test ! -x "$tool_specified"; then
5930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5931$as_echo "not found" >&6; }
5932            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5933          fi
5934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5935$as_echo "$tool_specified" >&6; }
5936        fi
5937      fi
5938    fi
5939
5940  fi
5941
5942
5943
5944  if test "x$CHMOD" = x; then
5945    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5946  fi
5947
5948
5949
5950
5951
5952  # Publish this variable in the help.
5953
5954
5955  if [ -z "${CMP+x}" ]; then
5956    # The variable is not set by user, try to locate tool using the code snippet
5957    for ac_prog in cmp
5958do
5959  # Extract the first word of "$ac_prog", so it can be a program name with args.
5960set dummy $ac_prog; ac_word=$2
5961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5962$as_echo_n "checking for $ac_word... " >&6; }
5963if ${ac_cv_path_CMP+:} false; then :
5964  $as_echo_n "(cached) " >&6
5965else
5966  case $CMP in
5967  [\\/]* | ?:[\\/]*)
5968  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5969  ;;
5970  *)
5971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5972for as_dir in $PATH
5973do
5974  IFS=$as_save_IFS
5975  test -z "$as_dir" && as_dir=.
5976    for ac_exec_ext in '' $ac_executable_extensions; do
5977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5978    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5980    break 2
5981  fi
5982done
5983  done
5984IFS=$as_save_IFS
5985
5986  ;;
5987esac
5988fi
5989CMP=$ac_cv_path_CMP
5990if test -n "$CMP"; then
5991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5992$as_echo "$CMP" >&6; }
5993else
5994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5995$as_echo "no" >&6; }
5996fi
5997
5998
5999  test -n "$CMP" && break
6000done
6001
6002  else
6003    # The variable is set, but is it from the command line or the environment?
6004
6005    # Try to remove the string !CMP! from our list.
6006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6008      # If it failed, the variable was not from the command line. Ignore it,
6009      # but warn the user (except for BASH, which is always set by the calling BASH).
6010      if test "xCMP" != xBASH; then
6011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6012$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6013      fi
6014      # Try to locate tool using the code snippet
6015      for ac_prog in cmp
6016do
6017  # Extract the first word of "$ac_prog", so it can be a program name with args.
6018set dummy $ac_prog; ac_word=$2
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6020$as_echo_n "checking for $ac_word... " >&6; }
6021if ${ac_cv_path_CMP+:} false; then :
6022  $as_echo_n "(cached) " >&6
6023else
6024  case $CMP in
6025  [\\/]* | ?:[\\/]*)
6026  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6027  ;;
6028  *)
6029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6030for as_dir in $PATH
6031do
6032  IFS=$as_save_IFS
6033  test -z "$as_dir" && as_dir=.
6034    for ac_exec_ext in '' $ac_executable_extensions; do
6035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6036    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6038    break 2
6039  fi
6040done
6041  done
6042IFS=$as_save_IFS
6043
6044  ;;
6045esac
6046fi
6047CMP=$ac_cv_path_CMP
6048if test -n "$CMP"; then
6049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6050$as_echo "$CMP" >&6; }
6051else
6052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053$as_echo "no" >&6; }
6054fi
6055
6056
6057  test -n "$CMP" && break
6058done
6059
6060    else
6061      # If it succeeded, then it was overridden by the user. We will use it
6062      # for the tool.
6063
6064      # First remove it from the list of overridden variables, so we can test
6065      # for unknown variables in the end.
6066      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6067
6068      # Check if we try to supply an empty value
6069      if test "x$CMP" = x; then
6070        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6071$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6072        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6073$as_echo_n "checking for CMP... " >&6; }
6074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6075$as_echo "disabled" >&6; }
6076      else
6077        # Check if the provided tool contains a complete path.
6078        tool_specified="$CMP"
6079        tool_basename="${tool_specified##*/}"
6080        if test "x$tool_basename" = "x$tool_specified"; then
6081          # A command without a complete path is provided, search $PATH.
6082          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6083$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6084          # Extract the first word of "$tool_basename", so it can be a program name with args.
6085set dummy $tool_basename; ac_word=$2
6086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6087$as_echo_n "checking for $ac_word... " >&6; }
6088if ${ac_cv_path_CMP+:} false; then :
6089  $as_echo_n "(cached) " >&6
6090else
6091  case $CMP in
6092  [\\/]* | ?:[\\/]*)
6093  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6094  ;;
6095  *)
6096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6097for as_dir in $PATH
6098do
6099  IFS=$as_save_IFS
6100  test -z "$as_dir" && as_dir=.
6101    for ac_exec_ext in '' $ac_executable_extensions; do
6102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6103    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6105    break 2
6106  fi
6107done
6108  done
6109IFS=$as_save_IFS
6110
6111  ;;
6112esac
6113fi
6114CMP=$ac_cv_path_CMP
6115if test -n "$CMP"; then
6116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6117$as_echo "$CMP" >&6; }
6118else
6119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120$as_echo "no" >&6; }
6121fi
6122
6123
6124          if test "x$CMP" = x; then
6125            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6126          fi
6127        else
6128          # Otherwise we believe it is a complete path. Use it as it is.
6129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6130$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6131          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6132$as_echo_n "checking for CMP... " >&6; }
6133          if test ! -x "$tool_specified"; then
6134            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6135$as_echo "not found" >&6; }
6136            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6137          fi
6138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6139$as_echo "$tool_specified" >&6; }
6140        fi
6141      fi
6142    fi
6143
6144  fi
6145
6146
6147
6148  if test "x$CMP" = x; then
6149    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6150  fi
6151
6152
6153
6154
6155
6156  # Publish this variable in the help.
6157
6158
6159  if [ -z "${COMM+x}" ]; then
6160    # The variable is not set by user, try to locate tool using the code snippet
6161    for ac_prog in comm
6162do
6163  # Extract the first word of "$ac_prog", so it can be a program name with args.
6164set dummy $ac_prog; ac_word=$2
6165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166$as_echo_n "checking for $ac_word... " >&6; }
6167if ${ac_cv_path_COMM+:} false; then :
6168  $as_echo_n "(cached) " >&6
6169else
6170  case $COMM in
6171  [\\/]* | ?:[\\/]*)
6172  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6173  ;;
6174  *)
6175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6176for as_dir in $PATH
6177do
6178  IFS=$as_save_IFS
6179  test -z "$as_dir" && as_dir=.
6180    for ac_exec_ext in '' $ac_executable_extensions; do
6181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6182    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6184    break 2
6185  fi
6186done
6187  done
6188IFS=$as_save_IFS
6189
6190  ;;
6191esac
6192fi
6193COMM=$ac_cv_path_COMM
6194if test -n "$COMM"; then
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6196$as_echo "$COMM" >&6; }
6197else
6198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6199$as_echo "no" >&6; }
6200fi
6201
6202
6203  test -n "$COMM" && break
6204done
6205
6206  else
6207    # The variable is set, but is it from the command line or the environment?
6208
6209    # Try to remove the string !COMM! from our list.
6210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6212      # If it failed, the variable was not from the command line. Ignore it,
6213      # but warn the user (except for BASH, which is always set by the calling BASH).
6214      if test "xCOMM" != xBASH; then
6215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6216$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6217      fi
6218      # Try to locate tool using the code snippet
6219      for ac_prog in comm
6220do
6221  # Extract the first word of "$ac_prog", so it can be a program name with args.
6222set dummy $ac_prog; ac_word=$2
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224$as_echo_n "checking for $ac_word... " >&6; }
6225if ${ac_cv_path_COMM+:} false; then :
6226  $as_echo_n "(cached) " >&6
6227else
6228  case $COMM in
6229  [\\/]* | ?:[\\/]*)
6230  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6231  ;;
6232  *)
6233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6234for as_dir in $PATH
6235do
6236  IFS=$as_save_IFS
6237  test -z "$as_dir" && as_dir=.
6238    for ac_exec_ext in '' $ac_executable_extensions; do
6239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6240    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6242    break 2
6243  fi
6244done
6245  done
6246IFS=$as_save_IFS
6247
6248  ;;
6249esac
6250fi
6251COMM=$ac_cv_path_COMM
6252if test -n "$COMM"; then
6253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6254$as_echo "$COMM" >&6; }
6255else
6256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6257$as_echo "no" >&6; }
6258fi
6259
6260
6261  test -n "$COMM" && break
6262done
6263
6264    else
6265      # If it succeeded, then it was overridden by the user. We will use it
6266      # for the tool.
6267
6268      # First remove it from the list of overridden variables, so we can test
6269      # for unknown variables in the end.
6270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6271
6272      # Check if we try to supply an empty value
6273      if test "x$COMM" = x; then
6274        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6275$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6276        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6277$as_echo_n "checking for COMM... " >&6; }
6278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6279$as_echo "disabled" >&6; }
6280      else
6281        # Check if the provided tool contains a complete path.
6282        tool_specified="$COMM"
6283        tool_basename="${tool_specified##*/}"
6284        if test "x$tool_basename" = "x$tool_specified"; then
6285          # A command without a complete path is provided, search $PATH.
6286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6287$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6288          # Extract the first word of "$tool_basename", so it can be a program name with args.
6289set dummy $tool_basename; ac_word=$2
6290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6291$as_echo_n "checking for $ac_word... " >&6; }
6292if ${ac_cv_path_COMM+:} false; then :
6293  $as_echo_n "(cached) " >&6
6294else
6295  case $COMM in
6296  [\\/]* | ?:[\\/]*)
6297  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6298  ;;
6299  *)
6300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301for as_dir in $PATH
6302do
6303  IFS=$as_save_IFS
6304  test -z "$as_dir" && as_dir=.
6305    for ac_exec_ext in '' $ac_executable_extensions; do
6306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6307    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6309    break 2
6310  fi
6311done
6312  done
6313IFS=$as_save_IFS
6314
6315  ;;
6316esac
6317fi
6318COMM=$ac_cv_path_COMM
6319if test -n "$COMM"; then
6320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6321$as_echo "$COMM" >&6; }
6322else
6323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6324$as_echo "no" >&6; }
6325fi
6326
6327
6328          if test "x$COMM" = x; then
6329            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6330          fi
6331        else
6332          # Otherwise we believe it is a complete path. Use it as it is.
6333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6334$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6335          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6336$as_echo_n "checking for COMM... " >&6; }
6337          if test ! -x "$tool_specified"; then
6338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6339$as_echo "not found" >&6; }
6340            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6341          fi
6342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6343$as_echo "$tool_specified" >&6; }
6344        fi
6345      fi
6346    fi
6347
6348  fi
6349
6350
6351
6352  if test "x$COMM" = x; then
6353    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6354  fi
6355
6356
6357
6358
6359
6360  # Publish this variable in the help.
6361
6362
6363  if [ -z "${CP+x}" ]; then
6364    # The variable is not set by user, try to locate tool using the code snippet
6365    for ac_prog in cp
6366do
6367  # Extract the first word of "$ac_prog", so it can be a program name with args.
6368set dummy $ac_prog; ac_word=$2
6369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6370$as_echo_n "checking for $ac_word... " >&6; }
6371if ${ac_cv_path_CP+:} false; then :
6372  $as_echo_n "(cached) " >&6
6373else
6374  case $CP in
6375  [\\/]* | ?:[\\/]*)
6376  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6377  ;;
6378  *)
6379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6380for as_dir in $PATH
6381do
6382  IFS=$as_save_IFS
6383  test -z "$as_dir" && as_dir=.
6384    for ac_exec_ext in '' $ac_executable_extensions; do
6385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6386    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6388    break 2
6389  fi
6390done
6391  done
6392IFS=$as_save_IFS
6393
6394  ;;
6395esac
6396fi
6397CP=$ac_cv_path_CP
6398if test -n "$CP"; then
6399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6400$as_echo "$CP" >&6; }
6401else
6402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6403$as_echo "no" >&6; }
6404fi
6405
6406
6407  test -n "$CP" && break
6408done
6409
6410  else
6411    # The variable is set, but is it from the command line or the environment?
6412
6413    # Try to remove the string !CP! from our list.
6414    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6415    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6416      # If it failed, the variable was not from the command line. Ignore it,
6417      # but warn the user (except for BASH, which is always set by the calling BASH).
6418      if test "xCP" != xBASH; then
6419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6420$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6421      fi
6422      # Try to locate tool using the code snippet
6423      for ac_prog in cp
6424do
6425  # Extract the first word of "$ac_prog", so it can be a program name with args.
6426set dummy $ac_prog; ac_word=$2
6427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6428$as_echo_n "checking for $ac_word... " >&6; }
6429if ${ac_cv_path_CP+:} false; then :
6430  $as_echo_n "(cached) " >&6
6431else
6432  case $CP in
6433  [\\/]* | ?:[\\/]*)
6434  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6435  ;;
6436  *)
6437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6438for as_dir in $PATH
6439do
6440  IFS=$as_save_IFS
6441  test -z "$as_dir" && as_dir=.
6442    for ac_exec_ext in '' $ac_executable_extensions; do
6443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6444    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6446    break 2
6447  fi
6448done
6449  done
6450IFS=$as_save_IFS
6451
6452  ;;
6453esac
6454fi
6455CP=$ac_cv_path_CP
6456if test -n "$CP"; then
6457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6458$as_echo "$CP" >&6; }
6459else
6460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461$as_echo "no" >&6; }
6462fi
6463
6464
6465  test -n "$CP" && break
6466done
6467
6468    else
6469      # If it succeeded, then it was overridden by the user. We will use it
6470      # for the tool.
6471
6472      # First remove it from the list of overridden variables, so we can test
6473      # for unknown variables in the end.
6474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6475
6476      # Check if we try to supply an empty value
6477      if test "x$CP" = x; then
6478        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6479$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6481$as_echo_n "checking for CP... " >&6; }
6482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6483$as_echo "disabled" >&6; }
6484      else
6485        # Check if the provided tool contains a complete path.
6486        tool_specified="$CP"
6487        tool_basename="${tool_specified##*/}"
6488        if test "x$tool_basename" = "x$tool_specified"; then
6489          # A command without a complete path is provided, search $PATH.
6490          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6491$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6492          # Extract the first word of "$tool_basename", so it can be a program name with args.
6493set dummy $tool_basename; ac_word=$2
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6495$as_echo_n "checking for $ac_word... " >&6; }
6496if ${ac_cv_path_CP+:} false; then :
6497  $as_echo_n "(cached) " >&6
6498else
6499  case $CP in
6500  [\\/]* | ?:[\\/]*)
6501  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6502  ;;
6503  *)
6504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6505for as_dir in $PATH
6506do
6507  IFS=$as_save_IFS
6508  test -z "$as_dir" && as_dir=.
6509    for ac_exec_ext in '' $ac_executable_extensions; do
6510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6511    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6513    break 2
6514  fi
6515done
6516  done
6517IFS=$as_save_IFS
6518
6519  ;;
6520esac
6521fi
6522CP=$ac_cv_path_CP
6523if test -n "$CP"; then
6524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6525$as_echo "$CP" >&6; }
6526else
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6528$as_echo "no" >&6; }
6529fi
6530
6531
6532          if test "x$CP" = x; then
6533            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6534          fi
6535        else
6536          # Otherwise we believe it is a complete path. Use it as it is.
6537          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6538$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6539          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6540$as_echo_n "checking for CP... " >&6; }
6541          if test ! -x "$tool_specified"; then
6542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6543$as_echo "not found" >&6; }
6544            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6545          fi
6546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6547$as_echo "$tool_specified" >&6; }
6548        fi
6549      fi
6550    fi
6551
6552  fi
6553
6554
6555
6556  if test "x$CP" = x; then
6557    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6558  fi
6559
6560
6561
6562
6563
6564  # Publish this variable in the help.
6565
6566
6567  if [ -z "${CUT+x}" ]; then
6568    # The variable is not set by user, try to locate tool using the code snippet
6569    for ac_prog in cut
6570do
6571  # Extract the first word of "$ac_prog", so it can be a program name with args.
6572set dummy $ac_prog; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_CUT+:} false; then :
6576  $as_echo_n "(cached) " >&6
6577else
6578  case $CUT in
6579  [\\/]* | ?:[\\/]*)
6580  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6581  ;;
6582  *)
6583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586  IFS=$as_save_IFS
6587  test -z "$as_dir" && as_dir=.
6588    for ac_exec_ext in '' $ac_executable_extensions; do
6589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592    break 2
6593  fi
6594done
6595  done
6596IFS=$as_save_IFS
6597
6598  ;;
6599esac
6600fi
6601CUT=$ac_cv_path_CUT
6602if test -n "$CUT"; then
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6604$as_echo "$CUT" >&6; }
6605else
6606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
6608fi
6609
6610
6611  test -n "$CUT" && break
6612done
6613
6614  else
6615    # The variable is set, but is it from the command line or the environment?
6616
6617    # Try to remove the string !CUT! from our list.
6618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6620      # If it failed, the variable was not from the command line. Ignore it,
6621      # but warn the user (except for BASH, which is always set by the calling BASH).
6622      if test "xCUT" != xBASH; then
6623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6624$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6625      fi
6626      # Try to locate tool using the code snippet
6627      for ac_prog in cut
6628do
6629  # Extract the first word of "$ac_prog", so it can be a program name with args.
6630set dummy $ac_prog; ac_word=$2
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6632$as_echo_n "checking for $ac_word... " >&6; }
6633if ${ac_cv_path_CUT+:} false; then :
6634  $as_echo_n "(cached) " >&6
6635else
6636  case $CUT in
6637  [\\/]* | ?:[\\/]*)
6638  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6639  ;;
6640  *)
6641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6642for as_dir in $PATH
6643do
6644  IFS=$as_save_IFS
6645  test -z "$as_dir" && as_dir=.
6646    for ac_exec_ext in '' $ac_executable_extensions; do
6647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6648    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6650    break 2
6651  fi
6652done
6653  done
6654IFS=$as_save_IFS
6655
6656  ;;
6657esac
6658fi
6659CUT=$ac_cv_path_CUT
6660if test -n "$CUT"; then
6661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6662$as_echo "$CUT" >&6; }
6663else
6664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6665$as_echo "no" >&6; }
6666fi
6667
6668
6669  test -n "$CUT" && break
6670done
6671
6672    else
6673      # If it succeeded, then it was overridden by the user. We will use it
6674      # for the tool.
6675
6676      # First remove it from the list of overridden variables, so we can test
6677      # for unknown variables in the end.
6678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6679
6680      # Check if we try to supply an empty value
6681      if test "x$CUT" = x; then
6682        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6683$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6685$as_echo_n "checking for CUT... " >&6; }
6686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6687$as_echo "disabled" >&6; }
6688      else
6689        # Check if the provided tool contains a complete path.
6690        tool_specified="$CUT"
6691        tool_basename="${tool_specified##*/}"
6692        if test "x$tool_basename" = "x$tool_specified"; then
6693          # A command without a complete path is provided, search $PATH.
6694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6695$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6696          # Extract the first word of "$tool_basename", so it can be a program name with args.
6697set dummy $tool_basename; ac_word=$2
6698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6699$as_echo_n "checking for $ac_word... " >&6; }
6700if ${ac_cv_path_CUT+:} false; then :
6701  $as_echo_n "(cached) " >&6
6702else
6703  case $CUT in
6704  [\\/]* | ?:[\\/]*)
6705  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6706  ;;
6707  *)
6708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6709for as_dir in $PATH
6710do
6711  IFS=$as_save_IFS
6712  test -z "$as_dir" && as_dir=.
6713    for ac_exec_ext in '' $ac_executable_extensions; do
6714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6715    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6717    break 2
6718  fi
6719done
6720  done
6721IFS=$as_save_IFS
6722
6723  ;;
6724esac
6725fi
6726CUT=$ac_cv_path_CUT
6727if test -n "$CUT"; then
6728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6729$as_echo "$CUT" >&6; }
6730else
6731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6732$as_echo "no" >&6; }
6733fi
6734
6735
6736          if test "x$CUT" = x; then
6737            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6738          fi
6739        else
6740          # Otherwise we believe it is a complete path. Use it as it is.
6741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6742$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6743          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6744$as_echo_n "checking for CUT... " >&6; }
6745          if test ! -x "$tool_specified"; then
6746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6747$as_echo "not found" >&6; }
6748            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6749          fi
6750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6751$as_echo "$tool_specified" >&6; }
6752        fi
6753      fi
6754    fi
6755
6756  fi
6757
6758
6759
6760  if test "x$CUT" = x; then
6761    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6762  fi
6763
6764
6765
6766
6767
6768  # Publish this variable in the help.
6769
6770
6771  if [ -z "${DATE+x}" ]; then
6772    # The variable is not set by user, try to locate tool using the code snippet
6773    for ac_prog in date
6774do
6775  # Extract the first word of "$ac_prog", so it can be a program name with args.
6776set dummy $ac_prog; ac_word=$2
6777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6778$as_echo_n "checking for $ac_word... " >&6; }
6779if ${ac_cv_path_DATE+:} false; then :
6780  $as_echo_n "(cached) " >&6
6781else
6782  case $DATE in
6783  [\\/]* | ?:[\\/]*)
6784  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6785  ;;
6786  *)
6787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6788for as_dir in $PATH
6789do
6790  IFS=$as_save_IFS
6791  test -z "$as_dir" && as_dir=.
6792    for ac_exec_ext in '' $ac_executable_extensions; do
6793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6794    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6796    break 2
6797  fi
6798done
6799  done
6800IFS=$as_save_IFS
6801
6802  ;;
6803esac
6804fi
6805DATE=$ac_cv_path_DATE
6806if test -n "$DATE"; then
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6808$as_echo "$DATE" >&6; }
6809else
6810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6811$as_echo "no" >&6; }
6812fi
6813
6814
6815  test -n "$DATE" && break
6816done
6817
6818  else
6819    # The variable is set, but is it from the command line or the environment?
6820
6821    # Try to remove the string !DATE! from our list.
6822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6824      # If it failed, the variable was not from the command line. Ignore it,
6825      # but warn the user (except for BASH, which is always set by the calling BASH).
6826      if test "xDATE" != xBASH; then
6827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6828$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6829      fi
6830      # Try to locate tool using the code snippet
6831      for ac_prog in date
6832do
6833  # Extract the first word of "$ac_prog", so it can be a program name with args.
6834set dummy $ac_prog; ac_word=$2
6835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6836$as_echo_n "checking for $ac_word... " >&6; }
6837if ${ac_cv_path_DATE+:} false; then :
6838  $as_echo_n "(cached) " >&6
6839else
6840  case $DATE in
6841  [\\/]* | ?:[\\/]*)
6842  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6843  ;;
6844  *)
6845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6846for as_dir in $PATH
6847do
6848  IFS=$as_save_IFS
6849  test -z "$as_dir" && as_dir=.
6850    for ac_exec_ext in '' $ac_executable_extensions; do
6851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6852    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6854    break 2
6855  fi
6856done
6857  done
6858IFS=$as_save_IFS
6859
6860  ;;
6861esac
6862fi
6863DATE=$ac_cv_path_DATE
6864if test -n "$DATE"; then
6865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6866$as_echo "$DATE" >&6; }
6867else
6868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6869$as_echo "no" >&6; }
6870fi
6871
6872
6873  test -n "$DATE" && break
6874done
6875
6876    else
6877      # If it succeeded, then it was overridden by the user. We will use it
6878      # for the tool.
6879
6880      # First remove it from the list of overridden variables, so we can test
6881      # for unknown variables in the end.
6882      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6883
6884      # Check if we try to supply an empty value
6885      if test "x$DATE" = x; then
6886        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6887$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6888        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6889$as_echo_n "checking for DATE... " >&6; }
6890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6891$as_echo "disabled" >&6; }
6892      else
6893        # Check if the provided tool contains a complete path.
6894        tool_specified="$DATE"
6895        tool_basename="${tool_specified##*/}"
6896        if test "x$tool_basename" = "x$tool_specified"; then
6897          # A command without a complete path is provided, search $PATH.
6898          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6899$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6900          # Extract the first word of "$tool_basename", so it can be a program name with args.
6901set dummy $tool_basename; ac_word=$2
6902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6903$as_echo_n "checking for $ac_word... " >&6; }
6904if ${ac_cv_path_DATE+:} false; then :
6905  $as_echo_n "(cached) " >&6
6906else
6907  case $DATE in
6908  [\\/]* | ?:[\\/]*)
6909  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6910  ;;
6911  *)
6912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6913for as_dir in $PATH
6914do
6915  IFS=$as_save_IFS
6916  test -z "$as_dir" && as_dir=.
6917    for ac_exec_ext in '' $ac_executable_extensions; do
6918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6919    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6921    break 2
6922  fi
6923done
6924  done
6925IFS=$as_save_IFS
6926
6927  ;;
6928esac
6929fi
6930DATE=$ac_cv_path_DATE
6931if test -n "$DATE"; then
6932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6933$as_echo "$DATE" >&6; }
6934else
6935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6936$as_echo "no" >&6; }
6937fi
6938
6939
6940          if test "x$DATE" = x; then
6941            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6942          fi
6943        else
6944          # Otherwise we believe it is a complete path. Use it as it is.
6945          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6946$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6947          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6948$as_echo_n "checking for DATE... " >&6; }
6949          if test ! -x "$tool_specified"; then
6950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6951$as_echo "not found" >&6; }
6952            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6953          fi
6954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6955$as_echo "$tool_specified" >&6; }
6956        fi
6957      fi
6958    fi
6959
6960  fi
6961
6962
6963
6964  if test "x$DATE" = x; then
6965    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6966  fi
6967
6968
6969
6970
6971
6972  # Publish this variable in the help.
6973
6974
6975  if [ -z "${DIFF+x}" ]; then
6976    # The variable is not set by user, try to locate tool using the code snippet
6977    for ac_prog in gdiff diff
6978do
6979  # Extract the first word of "$ac_prog", so it can be a program name with args.
6980set dummy $ac_prog; ac_word=$2
6981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6982$as_echo_n "checking for $ac_word... " >&6; }
6983if ${ac_cv_path_DIFF+:} false; then :
6984  $as_echo_n "(cached) " >&6
6985else
6986  case $DIFF in
6987  [\\/]* | ?:[\\/]*)
6988  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6989  ;;
6990  *)
6991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6992for as_dir in $PATH
6993do
6994  IFS=$as_save_IFS
6995  test -z "$as_dir" && as_dir=.
6996    for ac_exec_ext in '' $ac_executable_extensions; do
6997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6998    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7000    break 2
7001  fi
7002done
7003  done
7004IFS=$as_save_IFS
7005
7006  ;;
7007esac
7008fi
7009DIFF=$ac_cv_path_DIFF
7010if test -n "$DIFF"; then
7011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7012$as_echo "$DIFF" >&6; }
7013else
7014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7015$as_echo "no" >&6; }
7016fi
7017
7018
7019  test -n "$DIFF" && break
7020done
7021
7022  else
7023    # The variable is set, but is it from the command line or the environment?
7024
7025    # Try to remove the string !DIFF! from our list.
7026    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7027    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7028      # If it failed, the variable was not from the command line. Ignore it,
7029      # but warn the user (except for BASH, which is always set by the calling BASH).
7030      if test "xDIFF" != xBASH; then
7031        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7032$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7033      fi
7034      # Try to locate tool using the code snippet
7035      for ac_prog in gdiff diff
7036do
7037  # Extract the first word of "$ac_prog", so it can be a program name with args.
7038set dummy $ac_prog; ac_word=$2
7039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7040$as_echo_n "checking for $ac_word... " >&6; }
7041if ${ac_cv_path_DIFF+:} false; then :
7042  $as_echo_n "(cached) " >&6
7043else
7044  case $DIFF in
7045  [\\/]* | ?:[\\/]*)
7046  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7047  ;;
7048  *)
7049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7050for as_dir in $PATH
7051do
7052  IFS=$as_save_IFS
7053  test -z "$as_dir" && as_dir=.
7054    for ac_exec_ext in '' $ac_executable_extensions; do
7055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7056    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7058    break 2
7059  fi
7060done
7061  done
7062IFS=$as_save_IFS
7063
7064  ;;
7065esac
7066fi
7067DIFF=$ac_cv_path_DIFF
7068if test -n "$DIFF"; then
7069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7070$as_echo "$DIFF" >&6; }
7071else
7072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7073$as_echo "no" >&6; }
7074fi
7075
7076
7077  test -n "$DIFF" && break
7078done
7079
7080    else
7081      # If it succeeded, then it was overridden by the user. We will use it
7082      # for the tool.
7083
7084      # First remove it from the list of overridden variables, so we can test
7085      # for unknown variables in the end.
7086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7087
7088      # Check if we try to supply an empty value
7089      if test "x$DIFF" = x; then
7090        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7091$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7093$as_echo_n "checking for DIFF... " >&6; }
7094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7095$as_echo "disabled" >&6; }
7096      else
7097        # Check if the provided tool contains a complete path.
7098        tool_specified="$DIFF"
7099        tool_basename="${tool_specified##*/}"
7100        if test "x$tool_basename" = "x$tool_specified"; then
7101          # A command without a complete path is provided, search $PATH.
7102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7103$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7104          # Extract the first word of "$tool_basename", so it can be a program name with args.
7105set dummy $tool_basename; ac_word=$2
7106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7107$as_echo_n "checking for $ac_word... " >&6; }
7108if ${ac_cv_path_DIFF+:} false; then :
7109  $as_echo_n "(cached) " >&6
7110else
7111  case $DIFF in
7112  [\\/]* | ?:[\\/]*)
7113  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7114  ;;
7115  *)
7116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7117for as_dir in $PATH
7118do
7119  IFS=$as_save_IFS
7120  test -z "$as_dir" && as_dir=.
7121    for ac_exec_ext in '' $ac_executable_extensions; do
7122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7123    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7125    break 2
7126  fi
7127done
7128  done
7129IFS=$as_save_IFS
7130
7131  ;;
7132esac
7133fi
7134DIFF=$ac_cv_path_DIFF
7135if test -n "$DIFF"; then
7136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7137$as_echo "$DIFF" >&6; }
7138else
7139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7140$as_echo "no" >&6; }
7141fi
7142
7143
7144          if test "x$DIFF" = x; then
7145            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7146          fi
7147        else
7148          # Otherwise we believe it is a complete path. Use it as it is.
7149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7150$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7151          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7152$as_echo_n "checking for DIFF... " >&6; }
7153          if test ! -x "$tool_specified"; then
7154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7155$as_echo "not found" >&6; }
7156            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7157          fi
7158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7159$as_echo "$tool_specified" >&6; }
7160        fi
7161      fi
7162    fi
7163
7164  fi
7165
7166
7167
7168  if test "x$DIFF" = x; then
7169    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7170  fi
7171
7172
7173
7174
7175
7176  # Publish this variable in the help.
7177
7178
7179  if [ -z "${DIRNAME+x}" ]; then
7180    # The variable is not set by user, try to locate tool using the code snippet
7181    for ac_prog in dirname
7182do
7183  # Extract the first word of "$ac_prog", so it can be a program name with args.
7184set dummy $ac_prog; ac_word=$2
7185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7186$as_echo_n "checking for $ac_word... " >&6; }
7187if ${ac_cv_path_DIRNAME+:} false; then :
7188  $as_echo_n "(cached) " >&6
7189else
7190  case $DIRNAME in
7191  [\\/]* | ?:[\\/]*)
7192  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7193  ;;
7194  *)
7195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7196for as_dir in $PATH
7197do
7198  IFS=$as_save_IFS
7199  test -z "$as_dir" && as_dir=.
7200    for ac_exec_ext in '' $ac_executable_extensions; do
7201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7202    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7204    break 2
7205  fi
7206done
7207  done
7208IFS=$as_save_IFS
7209
7210  ;;
7211esac
7212fi
7213DIRNAME=$ac_cv_path_DIRNAME
7214if test -n "$DIRNAME"; then
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7216$as_echo "$DIRNAME" >&6; }
7217else
7218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7219$as_echo "no" >&6; }
7220fi
7221
7222
7223  test -n "$DIRNAME" && break
7224done
7225
7226  else
7227    # The variable is set, but is it from the command line or the environment?
7228
7229    # Try to remove the string !DIRNAME! from our list.
7230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7232      # If it failed, the variable was not from the command line. Ignore it,
7233      # but warn the user (except for BASH, which is always set by the calling BASH).
7234      if test "xDIRNAME" != xBASH; then
7235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7236$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7237      fi
7238      # Try to locate tool using the code snippet
7239      for ac_prog in dirname
7240do
7241  # Extract the first word of "$ac_prog", so it can be a program name with args.
7242set dummy $ac_prog; ac_word=$2
7243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7244$as_echo_n "checking for $ac_word... " >&6; }
7245if ${ac_cv_path_DIRNAME+:} false; then :
7246  $as_echo_n "(cached) " >&6
7247else
7248  case $DIRNAME in
7249  [\\/]* | ?:[\\/]*)
7250  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7251  ;;
7252  *)
7253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7254for as_dir in $PATH
7255do
7256  IFS=$as_save_IFS
7257  test -z "$as_dir" && as_dir=.
7258    for ac_exec_ext in '' $ac_executable_extensions; do
7259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7260    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7262    break 2
7263  fi
7264done
7265  done
7266IFS=$as_save_IFS
7267
7268  ;;
7269esac
7270fi
7271DIRNAME=$ac_cv_path_DIRNAME
7272if test -n "$DIRNAME"; then
7273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7274$as_echo "$DIRNAME" >&6; }
7275else
7276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7277$as_echo "no" >&6; }
7278fi
7279
7280
7281  test -n "$DIRNAME" && break
7282done
7283
7284    else
7285      # If it succeeded, then it was overridden by the user. We will use it
7286      # for the tool.
7287
7288      # First remove it from the list of overridden variables, so we can test
7289      # for unknown variables in the end.
7290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7291
7292      # Check if we try to supply an empty value
7293      if test "x$DIRNAME" = x; then
7294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7295$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7297$as_echo_n "checking for DIRNAME... " >&6; }
7298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7299$as_echo "disabled" >&6; }
7300      else
7301        # Check if the provided tool contains a complete path.
7302        tool_specified="$DIRNAME"
7303        tool_basename="${tool_specified##*/}"
7304        if test "x$tool_basename" = "x$tool_specified"; then
7305          # A command without a complete path is provided, search $PATH.
7306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7307$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7308          # Extract the first word of "$tool_basename", so it can be a program name with args.
7309set dummy $tool_basename; ac_word=$2
7310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7311$as_echo_n "checking for $ac_word... " >&6; }
7312if ${ac_cv_path_DIRNAME+:} false; then :
7313  $as_echo_n "(cached) " >&6
7314else
7315  case $DIRNAME in
7316  [\\/]* | ?:[\\/]*)
7317  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7318  ;;
7319  *)
7320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7321for as_dir in $PATH
7322do
7323  IFS=$as_save_IFS
7324  test -z "$as_dir" && as_dir=.
7325    for ac_exec_ext in '' $ac_executable_extensions; do
7326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7327    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7329    break 2
7330  fi
7331done
7332  done
7333IFS=$as_save_IFS
7334
7335  ;;
7336esac
7337fi
7338DIRNAME=$ac_cv_path_DIRNAME
7339if test -n "$DIRNAME"; then
7340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7341$as_echo "$DIRNAME" >&6; }
7342else
7343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7344$as_echo "no" >&6; }
7345fi
7346
7347
7348          if test "x$DIRNAME" = x; then
7349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7350          fi
7351        else
7352          # Otherwise we believe it is a complete path. Use it as it is.
7353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7354$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7356$as_echo_n "checking for DIRNAME... " >&6; }
7357          if test ! -x "$tool_specified"; then
7358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7359$as_echo "not found" >&6; }
7360            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7361          fi
7362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7363$as_echo "$tool_specified" >&6; }
7364        fi
7365      fi
7366    fi
7367
7368  fi
7369
7370
7371
7372  if test "x$DIRNAME" = x; then
7373    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7374  fi
7375
7376
7377
7378
7379
7380  # Publish this variable in the help.
7381
7382
7383  if [ -z "${ECHO+x}" ]; then
7384    # The variable is not set by user, try to locate tool using the code snippet
7385    for ac_prog in echo
7386do
7387  # Extract the first word of "$ac_prog", so it can be a program name with args.
7388set dummy $ac_prog; ac_word=$2
7389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7390$as_echo_n "checking for $ac_word... " >&6; }
7391if ${ac_cv_path_ECHO+:} false; then :
7392  $as_echo_n "(cached) " >&6
7393else
7394  case $ECHO in
7395  [\\/]* | ?:[\\/]*)
7396  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7397  ;;
7398  *)
7399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7400for as_dir in $PATH
7401do
7402  IFS=$as_save_IFS
7403  test -z "$as_dir" && as_dir=.
7404    for ac_exec_ext in '' $ac_executable_extensions; do
7405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7406    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7408    break 2
7409  fi
7410done
7411  done
7412IFS=$as_save_IFS
7413
7414  ;;
7415esac
7416fi
7417ECHO=$ac_cv_path_ECHO
7418if test -n "$ECHO"; then
7419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7420$as_echo "$ECHO" >&6; }
7421else
7422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7423$as_echo "no" >&6; }
7424fi
7425
7426
7427  test -n "$ECHO" && break
7428done
7429
7430  else
7431    # The variable is set, but is it from the command line or the environment?
7432
7433    # Try to remove the string !ECHO! from our list.
7434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7436      # If it failed, the variable was not from the command line. Ignore it,
7437      # but warn the user (except for BASH, which is always set by the calling BASH).
7438      if test "xECHO" != xBASH; then
7439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7440$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7441      fi
7442      # Try to locate tool using the code snippet
7443      for ac_prog in echo
7444do
7445  # Extract the first word of "$ac_prog", so it can be a program name with args.
7446set dummy $ac_prog; ac_word=$2
7447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7448$as_echo_n "checking for $ac_word... " >&6; }
7449if ${ac_cv_path_ECHO+:} false; then :
7450  $as_echo_n "(cached) " >&6
7451else
7452  case $ECHO in
7453  [\\/]* | ?:[\\/]*)
7454  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7455  ;;
7456  *)
7457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7458for as_dir in $PATH
7459do
7460  IFS=$as_save_IFS
7461  test -z "$as_dir" && as_dir=.
7462    for ac_exec_ext in '' $ac_executable_extensions; do
7463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7464    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7466    break 2
7467  fi
7468done
7469  done
7470IFS=$as_save_IFS
7471
7472  ;;
7473esac
7474fi
7475ECHO=$ac_cv_path_ECHO
7476if test -n "$ECHO"; then
7477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7478$as_echo "$ECHO" >&6; }
7479else
7480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7481$as_echo "no" >&6; }
7482fi
7483
7484
7485  test -n "$ECHO" && break
7486done
7487
7488    else
7489      # If it succeeded, then it was overridden by the user. We will use it
7490      # for the tool.
7491
7492      # First remove it from the list of overridden variables, so we can test
7493      # for unknown variables in the end.
7494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7495
7496      # Check if we try to supply an empty value
7497      if test "x$ECHO" = x; then
7498        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7499$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7501$as_echo_n "checking for ECHO... " >&6; }
7502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7503$as_echo "disabled" >&6; }
7504      else
7505        # Check if the provided tool contains a complete path.
7506        tool_specified="$ECHO"
7507        tool_basename="${tool_specified##*/}"
7508        if test "x$tool_basename" = "x$tool_specified"; then
7509          # A command without a complete path is provided, search $PATH.
7510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7511$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7512          # Extract the first word of "$tool_basename", so it can be a program name with args.
7513set dummy $tool_basename; ac_word=$2
7514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7515$as_echo_n "checking for $ac_word... " >&6; }
7516if ${ac_cv_path_ECHO+:} false; then :
7517  $as_echo_n "(cached) " >&6
7518else
7519  case $ECHO in
7520  [\\/]* | ?:[\\/]*)
7521  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7522  ;;
7523  *)
7524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7525for as_dir in $PATH
7526do
7527  IFS=$as_save_IFS
7528  test -z "$as_dir" && as_dir=.
7529    for ac_exec_ext in '' $ac_executable_extensions; do
7530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7531    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7533    break 2
7534  fi
7535done
7536  done
7537IFS=$as_save_IFS
7538
7539  ;;
7540esac
7541fi
7542ECHO=$ac_cv_path_ECHO
7543if test -n "$ECHO"; then
7544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7545$as_echo "$ECHO" >&6; }
7546else
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7548$as_echo "no" >&6; }
7549fi
7550
7551
7552          if test "x$ECHO" = x; then
7553            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7554          fi
7555        else
7556          # Otherwise we believe it is a complete path. Use it as it is.
7557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7558$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7559          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7560$as_echo_n "checking for ECHO... " >&6; }
7561          if test ! -x "$tool_specified"; then
7562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7563$as_echo "not found" >&6; }
7564            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7565          fi
7566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7567$as_echo "$tool_specified" >&6; }
7568        fi
7569      fi
7570    fi
7571
7572  fi
7573
7574
7575
7576  if test "x$ECHO" = x; then
7577    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7578  fi
7579
7580
7581
7582
7583
7584  # Publish this variable in the help.
7585
7586
7587  if [ -z "${EXPR+x}" ]; then
7588    # The variable is not set by user, try to locate tool using the code snippet
7589    for ac_prog in expr
7590do
7591  # Extract the first word of "$ac_prog", so it can be a program name with args.
7592set dummy $ac_prog; ac_word=$2
7593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7594$as_echo_n "checking for $ac_word... " >&6; }
7595if ${ac_cv_path_EXPR+:} false; then :
7596  $as_echo_n "(cached) " >&6
7597else
7598  case $EXPR in
7599  [\\/]* | ?:[\\/]*)
7600  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7601  ;;
7602  *)
7603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7604for as_dir in $PATH
7605do
7606  IFS=$as_save_IFS
7607  test -z "$as_dir" && as_dir=.
7608    for ac_exec_ext in '' $ac_executable_extensions; do
7609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7610    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7612    break 2
7613  fi
7614done
7615  done
7616IFS=$as_save_IFS
7617
7618  ;;
7619esac
7620fi
7621EXPR=$ac_cv_path_EXPR
7622if test -n "$EXPR"; then
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7624$as_echo "$EXPR" >&6; }
7625else
7626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7627$as_echo "no" >&6; }
7628fi
7629
7630
7631  test -n "$EXPR" && break
7632done
7633
7634  else
7635    # The variable is set, but is it from the command line or the environment?
7636
7637    # Try to remove the string !EXPR! from our list.
7638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7640      # If it failed, the variable was not from the command line. Ignore it,
7641      # but warn the user (except for BASH, which is always set by the calling BASH).
7642      if test "xEXPR" != xBASH; then
7643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7644$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7645      fi
7646      # Try to locate tool using the code snippet
7647      for ac_prog in expr
7648do
7649  # Extract the first word of "$ac_prog", so it can be a program name with args.
7650set dummy $ac_prog; ac_word=$2
7651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7652$as_echo_n "checking for $ac_word... " >&6; }
7653if ${ac_cv_path_EXPR+:} false; then :
7654  $as_echo_n "(cached) " >&6
7655else
7656  case $EXPR in
7657  [\\/]* | ?:[\\/]*)
7658  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7659  ;;
7660  *)
7661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7662for as_dir in $PATH
7663do
7664  IFS=$as_save_IFS
7665  test -z "$as_dir" && as_dir=.
7666    for ac_exec_ext in '' $ac_executable_extensions; do
7667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7668    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7670    break 2
7671  fi
7672done
7673  done
7674IFS=$as_save_IFS
7675
7676  ;;
7677esac
7678fi
7679EXPR=$ac_cv_path_EXPR
7680if test -n "$EXPR"; then
7681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7682$as_echo "$EXPR" >&6; }
7683else
7684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7685$as_echo "no" >&6; }
7686fi
7687
7688
7689  test -n "$EXPR" && break
7690done
7691
7692    else
7693      # If it succeeded, then it was overridden by the user. We will use it
7694      # for the tool.
7695
7696      # First remove it from the list of overridden variables, so we can test
7697      # for unknown variables in the end.
7698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7699
7700      # Check if we try to supply an empty value
7701      if test "x$EXPR" = x; then
7702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7703$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7705$as_echo_n "checking for EXPR... " >&6; }
7706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7707$as_echo "disabled" >&6; }
7708      else
7709        # Check if the provided tool contains a complete path.
7710        tool_specified="$EXPR"
7711        tool_basename="${tool_specified##*/}"
7712        if test "x$tool_basename" = "x$tool_specified"; then
7713          # A command without a complete path is provided, search $PATH.
7714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7715$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7716          # Extract the first word of "$tool_basename", so it can be a program name with args.
7717set dummy $tool_basename; ac_word=$2
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7719$as_echo_n "checking for $ac_word... " >&6; }
7720if ${ac_cv_path_EXPR+:} false; then :
7721  $as_echo_n "(cached) " >&6
7722else
7723  case $EXPR in
7724  [\\/]* | ?:[\\/]*)
7725  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7726  ;;
7727  *)
7728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7729for as_dir in $PATH
7730do
7731  IFS=$as_save_IFS
7732  test -z "$as_dir" && as_dir=.
7733    for ac_exec_ext in '' $ac_executable_extensions; do
7734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7735    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7737    break 2
7738  fi
7739done
7740  done
7741IFS=$as_save_IFS
7742
7743  ;;
7744esac
7745fi
7746EXPR=$ac_cv_path_EXPR
7747if test -n "$EXPR"; then
7748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7749$as_echo "$EXPR" >&6; }
7750else
7751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7752$as_echo "no" >&6; }
7753fi
7754
7755
7756          if test "x$EXPR" = x; then
7757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7758          fi
7759        else
7760          # Otherwise we believe it is a complete path. Use it as it is.
7761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7762$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7764$as_echo_n "checking for EXPR... " >&6; }
7765          if test ! -x "$tool_specified"; then
7766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7767$as_echo "not found" >&6; }
7768            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7769          fi
7770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7771$as_echo "$tool_specified" >&6; }
7772        fi
7773      fi
7774    fi
7775
7776  fi
7777
7778
7779
7780  if test "x$EXPR" = x; then
7781    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7782  fi
7783
7784
7785
7786
7787
7788  # Publish this variable in the help.
7789
7790
7791  if [ -z "${FILE+x}" ]; then
7792    # The variable is not set by user, try to locate tool using the code snippet
7793    for ac_prog in file
7794do
7795  # Extract the first word of "$ac_prog", so it can be a program name with args.
7796set dummy $ac_prog; ac_word=$2
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7798$as_echo_n "checking for $ac_word... " >&6; }
7799if ${ac_cv_path_FILE+:} false; then :
7800  $as_echo_n "(cached) " >&6
7801else
7802  case $FILE in
7803  [\\/]* | ?:[\\/]*)
7804  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7805  ;;
7806  *)
7807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7808for as_dir in $PATH
7809do
7810  IFS=$as_save_IFS
7811  test -z "$as_dir" && as_dir=.
7812    for ac_exec_ext in '' $ac_executable_extensions; do
7813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7814    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7816    break 2
7817  fi
7818done
7819  done
7820IFS=$as_save_IFS
7821
7822  ;;
7823esac
7824fi
7825FILE=$ac_cv_path_FILE
7826if test -n "$FILE"; then
7827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7828$as_echo "$FILE" >&6; }
7829else
7830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7831$as_echo "no" >&6; }
7832fi
7833
7834
7835  test -n "$FILE" && break
7836done
7837
7838  else
7839    # The variable is set, but is it from the command line or the environment?
7840
7841    # Try to remove the string !FILE! from our list.
7842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7844      # If it failed, the variable was not from the command line. Ignore it,
7845      # but warn the user (except for BASH, which is always set by the calling BASH).
7846      if test "xFILE" != xBASH; then
7847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7848$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7849      fi
7850      # Try to locate tool using the code snippet
7851      for ac_prog in file
7852do
7853  # Extract the first word of "$ac_prog", so it can be a program name with args.
7854set dummy $ac_prog; ac_word=$2
7855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7856$as_echo_n "checking for $ac_word... " >&6; }
7857if ${ac_cv_path_FILE+:} false; then :
7858  $as_echo_n "(cached) " >&6
7859else
7860  case $FILE in
7861  [\\/]* | ?:[\\/]*)
7862  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7863  ;;
7864  *)
7865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7866for as_dir in $PATH
7867do
7868  IFS=$as_save_IFS
7869  test -z "$as_dir" && as_dir=.
7870    for ac_exec_ext in '' $ac_executable_extensions; do
7871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7872    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7874    break 2
7875  fi
7876done
7877  done
7878IFS=$as_save_IFS
7879
7880  ;;
7881esac
7882fi
7883FILE=$ac_cv_path_FILE
7884if test -n "$FILE"; then
7885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7886$as_echo "$FILE" >&6; }
7887else
7888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7889$as_echo "no" >&6; }
7890fi
7891
7892
7893  test -n "$FILE" && break
7894done
7895
7896    else
7897      # If it succeeded, then it was overridden by the user. We will use it
7898      # for the tool.
7899
7900      # First remove it from the list of overridden variables, so we can test
7901      # for unknown variables in the end.
7902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7903
7904      # Check if we try to supply an empty value
7905      if test "x$FILE" = x; then
7906        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7907$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7908        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7909$as_echo_n "checking for FILE... " >&6; }
7910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7911$as_echo "disabled" >&6; }
7912      else
7913        # Check if the provided tool contains a complete path.
7914        tool_specified="$FILE"
7915        tool_basename="${tool_specified##*/}"
7916        if test "x$tool_basename" = "x$tool_specified"; then
7917          # A command without a complete path is provided, search $PATH.
7918          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7919$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7920          # Extract the first word of "$tool_basename", so it can be a program name with args.
7921set dummy $tool_basename; ac_word=$2
7922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7923$as_echo_n "checking for $ac_word... " >&6; }
7924if ${ac_cv_path_FILE+:} false; then :
7925  $as_echo_n "(cached) " >&6
7926else
7927  case $FILE in
7928  [\\/]* | ?:[\\/]*)
7929  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7930  ;;
7931  *)
7932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7933for as_dir in $PATH
7934do
7935  IFS=$as_save_IFS
7936  test -z "$as_dir" && as_dir=.
7937    for ac_exec_ext in '' $ac_executable_extensions; do
7938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7939    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7941    break 2
7942  fi
7943done
7944  done
7945IFS=$as_save_IFS
7946
7947  ;;
7948esac
7949fi
7950FILE=$ac_cv_path_FILE
7951if test -n "$FILE"; then
7952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7953$as_echo "$FILE" >&6; }
7954else
7955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7956$as_echo "no" >&6; }
7957fi
7958
7959
7960          if test "x$FILE" = x; then
7961            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7962          fi
7963        else
7964          # Otherwise we believe it is a complete path. Use it as it is.
7965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7966$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7967          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7968$as_echo_n "checking for FILE... " >&6; }
7969          if test ! -x "$tool_specified"; then
7970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7971$as_echo "not found" >&6; }
7972            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7973          fi
7974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7975$as_echo "$tool_specified" >&6; }
7976        fi
7977      fi
7978    fi
7979
7980  fi
7981
7982
7983
7984  if test "x$FILE" = x; then
7985    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7986  fi
7987
7988
7989
7990
7991
7992  # Publish this variable in the help.
7993
7994
7995  if [ -z "${FIND+x}" ]; then
7996    # The variable is not set by user, try to locate tool using the code snippet
7997    for ac_prog in find
7998do
7999  # Extract the first word of "$ac_prog", so it can be a program name with args.
8000set dummy $ac_prog; ac_word=$2
8001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8002$as_echo_n "checking for $ac_word... " >&6; }
8003if ${ac_cv_path_FIND+:} false; then :
8004  $as_echo_n "(cached) " >&6
8005else
8006  case $FIND in
8007  [\\/]* | ?:[\\/]*)
8008  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8009  ;;
8010  *)
8011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8012for as_dir in $PATH
8013do
8014  IFS=$as_save_IFS
8015  test -z "$as_dir" && as_dir=.
8016    for ac_exec_ext in '' $ac_executable_extensions; do
8017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8018    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8020    break 2
8021  fi
8022done
8023  done
8024IFS=$as_save_IFS
8025
8026  ;;
8027esac
8028fi
8029FIND=$ac_cv_path_FIND
8030if test -n "$FIND"; then
8031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8032$as_echo "$FIND" >&6; }
8033else
8034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8035$as_echo "no" >&6; }
8036fi
8037
8038
8039  test -n "$FIND" && break
8040done
8041
8042  else
8043    # The variable is set, but is it from the command line or the environment?
8044
8045    # Try to remove the string !FIND! from our list.
8046    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8047    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8048      # If it failed, the variable was not from the command line. Ignore it,
8049      # but warn the user (except for BASH, which is always set by the calling BASH).
8050      if test "xFIND" != xBASH; then
8051        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8052$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8053      fi
8054      # Try to locate tool using the code snippet
8055      for ac_prog in find
8056do
8057  # Extract the first word of "$ac_prog", so it can be a program name with args.
8058set dummy $ac_prog; ac_word=$2
8059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8060$as_echo_n "checking for $ac_word... " >&6; }
8061if ${ac_cv_path_FIND+:} false; then :
8062  $as_echo_n "(cached) " >&6
8063else
8064  case $FIND in
8065  [\\/]* | ?:[\\/]*)
8066  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8067  ;;
8068  *)
8069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8070for as_dir in $PATH
8071do
8072  IFS=$as_save_IFS
8073  test -z "$as_dir" && as_dir=.
8074    for ac_exec_ext in '' $ac_executable_extensions; do
8075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8076    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8078    break 2
8079  fi
8080done
8081  done
8082IFS=$as_save_IFS
8083
8084  ;;
8085esac
8086fi
8087FIND=$ac_cv_path_FIND
8088if test -n "$FIND"; then
8089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8090$as_echo "$FIND" >&6; }
8091else
8092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8093$as_echo "no" >&6; }
8094fi
8095
8096
8097  test -n "$FIND" && break
8098done
8099
8100    else
8101      # If it succeeded, then it was overridden by the user. We will use it
8102      # for the tool.
8103
8104      # First remove it from the list of overridden variables, so we can test
8105      # for unknown variables in the end.
8106      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8107
8108      # Check if we try to supply an empty value
8109      if test "x$FIND" = x; then
8110        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8111$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8113$as_echo_n "checking for FIND... " >&6; }
8114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8115$as_echo "disabled" >&6; }
8116      else
8117        # Check if the provided tool contains a complete path.
8118        tool_specified="$FIND"
8119        tool_basename="${tool_specified##*/}"
8120        if test "x$tool_basename" = "x$tool_specified"; then
8121          # A command without a complete path is provided, search $PATH.
8122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8123$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8124          # Extract the first word of "$tool_basename", so it can be a program name with args.
8125set dummy $tool_basename; ac_word=$2
8126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8127$as_echo_n "checking for $ac_word... " >&6; }
8128if ${ac_cv_path_FIND+:} false; then :
8129  $as_echo_n "(cached) " >&6
8130else
8131  case $FIND in
8132  [\\/]* | ?:[\\/]*)
8133  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8134  ;;
8135  *)
8136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8137for as_dir in $PATH
8138do
8139  IFS=$as_save_IFS
8140  test -z "$as_dir" && as_dir=.
8141    for ac_exec_ext in '' $ac_executable_extensions; do
8142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8143    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8145    break 2
8146  fi
8147done
8148  done
8149IFS=$as_save_IFS
8150
8151  ;;
8152esac
8153fi
8154FIND=$ac_cv_path_FIND
8155if test -n "$FIND"; then
8156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8157$as_echo "$FIND" >&6; }
8158else
8159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8160$as_echo "no" >&6; }
8161fi
8162
8163
8164          if test "x$FIND" = x; then
8165            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8166          fi
8167        else
8168          # Otherwise we believe it is a complete path. Use it as it is.
8169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8170$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8171          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8172$as_echo_n "checking for FIND... " >&6; }
8173          if test ! -x "$tool_specified"; then
8174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8175$as_echo "not found" >&6; }
8176            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8177          fi
8178          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8179$as_echo "$tool_specified" >&6; }
8180        fi
8181      fi
8182    fi
8183
8184  fi
8185
8186
8187
8188  if test "x$FIND" = x; then
8189    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8190  fi
8191
8192
8193
8194
8195
8196  # Publish this variable in the help.
8197
8198
8199  if [ -z "${HEAD+x}" ]; then
8200    # The variable is not set by user, try to locate tool using the code snippet
8201    for ac_prog in head
8202do
8203  # Extract the first word of "$ac_prog", so it can be a program name with args.
8204set dummy $ac_prog; ac_word=$2
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8206$as_echo_n "checking for $ac_word... " >&6; }
8207if ${ac_cv_path_HEAD+:} false; then :
8208  $as_echo_n "(cached) " >&6
8209else
8210  case $HEAD in
8211  [\\/]* | ?:[\\/]*)
8212  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8213  ;;
8214  *)
8215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8216for as_dir in $PATH
8217do
8218  IFS=$as_save_IFS
8219  test -z "$as_dir" && as_dir=.
8220    for ac_exec_ext in '' $ac_executable_extensions; do
8221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8222    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8224    break 2
8225  fi
8226done
8227  done
8228IFS=$as_save_IFS
8229
8230  ;;
8231esac
8232fi
8233HEAD=$ac_cv_path_HEAD
8234if test -n "$HEAD"; then
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8236$as_echo "$HEAD" >&6; }
8237else
8238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8239$as_echo "no" >&6; }
8240fi
8241
8242
8243  test -n "$HEAD" && break
8244done
8245
8246  else
8247    # The variable is set, but is it from the command line or the environment?
8248
8249    # Try to remove the string !HEAD! from our list.
8250    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8251    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8252      # If it failed, the variable was not from the command line. Ignore it,
8253      # but warn the user (except for BASH, which is always set by the calling BASH).
8254      if test "xHEAD" != xBASH; then
8255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8256$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8257      fi
8258      # Try to locate tool using the code snippet
8259      for ac_prog in head
8260do
8261  # Extract the first word of "$ac_prog", so it can be a program name with args.
8262set dummy $ac_prog; ac_word=$2
8263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8264$as_echo_n "checking for $ac_word... " >&6; }
8265if ${ac_cv_path_HEAD+:} false; then :
8266  $as_echo_n "(cached) " >&6
8267else
8268  case $HEAD in
8269  [\\/]* | ?:[\\/]*)
8270  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8271  ;;
8272  *)
8273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8274for as_dir in $PATH
8275do
8276  IFS=$as_save_IFS
8277  test -z "$as_dir" && as_dir=.
8278    for ac_exec_ext in '' $ac_executable_extensions; do
8279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8280    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8282    break 2
8283  fi
8284done
8285  done
8286IFS=$as_save_IFS
8287
8288  ;;
8289esac
8290fi
8291HEAD=$ac_cv_path_HEAD
8292if test -n "$HEAD"; then
8293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8294$as_echo "$HEAD" >&6; }
8295else
8296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8297$as_echo "no" >&6; }
8298fi
8299
8300
8301  test -n "$HEAD" && break
8302done
8303
8304    else
8305      # If it succeeded, then it was overridden by the user. We will use it
8306      # for the tool.
8307
8308      # First remove it from the list of overridden variables, so we can test
8309      # for unknown variables in the end.
8310      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8311
8312      # Check if we try to supply an empty value
8313      if test "x$HEAD" = x; then
8314        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8315$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8317$as_echo_n "checking for HEAD... " >&6; }
8318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8319$as_echo "disabled" >&6; }
8320      else
8321        # Check if the provided tool contains a complete path.
8322        tool_specified="$HEAD"
8323        tool_basename="${tool_specified##*/}"
8324        if test "x$tool_basename" = "x$tool_specified"; then
8325          # A command without a complete path is provided, search $PATH.
8326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8327$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8328          # Extract the first word of "$tool_basename", so it can be a program name with args.
8329set dummy $tool_basename; ac_word=$2
8330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8331$as_echo_n "checking for $ac_word... " >&6; }
8332if ${ac_cv_path_HEAD+:} false; then :
8333  $as_echo_n "(cached) " >&6
8334else
8335  case $HEAD in
8336  [\\/]* | ?:[\\/]*)
8337  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8338  ;;
8339  *)
8340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8341for as_dir in $PATH
8342do
8343  IFS=$as_save_IFS
8344  test -z "$as_dir" && as_dir=.
8345    for ac_exec_ext in '' $ac_executable_extensions; do
8346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8347    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8349    break 2
8350  fi
8351done
8352  done
8353IFS=$as_save_IFS
8354
8355  ;;
8356esac
8357fi
8358HEAD=$ac_cv_path_HEAD
8359if test -n "$HEAD"; then
8360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8361$as_echo "$HEAD" >&6; }
8362else
8363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8364$as_echo "no" >&6; }
8365fi
8366
8367
8368          if test "x$HEAD" = x; then
8369            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8370          fi
8371        else
8372          # Otherwise we believe it is a complete path. Use it as it is.
8373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8374$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8375          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8376$as_echo_n "checking for HEAD... " >&6; }
8377          if test ! -x "$tool_specified"; then
8378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8379$as_echo "not found" >&6; }
8380            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8381          fi
8382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8383$as_echo "$tool_specified" >&6; }
8384        fi
8385      fi
8386    fi
8387
8388  fi
8389
8390
8391
8392  if test "x$HEAD" = x; then
8393    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8394  fi
8395
8396
8397
8398
8399
8400  # Publish this variable in the help.
8401
8402
8403  if [ -z "${GUNZIP+x}" ]; then
8404    # The variable is not set by user, try to locate tool using the code snippet
8405    for ac_prog in gunzip
8406do
8407  # Extract the first word of "$ac_prog", so it can be a program name with args.
8408set dummy $ac_prog; ac_word=$2
8409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8410$as_echo_n "checking for $ac_word... " >&6; }
8411if ${ac_cv_path_GUNZIP+:} false; then :
8412  $as_echo_n "(cached) " >&6
8413else
8414  case $GUNZIP in
8415  [\\/]* | ?:[\\/]*)
8416  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8417  ;;
8418  *)
8419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8420for as_dir in $PATH
8421do
8422  IFS=$as_save_IFS
8423  test -z "$as_dir" && as_dir=.
8424    for ac_exec_ext in '' $ac_executable_extensions; do
8425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8426    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8428    break 2
8429  fi
8430done
8431  done
8432IFS=$as_save_IFS
8433
8434  ;;
8435esac
8436fi
8437GUNZIP=$ac_cv_path_GUNZIP
8438if test -n "$GUNZIP"; then
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8440$as_echo "$GUNZIP" >&6; }
8441else
8442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8443$as_echo "no" >&6; }
8444fi
8445
8446
8447  test -n "$GUNZIP" && break
8448done
8449
8450  else
8451    # The variable is set, but is it from the command line or the environment?
8452
8453    # Try to remove the string !GUNZIP! from our list.
8454    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8455    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8456      # If it failed, the variable was not from the command line. Ignore it,
8457      # but warn the user (except for BASH, which is always set by the calling BASH).
8458      if test "xGUNZIP" != xBASH; then
8459        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8460$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8461      fi
8462      # Try to locate tool using the code snippet
8463      for ac_prog in gunzip
8464do
8465  # Extract the first word of "$ac_prog", so it can be a program name with args.
8466set dummy $ac_prog; ac_word=$2
8467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8468$as_echo_n "checking for $ac_word... " >&6; }
8469if ${ac_cv_path_GUNZIP+:} false; then :
8470  $as_echo_n "(cached) " >&6
8471else
8472  case $GUNZIP in
8473  [\\/]* | ?:[\\/]*)
8474  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8475  ;;
8476  *)
8477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8478for as_dir in $PATH
8479do
8480  IFS=$as_save_IFS
8481  test -z "$as_dir" && as_dir=.
8482    for ac_exec_ext in '' $ac_executable_extensions; do
8483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8484    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8486    break 2
8487  fi
8488done
8489  done
8490IFS=$as_save_IFS
8491
8492  ;;
8493esac
8494fi
8495GUNZIP=$ac_cv_path_GUNZIP
8496if test -n "$GUNZIP"; then
8497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8498$as_echo "$GUNZIP" >&6; }
8499else
8500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8501$as_echo "no" >&6; }
8502fi
8503
8504
8505  test -n "$GUNZIP" && break
8506done
8507
8508    else
8509      # If it succeeded, then it was overridden by the user. We will use it
8510      # for the tool.
8511
8512      # First remove it from the list of overridden variables, so we can test
8513      # for unknown variables in the end.
8514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8515
8516      # Check if we try to supply an empty value
8517      if test "x$GUNZIP" = x; then
8518        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8519$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8521$as_echo_n "checking for GUNZIP... " >&6; }
8522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8523$as_echo "disabled" >&6; }
8524      else
8525        # Check if the provided tool contains a complete path.
8526        tool_specified="$GUNZIP"
8527        tool_basename="${tool_specified##*/}"
8528        if test "x$tool_basename" = "x$tool_specified"; then
8529          # A command without a complete path is provided, search $PATH.
8530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8531$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8532          # Extract the first word of "$tool_basename", so it can be a program name with args.
8533set dummy $tool_basename; ac_word=$2
8534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8535$as_echo_n "checking for $ac_word... " >&6; }
8536if ${ac_cv_path_GUNZIP+:} false; then :
8537  $as_echo_n "(cached) " >&6
8538else
8539  case $GUNZIP in
8540  [\\/]* | ?:[\\/]*)
8541  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8542  ;;
8543  *)
8544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8545for as_dir in $PATH
8546do
8547  IFS=$as_save_IFS
8548  test -z "$as_dir" && as_dir=.
8549    for ac_exec_ext in '' $ac_executable_extensions; do
8550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8551    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8553    break 2
8554  fi
8555done
8556  done
8557IFS=$as_save_IFS
8558
8559  ;;
8560esac
8561fi
8562GUNZIP=$ac_cv_path_GUNZIP
8563if test -n "$GUNZIP"; then
8564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8565$as_echo "$GUNZIP" >&6; }
8566else
8567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8568$as_echo "no" >&6; }
8569fi
8570
8571
8572          if test "x$GUNZIP" = x; then
8573            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8574          fi
8575        else
8576          # Otherwise we believe it is a complete path. Use it as it is.
8577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8578$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8579          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8580$as_echo_n "checking for GUNZIP... " >&6; }
8581          if test ! -x "$tool_specified"; then
8582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8583$as_echo "not found" >&6; }
8584            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8585          fi
8586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8587$as_echo "$tool_specified" >&6; }
8588        fi
8589      fi
8590    fi
8591
8592  fi
8593
8594
8595
8596  if test "x$GUNZIP" = x; then
8597    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8598  fi
8599
8600
8601
8602
8603
8604  # Publish this variable in the help.
8605
8606
8607  if [ -z "${GZIP+x}" ]; then
8608    # The variable is not set by user, try to locate tool using the code snippet
8609    for ac_prog in pigz gzip
8610do
8611  # Extract the first word of "$ac_prog", so it can be a program name with args.
8612set dummy $ac_prog; ac_word=$2
8613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8614$as_echo_n "checking for $ac_word... " >&6; }
8615if ${ac_cv_path_GZIP+:} false; then :
8616  $as_echo_n "(cached) " >&6
8617else
8618  case $GZIP in
8619  [\\/]* | ?:[\\/]*)
8620  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8621  ;;
8622  *)
8623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8624for as_dir in $PATH
8625do
8626  IFS=$as_save_IFS
8627  test -z "$as_dir" && as_dir=.
8628    for ac_exec_ext in '' $ac_executable_extensions; do
8629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8630    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8632    break 2
8633  fi
8634done
8635  done
8636IFS=$as_save_IFS
8637
8638  ;;
8639esac
8640fi
8641GZIP=$ac_cv_path_GZIP
8642if test -n "$GZIP"; then
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8644$as_echo "$GZIP" >&6; }
8645else
8646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8647$as_echo "no" >&6; }
8648fi
8649
8650
8651  test -n "$GZIP" && break
8652done
8653
8654  else
8655    # The variable is set, but is it from the command line or the environment?
8656
8657    # Try to remove the string !GZIP! from our list.
8658    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8659    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8660      # If it failed, the variable was not from the command line. Ignore it,
8661      # but warn the user (except for BASH, which is always set by the calling BASH).
8662      if test "xGZIP" != xBASH; then
8663        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8664$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8665      fi
8666      # Try to locate tool using the code snippet
8667      for ac_prog in pigz gzip
8668do
8669  # Extract the first word of "$ac_prog", so it can be a program name with args.
8670set dummy $ac_prog; ac_word=$2
8671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8672$as_echo_n "checking for $ac_word... " >&6; }
8673if ${ac_cv_path_GZIP+:} false; then :
8674  $as_echo_n "(cached) " >&6
8675else
8676  case $GZIP in
8677  [\\/]* | ?:[\\/]*)
8678  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8679  ;;
8680  *)
8681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8682for as_dir in $PATH
8683do
8684  IFS=$as_save_IFS
8685  test -z "$as_dir" && as_dir=.
8686    for ac_exec_ext in '' $ac_executable_extensions; do
8687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8688    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8690    break 2
8691  fi
8692done
8693  done
8694IFS=$as_save_IFS
8695
8696  ;;
8697esac
8698fi
8699GZIP=$ac_cv_path_GZIP
8700if test -n "$GZIP"; then
8701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8702$as_echo "$GZIP" >&6; }
8703else
8704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8705$as_echo "no" >&6; }
8706fi
8707
8708
8709  test -n "$GZIP" && break
8710done
8711
8712    else
8713      # If it succeeded, then it was overridden by the user. We will use it
8714      # for the tool.
8715
8716      # First remove it from the list of overridden variables, so we can test
8717      # for unknown variables in the end.
8718      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8719
8720      # Check if we try to supply an empty value
8721      if test "x$GZIP" = x; then
8722        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8723$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8724        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8725$as_echo_n "checking for GZIP... " >&6; }
8726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8727$as_echo "disabled" >&6; }
8728      else
8729        # Check if the provided tool contains a complete path.
8730        tool_specified="$GZIP"
8731        tool_basename="${tool_specified##*/}"
8732        if test "x$tool_basename" = "x$tool_specified"; then
8733          # A command without a complete path is provided, search $PATH.
8734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8735$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8736          # Extract the first word of "$tool_basename", so it can be a program name with args.
8737set dummy $tool_basename; ac_word=$2
8738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8739$as_echo_n "checking for $ac_word... " >&6; }
8740if ${ac_cv_path_GZIP+:} false; then :
8741  $as_echo_n "(cached) " >&6
8742else
8743  case $GZIP in
8744  [\\/]* | ?:[\\/]*)
8745  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8746  ;;
8747  *)
8748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8749for as_dir in $PATH
8750do
8751  IFS=$as_save_IFS
8752  test -z "$as_dir" && as_dir=.
8753    for ac_exec_ext in '' $ac_executable_extensions; do
8754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8755    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8757    break 2
8758  fi
8759done
8760  done
8761IFS=$as_save_IFS
8762
8763  ;;
8764esac
8765fi
8766GZIP=$ac_cv_path_GZIP
8767if test -n "$GZIP"; then
8768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8769$as_echo "$GZIP" >&6; }
8770else
8771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8772$as_echo "no" >&6; }
8773fi
8774
8775
8776          if test "x$GZIP" = x; then
8777            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8778          fi
8779        else
8780          # Otherwise we believe it is a complete path. Use it as it is.
8781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8782$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8783          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8784$as_echo_n "checking for GZIP... " >&6; }
8785          if test ! -x "$tool_specified"; then
8786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8787$as_echo "not found" >&6; }
8788            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8789          fi
8790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8791$as_echo "$tool_specified" >&6; }
8792        fi
8793      fi
8794    fi
8795
8796  fi
8797
8798
8799
8800  if test "x$GZIP" = x; then
8801    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8802  fi
8803
8804
8805
8806
8807
8808  # Publish this variable in the help.
8809
8810
8811  if [ -z "${LN+x}" ]; then
8812    # The variable is not set by user, try to locate tool using the code snippet
8813    for ac_prog in ln
8814do
8815  # Extract the first word of "$ac_prog", so it can be a program name with args.
8816set dummy $ac_prog; ac_word=$2
8817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8818$as_echo_n "checking for $ac_word... " >&6; }
8819if ${ac_cv_path_LN+:} false; then :
8820  $as_echo_n "(cached) " >&6
8821else
8822  case $LN in
8823  [\\/]* | ?:[\\/]*)
8824  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8825  ;;
8826  *)
8827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8828for as_dir in $PATH
8829do
8830  IFS=$as_save_IFS
8831  test -z "$as_dir" && as_dir=.
8832    for ac_exec_ext in '' $ac_executable_extensions; do
8833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8834    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8836    break 2
8837  fi
8838done
8839  done
8840IFS=$as_save_IFS
8841
8842  ;;
8843esac
8844fi
8845LN=$ac_cv_path_LN
8846if test -n "$LN"; then
8847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8848$as_echo "$LN" >&6; }
8849else
8850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8851$as_echo "no" >&6; }
8852fi
8853
8854
8855  test -n "$LN" && break
8856done
8857
8858  else
8859    # The variable is set, but is it from the command line or the environment?
8860
8861    # Try to remove the string !LN! from our list.
8862    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8863    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8864      # If it failed, the variable was not from the command line. Ignore it,
8865      # but warn the user (except for BASH, which is always set by the calling BASH).
8866      if test "xLN" != xBASH; then
8867        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8868$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8869      fi
8870      # Try to locate tool using the code snippet
8871      for ac_prog in ln
8872do
8873  # Extract the first word of "$ac_prog", so it can be a program name with args.
8874set dummy $ac_prog; ac_word=$2
8875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8876$as_echo_n "checking for $ac_word... " >&6; }
8877if ${ac_cv_path_LN+:} false; then :
8878  $as_echo_n "(cached) " >&6
8879else
8880  case $LN in
8881  [\\/]* | ?:[\\/]*)
8882  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8883  ;;
8884  *)
8885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8886for as_dir in $PATH
8887do
8888  IFS=$as_save_IFS
8889  test -z "$as_dir" && as_dir=.
8890    for ac_exec_ext in '' $ac_executable_extensions; do
8891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8892    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8894    break 2
8895  fi
8896done
8897  done
8898IFS=$as_save_IFS
8899
8900  ;;
8901esac
8902fi
8903LN=$ac_cv_path_LN
8904if test -n "$LN"; then
8905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8906$as_echo "$LN" >&6; }
8907else
8908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8909$as_echo "no" >&6; }
8910fi
8911
8912
8913  test -n "$LN" && break
8914done
8915
8916    else
8917      # If it succeeded, then it was overridden by the user. We will use it
8918      # for the tool.
8919
8920      # First remove it from the list of overridden variables, so we can test
8921      # for unknown variables in the end.
8922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8923
8924      # Check if we try to supply an empty value
8925      if test "x$LN" = x; then
8926        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8927$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8929$as_echo_n "checking for LN... " >&6; }
8930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8931$as_echo "disabled" >&6; }
8932      else
8933        # Check if the provided tool contains a complete path.
8934        tool_specified="$LN"
8935        tool_basename="${tool_specified##*/}"
8936        if test "x$tool_basename" = "x$tool_specified"; then
8937          # A command without a complete path is provided, search $PATH.
8938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8939$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8940          # Extract the first word of "$tool_basename", so it can be a program name with args.
8941set dummy $tool_basename; ac_word=$2
8942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8943$as_echo_n "checking for $ac_word... " >&6; }
8944if ${ac_cv_path_LN+:} false; then :
8945  $as_echo_n "(cached) " >&6
8946else
8947  case $LN in
8948  [\\/]* | ?:[\\/]*)
8949  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8950  ;;
8951  *)
8952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8953for as_dir in $PATH
8954do
8955  IFS=$as_save_IFS
8956  test -z "$as_dir" && as_dir=.
8957    for ac_exec_ext in '' $ac_executable_extensions; do
8958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8959    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8961    break 2
8962  fi
8963done
8964  done
8965IFS=$as_save_IFS
8966
8967  ;;
8968esac
8969fi
8970LN=$ac_cv_path_LN
8971if test -n "$LN"; then
8972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8973$as_echo "$LN" >&6; }
8974else
8975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8976$as_echo "no" >&6; }
8977fi
8978
8979
8980          if test "x$LN" = x; then
8981            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8982          fi
8983        else
8984          # Otherwise we believe it is a complete path. Use it as it is.
8985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8986$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8987          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8988$as_echo_n "checking for LN... " >&6; }
8989          if test ! -x "$tool_specified"; then
8990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8991$as_echo "not found" >&6; }
8992            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8993          fi
8994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8995$as_echo "$tool_specified" >&6; }
8996        fi
8997      fi
8998    fi
8999
9000  fi
9001
9002
9003
9004  if test "x$LN" = x; then
9005    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9006  fi
9007
9008
9009
9010
9011
9012  # Publish this variable in the help.
9013
9014
9015  if [ -z "${LS+x}" ]; then
9016    # The variable is not set by user, try to locate tool using the code snippet
9017    for ac_prog in ls
9018do
9019  # Extract the first word of "$ac_prog", so it can be a program name with args.
9020set dummy $ac_prog; ac_word=$2
9021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9022$as_echo_n "checking for $ac_word... " >&6; }
9023if ${ac_cv_path_LS+:} false; then :
9024  $as_echo_n "(cached) " >&6
9025else
9026  case $LS in
9027  [\\/]* | ?:[\\/]*)
9028  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9029  ;;
9030  *)
9031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9032for as_dir in $PATH
9033do
9034  IFS=$as_save_IFS
9035  test -z "$as_dir" && as_dir=.
9036    for ac_exec_ext in '' $ac_executable_extensions; do
9037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9038    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9040    break 2
9041  fi
9042done
9043  done
9044IFS=$as_save_IFS
9045
9046  ;;
9047esac
9048fi
9049LS=$ac_cv_path_LS
9050if test -n "$LS"; then
9051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9052$as_echo "$LS" >&6; }
9053else
9054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9055$as_echo "no" >&6; }
9056fi
9057
9058
9059  test -n "$LS" && break
9060done
9061
9062  else
9063    # The variable is set, but is it from the command line or the environment?
9064
9065    # Try to remove the string !LS! from our list.
9066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9068      # If it failed, the variable was not from the command line. Ignore it,
9069      # but warn the user (except for BASH, which is always set by the calling BASH).
9070      if test "xLS" != xBASH; then
9071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9072$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9073      fi
9074      # Try to locate tool using the code snippet
9075      for ac_prog in ls
9076do
9077  # Extract the first word of "$ac_prog", so it can be a program name with args.
9078set dummy $ac_prog; ac_word=$2
9079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9080$as_echo_n "checking for $ac_word... " >&6; }
9081if ${ac_cv_path_LS+:} false; then :
9082  $as_echo_n "(cached) " >&6
9083else
9084  case $LS in
9085  [\\/]* | ?:[\\/]*)
9086  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9087  ;;
9088  *)
9089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9090for as_dir in $PATH
9091do
9092  IFS=$as_save_IFS
9093  test -z "$as_dir" && as_dir=.
9094    for ac_exec_ext in '' $ac_executable_extensions; do
9095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9096    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9098    break 2
9099  fi
9100done
9101  done
9102IFS=$as_save_IFS
9103
9104  ;;
9105esac
9106fi
9107LS=$ac_cv_path_LS
9108if test -n "$LS"; then
9109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9110$as_echo "$LS" >&6; }
9111else
9112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9113$as_echo "no" >&6; }
9114fi
9115
9116
9117  test -n "$LS" && break
9118done
9119
9120    else
9121      # If it succeeded, then it was overridden by the user. We will use it
9122      # for the tool.
9123
9124      # First remove it from the list of overridden variables, so we can test
9125      # for unknown variables in the end.
9126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9127
9128      # Check if we try to supply an empty value
9129      if test "x$LS" = x; then
9130        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9131$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9133$as_echo_n "checking for LS... " >&6; }
9134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9135$as_echo "disabled" >&6; }
9136      else
9137        # Check if the provided tool contains a complete path.
9138        tool_specified="$LS"
9139        tool_basename="${tool_specified##*/}"
9140        if test "x$tool_basename" = "x$tool_specified"; then
9141          # A command without a complete path is provided, search $PATH.
9142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9143$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9144          # Extract the first word of "$tool_basename", so it can be a program name with args.
9145set dummy $tool_basename; ac_word=$2
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9147$as_echo_n "checking for $ac_word... " >&6; }
9148if ${ac_cv_path_LS+:} false; then :
9149  $as_echo_n "(cached) " >&6
9150else
9151  case $LS in
9152  [\\/]* | ?:[\\/]*)
9153  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9154  ;;
9155  *)
9156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9157for as_dir in $PATH
9158do
9159  IFS=$as_save_IFS
9160  test -z "$as_dir" && as_dir=.
9161    for ac_exec_ext in '' $ac_executable_extensions; do
9162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9163    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9165    break 2
9166  fi
9167done
9168  done
9169IFS=$as_save_IFS
9170
9171  ;;
9172esac
9173fi
9174LS=$ac_cv_path_LS
9175if test -n "$LS"; then
9176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9177$as_echo "$LS" >&6; }
9178else
9179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9180$as_echo "no" >&6; }
9181fi
9182
9183
9184          if test "x$LS" = x; then
9185            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9186          fi
9187        else
9188          # Otherwise we believe it is a complete path. Use it as it is.
9189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9190$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9191          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9192$as_echo_n "checking for LS... " >&6; }
9193          if test ! -x "$tool_specified"; then
9194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9195$as_echo "not found" >&6; }
9196            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9197          fi
9198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9199$as_echo "$tool_specified" >&6; }
9200        fi
9201      fi
9202    fi
9203
9204  fi
9205
9206
9207
9208  if test "x$LS" = x; then
9209    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9210  fi
9211
9212
9213
9214
9215
9216  # Publish this variable in the help.
9217
9218
9219  if [ -z "${MKDIR+x}" ]; then
9220    # The variable is not set by user, try to locate tool using the code snippet
9221    for ac_prog in mkdir
9222do
9223  # Extract the first word of "$ac_prog", so it can be a program name with args.
9224set dummy $ac_prog; ac_word=$2
9225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9226$as_echo_n "checking for $ac_word... " >&6; }
9227if ${ac_cv_path_MKDIR+:} false; then :
9228  $as_echo_n "(cached) " >&6
9229else
9230  case $MKDIR in
9231  [\\/]* | ?:[\\/]*)
9232  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9233  ;;
9234  *)
9235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236for as_dir in $PATH
9237do
9238  IFS=$as_save_IFS
9239  test -z "$as_dir" && as_dir=.
9240    for ac_exec_ext in '' $ac_executable_extensions; do
9241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9242    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9244    break 2
9245  fi
9246done
9247  done
9248IFS=$as_save_IFS
9249
9250  ;;
9251esac
9252fi
9253MKDIR=$ac_cv_path_MKDIR
9254if test -n "$MKDIR"; then
9255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9256$as_echo "$MKDIR" >&6; }
9257else
9258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
9260fi
9261
9262
9263  test -n "$MKDIR" && break
9264done
9265
9266  else
9267    # The variable is set, but is it from the command line or the environment?
9268
9269    # Try to remove the string !MKDIR! from our list.
9270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9272      # If it failed, the variable was not from the command line. Ignore it,
9273      # but warn the user (except for BASH, which is always set by the calling BASH).
9274      if test "xMKDIR" != xBASH; then
9275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9276$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9277      fi
9278      # Try to locate tool using the code snippet
9279      for ac_prog in mkdir
9280do
9281  # Extract the first word of "$ac_prog", so it can be a program name with args.
9282set dummy $ac_prog; ac_word=$2
9283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9284$as_echo_n "checking for $ac_word... " >&6; }
9285if ${ac_cv_path_MKDIR+:} false; then :
9286  $as_echo_n "(cached) " >&6
9287else
9288  case $MKDIR in
9289  [\\/]* | ?:[\\/]*)
9290  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9291  ;;
9292  *)
9293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9294for as_dir in $PATH
9295do
9296  IFS=$as_save_IFS
9297  test -z "$as_dir" && as_dir=.
9298    for ac_exec_ext in '' $ac_executable_extensions; do
9299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9300    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9302    break 2
9303  fi
9304done
9305  done
9306IFS=$as_save_IFS
9307
9308  ;;
9309esac
9310fi
9311MKDIR=$ac_cv_path_MKDIR
9312if test -n "$MKDIR"; then
9313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9314$as_echo "$MKDIR" >&6; }
9315else
9316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9317$as_echo "no" >&6; }
9318fi
9319
9320
9321  test -n "$MKDIR" && break
9322done
9323
9324    else
9325      # If it succeeded, then it was overridden by the user. We will use it
9326      # for the tool.
9327
9328      # First remove it from the list of overridden variables, so we can test
9329      # for unknown variables in the end.
9330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9331
9332      # Check if we try to supply an empty value
9333      if test "x$MKDIR" = x; then
9334        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9335$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9337$as_echo_n "checking for MKDIR... " >&6; }
9338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9339$as_echo "disabled" >&6; }
9340      else
9341        # Check if the provided tool contains a complete path.
9342        tool_specified="$MKDIR"
9343        tool_basename="${tool_specified##*/}"
9344        if test "x$tool_basename" = "x$tool_specified"; then
9345          # A command without a complete path is provided, search $PATH.
9346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9347$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9348          # Extract the first word of "$tool_basename", so it can be a program name with args.
9349set dummy $tool_basename; ac_word=$2
9350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9351$as_echo_n "checking for $ac_word... " >&6; }
9352if ${ac_cv_path_MKDIR+:} false; then :
9353  $as_echo_n "(cached) " >&6
9354else
9355  case $MKDIR in
9356  [\\/]* | ?:[\\/]*)
9357  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9358  ;;
9359  *)
9360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9361for as_dir in $PATH
9362do
9363  IFS=$as_save_IFS
9364  test -z "$as_dir" && as_dir=.
9365    for ac_exec_ext in '' $ac_executable_extensions; do
9366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9367    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9369    break 2
9370  fi
9371done
9372  done
9373IFS=$as_save_IFS
9374
9375  ;;
9376esac
9377fi
9378MKDIR=$ac_cv_path_MKDIR
9379if test -n "$MKDIR"; then
9380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9381$as_echo "$MKDIR" >&6; }
9382else
9383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9384$as_echo "no" >&6; }
9385fi
9386
9387
9388          if test "x$MKDIR" = x; then
9389            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9390          fi
9391        else
9392          # Otherwise we believe it is a complete path. Use it as it is.
9393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9394$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9395          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9396$as_echo_n "checking for MKDIR... " >&6; }
9397          if test ! -x "$tool_specified"; then
9398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9399$as_echo "not found" >&6; }
9400            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9401          fi
9402          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9403$as_echo "$tool_specified" >&6; }
9404        fi
9405      fi
9406    fi
9407
9408  fi
9409
9410
9411
9412  if test "x$MKDIR" = x; then
9413    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9414  fi
9415
9416
9417
9418
9419
9420  # Publish this variable in the help.
9421
9422
9423  if [ -z "${MKTEMP+x}" ]; then
9424    # The variable is not set by user, try to locate tool using the code snippet
9425    for ac_prog in mktemp
9426do
9427  # Extract the first word of "$ac_prog", so it can be a program name with args.
9428set dummy $ac_prog; ac_word=$2
9429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9430$as_echo_n "checking for $ac_word... " >&6; }
9431if ${ac_cv_path_MKTEMP+:} false; then :
9432  $as_echo_n "(cached) " >&6
9433else
9434  case $MKTEMP in
9435  [\\/]* | ?:[\\/]*)
9436  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9437  ;;
9438  *)
9439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9440for as_dir in $PATH
9441do
9442  IFS=$as_save_IFS
9443  test -z "$as_dir" && as_dir=.
9444    for ac_exec_ext in '' $ac_executable_extensions; do
9445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9446    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9448    break 2
9449  fi
9450done
9451  done
9452IFS=$as_save_IFS
9453
9454  ;;
9455esac
9456fi
9457MKTEMP=$ac_cv_path_MKTEMP
9458if test -n "$MKTEMP"; then
9459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9460$as_echo "$MKTEMP" >&6; }
9461else
9462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
9464fi
9465
9466
9467  test -n "$MKTEMP" && break
9468done
9469
9470  else
9471    # The variable is set, but is it from the command line or the environment?
9472
9473    # Try to remove the string !MKTEMP! from our list.
9474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9476      # If it failed, the variable was not from the command line. Ignore it,
9477      # but warn the user (except for BASH, which is always set by the calling BASH).
9478      if test "xMKTEMP" != xBASH; then
9479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9480$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9481      fi
9482      # Try to locate tool using the code snippet
9483      for ac_prog in mktemp
9484do
9485  # Extract the first word of "$ac_prog", so it can be a program name with args.
9486set dummy $ac_prog; ac_word=$2
9487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9488$as_echo_n "checking for $ac_word... " >&6; }
9489if ${ac_cv_path_MKTEMP+:} false; then :
9490  $as_echo_n "(cached) " >&6
9491else
9492  case $MKTEMP in
9493  [\\/]* | ?:[\\/]*)
9494  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9495  ;;
9496  *)
9497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9498for as_dir in $PATH
9499do
9500  IFS=$as_save_IFS
9501  test -z "$as_dir" && as_dir=.
9502    for ac_exec_ext in '' $ac_executable_extensions; do
9503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9504    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9506    break 2
9507  fi
9508done
9509  done
9510IFS=$as_save_IFS
9511
9512  ;;
9513esac
9514fi
9515MKTEMP=$ac_cv_path_MKTEMP
9516if test -n "$MKTEMP"; then
9517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9518$as_echo "$MKTEMP" >&6; }
9519else
9520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9521$as_echo "no" >&6; }
9522fi
9523
9524
9525  test -n "$MKTEMP" && break
9526done
9527
9528    else
9529      # If it succeeded, then it was overridden by the user. We will use it
9530      # for the tool.
9531
9532      # First remove it from the list of overridden variables, so we can test
9533      # for unknown variables in the end.
9534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9535
9536      # Check if we try to supply an empty value
9537      if test "x$MKTEMP" = x; then
9538        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9539$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9541$as_echo_n "checking for MKTEMP... " >&6; }
9542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9543$as_echo "disabled" >&6; }
9544      else
9545        # Check if the provided tool contains a complete path.
9546        tool_specified="$MKTEMP"
9547        tool_basename="${tool_specified##*/}"
9548        if test "x$tool_basename" = "x$tool_specified"; then
9549          # A command without a complete path is provided, search $PATH.
9550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9551$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9552          # Extract the first word of "$tool_basename", so it can be a program name with args.
9553set dummy $tool_basename; ac_word=$2
9554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9555$as_echo_n "checking for $ac_word... " >&6; }
9556if ${ac_cv_path_MKTEMP+:} false; then :
9557  $as_echo_n "(cached) " >&6
9558else
9559  case $MKTEMP in
9560  [\\/]* | ?:[\\/]*)
9561  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9562  ;;
9563  *)
9564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9565for as_dir in $PATH
9566do
9567  IFS=$as_save_IFS
9568  test -z "$as_dir" && as_dir=.
9569    for ac_exec_ext in '' $ac_executable_extensions; do
9570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9571    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9573    break 2
9574  fi
9575done
9576  done
9577IFS=$as_save_IFS
9578
9579  ;;
9580esac
9581fi
9582MKTEMP=$ac_cv_path_MKTEMP
9583if test -n "$MKTEMP"; then
9584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9585$as_echo "$MKTEMP" >&6; }
9586else
9587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9588$as_echo "no" >&6; }
9589fi
9590
9591
9592          if test "x$MKTEMP" = x; then
9593            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9594          fi
9595        else
9596          # Otherwise we believe it is a complete path. Use it as it is.
9597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9598$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9599          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9600$as_echo_n "checking for MKTEMP... " >&6; }
9601          if test ! -x "$tool_specified"; then
9602            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9603$as_echo "not found" >&6; }
9604            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9605          fi
9606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9607$as_echo "$tool_specified" >&6; }
9608        fi
9609      fi
9610    fi
9611
9612  fi
9613
9614
9615
9616  if test "x$MKTEMP" = x; then
9617    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9618  fi
9619
9620
9621
9622
9623
9624  # Publish this variable in the help.
9625
9626
9627  if [ -z "${MV+x}" ]; then
9628    # The variable is not set by user, try to locate tool using the code snippet
9629    for ac_prog in mv
9630do
9631  # Extract the first word of "$ac_prog", so it can be a program name with args.
9632set dummy $ac_prog; ac_word=$2
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9634$as_echo_n "checking for $ac_word... " >&6; }
9635if ${ac_cv_path_MV+:} false; then :
9636  $as_echo_n "(cached) " >&6
9637else
9638  case $MV in
9639  [\\/]* | ?:[\\/]*)
9640  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9641  ;;
9642  *)
9643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9644for as_dir in $PATH
9645do
9646  IFS=$as_save_IFS
9647  test -z "$as_dir" && as_dir=.
9648    for ac_exec_ext in '' $ac_executable_extensions; do
9649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9650    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9652    break 2
9653  fi
9654done
9655  done
9656IFS=$as_save_IFS
9657
9658  ;;
9659esac
9660fi
9661MV=$ac_cv_path_MV
9662if test -n "$MV"; then
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9664$as_echo "$MV" >&6; }
9665else
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667$as_echo "no" >&6; }
9668fi
9669
9670
9671  test -n "$MV" && break
9672done
9673
9674  else
9675    # The variable is set, but is it from the command line or the environment?
9676
9677    # Try to remove the string !MV! from our list.
9678    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9679    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9680      # If it failed, the variable was not from the command line. Ignore it,
9681      # but warn the user (except for BASH, which is always set by the calling BASH).
9682      if test "xMV" != xBASH; then
9683        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9684$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9685      fi
9686      # Try to locate tool using the code snippet
9687      for ac_prog in mv
9688do
9689  # Extract the first word of "$ac_prog", so it can be a program name with args.
9690set dummy $ac_prog; ac_word=$2
9691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9692$as_echo_n "checking for $ac_word... " >&6; }
9693if ${ac_cv_path_MV+:} false; then :
9694  $as_echo_n "(cached) " >&6
9695else
9696  case $MV in
9697  [\\/]* | ?:[\\/]*)
9698  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9699  ;;
9700  *)
9701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9702for as_dir in $PATH
9703do
9704  IFS=$as_save_IFS
9705  test -z "$as_dir" && as_dir=.
9706    for ac_exec_ext in '' $ac_executable_extensions; do
9707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9708    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9710    break 2
9711  fi
9712done
9713  done
9714IFS=$as_save_IFS
9715
9716  ;;
9717esac
9718fi
9719MV=$ac_cv_path_MV
9720if test -n "$MV"; then
9721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9722$as_echo "$MV" >&6; }
9723else
9724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9725$as_echo "no" >&6; }
9726fi
9727
9728
9729  test -n "$MV" && break
9730done
9731
9732    else
9733      # If it succeeded, then it was overridden by the user. We will use it
9734      # for the tool.
9735
9736      # First remove it from the list of overridden variables, so we can test
9737      # for unknown variables in the end.
9738      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9739
9740      # Check if we try to supply an empty value
9741      if test "x$MV" = x; then
9742        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9743$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9745$as_echo_n "checking for MV... " >&6; }
9746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9747$as_echo "disabled" >&6; }
9748      else
9749        # Check if the provided tool contains a complete path.
9750        tool_specified="$MV"
9751        tool_basename="${tool_specified##*/}"
9752        if test "x$tool_basename" = "x$tool_specified"; then
9753          # A command without a complete path is provided, search $PATH.
9754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9755$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9756          # Extract the first word of "$tool_basename", so it can be a program name with args.
9757set dummy $tool_basename; ac_word=$2
9758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9759$as_echo_n "checking for $ac_word... " >&6; }
9760if ${ac_cv_path_MV+:} false; then :
9761  $as_echo_n "(cached) " >&6
9762else
9763  case $MV in
9764  [\\/]* | ?:[\\/]*)
9765  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9766  ;;
9767  *)
9768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9769for as_dir in $PATH
9770do
9771  IFS=$as_save_IFS
9772  test -z "$as_dir" && as_dir=.
9773    for ac_exec_ext in '' $ac_executable_extensions; do
9774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9775    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9777    break 2
9778  fi
9779done
9780  done
9781IFS=$as_save_IFS
9782
9783  ;;
9784esac
9785fi
9786MV=$ac_cv_path_MV
9787if test -n "$MV"; then
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9789$as_echo "$MV" >&6; }
9790else
9791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9792$as_echo "no" >&6; }
9793fi
9794
9795
9796          if test "x$MV" = x; then
9797            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9798          fi
9799        else
9800          # Otherwise we believe it is a complete path. Use it as it is.
9801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9802$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9803          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9804$as_echo_n "checking for MV... " >&6; }
9805          if test ! -x "$tool_specified"; then
9806            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9807$as_echo "not found" >&6; }
9808            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9809          fi
9810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9811$as_echo "$tool_specified" >&6; }
9812        fi
9813      fi
9814    fi
9815
9816  fi
9817
9818
9819
9820  if test "x$MV" = x; then
9821    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9822  fi
9823
9824
9825
9826
9827
9828  # Publish this variable in the help.
9829
9830
9831  if [ -z "${NAWK+x}" ]; then
9832    # The variable is not set by user, try to locate tool using the code snippet
9833    for ac_prog in nawk gawk awk
9834do
9835  # Extract the first word of "$ac_prog", so it can be a program name with args.
9836set dummy $ac_prog; ac_word=$2
9837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9838$as_echo_n "checking for $ac_word... " >&6; }
9839if ${ac_cv_path_NAWK+:} false; then :
9840  $as_echo_n "(cached) " >&6
9841else
9842  case $NAWK in
9843  [\\/]* | ?:[\\/]*)
9844  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9845  ;;
9846  *)
9847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9848for as_dir in $PATH
9849do
9850  IFS=$as_save_IFS
9851  test -z "$as_dir" && as_dir=.
9852    for ac_exec_ext in '' $ac_executable_extensions; do
9853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9854    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9856    break 2
9857  fi
9858done
9859  done
9860IFS=$as_save_IFS
9861
9862  ;;
9863esac
9864fi
9865NAWK=$ac_cv_path_NAWK
9866if test -n "$NAWK"; then
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9868$as_echo "$NAWK" >&6; }
9869else
9870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871$as_echo "no" >&6; }
9872fi
9873
9874
9875  test -n "$NAWK" && break
9876done
9877
9878  else
9879    # The variable is set, but is it from the command line or the environment?
9880
9881    # Try to remove the string !NAWK! from our list.
9882    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9883    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9884      # If it failed, the variable was not from the command line. Ignore it,
9885      # but warn the user (except for BASH, which is always set by the calling BASH).
9886      if test "xNAWK" != xBASH; then
9887        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9888$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9889      fi
9890      # Try to locate tool using the code snippet
9891      for ac_prog in nawk gawk awk
9892do
9893  # Extract the first word of "$ac_prog", so it can be a program name with args.
9894set dummy $ac_prog; ac_word=$2
9895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9896$as_echo_n "checking for $ac_word... " >&6; }
9897if ${ac_cv_path_NAWK+:} false; then :
9898  $as_echo_n "(cached) " >&6
9899else
9900  case $NAWK in
9901  [\\/]* | ?:[\\/]*)
9902  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9903  ;;
9904  *)
9905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9906for as_dir in $PATH
9907do
9908  IFS=$as_save_IFS
9909  test -z "$as_dir" && as_dir=.
9910    for ac_exec_ext in '' $ac_executable_extensions; do
9911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9912    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9914    break 2
9915  fi
9916done
9917  done
9918IFS=$as_save_IFS
9919
9920  ;;
9921esac
9922fi
9923NAWK=$ac_cv_path_NAWK
9924if test -n "$NAWK"; then
9925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9926$as_echo "$NAWK" >&6; }
9927else
9928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9929$as_echo "no" >&6; }
9930fi
9931
9932
9933  test -n "$NAWK" && break
9934done
9935
9936    else
9937      # If it succeeded, then it was overridden by the user. We will use it
9938      # for the tool.
9939
9940      # First remove it from the list of overridden variables, so we can test
9941      # for unknown variables in the end.
9942      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9943
9944      # Check if we try to supply an empty value
9945      if test "x$NAWK" = x; then
9946        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9947$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9948        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9949$as_echo_n "checking for NAWK... " >&6; }
9950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9951$as_echo "disabled" >&6; }
9952      else
9953        # Check if the provided tool contains a complete path.
9954        tool_specified="$NAWK"
9955        tool_basename="${tool_specified##*/}"
9956        if test "x$tool_basename" = "x$tool_specified"; then
9957          # A command without a complete path is provided, search $PATH.
9958          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9959$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9960          # Extract the first word of "$tool_basename", so it can be a program name with args.
9961set dummy $tool_basename; ac_word=$2
9962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9963$as_echo_n "checking for $ac_word... " >&6; }
9964if ${ac_cv_path_NAWK+:} false; then :
9965  $as_echo_n "(cached) " >&6
9966else
9967  case $NAWK in
9968  [\\/]* | ?:[\\/]*)
9969  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9970  ;;
9971  *)
9972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9973for as_dir in $PATH
9974do
9975  IFS=$as_save_IFS
9976  test -z "$as_dir" && as_dir=.
9977    for ac_exec_ext in '' $ac_executable_extensions; do
9978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9979    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9981    break 2
9982  fi
9983done
9984  done
9985IFS=$as_save_IFS
9986
9987  ;;
9988esac
9989fi
9990NAWK=$ac_cv_path_NAWK
9991if test -n "$NAWK"; then
9992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9993$as_echo "$NAWK" >&6; }
9994else
9995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9996$as_echo "no" >&6; }
9997fi
9998
9999
10000          if test "x$NAWK" = x; then
10001            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10002          fi
10003        else
10004          # Otherwise we believe it is a complete path. Use it as it is.
10005          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10006$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10007          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10008$as_echo_n "checking for NAWK... " >&6; }
10009          if test ! -x "$tool_specified"; then
10010            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10011$as_echo "not found" >&6; }
10012            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10013          fi
10014          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10015$as_echo "$tool_specified" >&6; }
10016        fi
10017      fi
10018    fi
10019
10020  fi
10021
10022
10023
10024  if test "x$NAWK" = x; then
10025    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10026  fi
10027
10028
10029
10030
10031
10032  # Publish this variable in the help.
10033
10034
10035  if [ -z "${PRINTF+x}" ]; then
10036    # The variable is not set by user, try to locate tool using the code snippet
10037    for ac_prog in printf
10038do
10039  # Extract the first word of "$ac_prog", so it can be a program name with args.
10040set dummy $ac_prog; ac_word=$2
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10042$as_echo_n "checking for $ac_word... " >&6; }
10043if ${ac_cv_path_PRINTF+:} false; then :
10044  $as_echo_n "(cached) " >&6
10045else
10046  case $PRINTF in
10047  [\\/]* | ?:[\\/]*)
10048  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10049  ;;
10050  *)
10051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10052for as_dir in $PATH
10053do
10054  IFS=$as_save_IFS
10055  test -z "$as_dir" && as_dir=.
10056    for ac_exec_ext in '' $ac_executable_extensions; do
10057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10058    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10060    break 2
10061  fi
10062done
10063  done
10064IFS=$as_save_IFS
10065
10066  ;;
10067esac
10068fi
10069PRINTF=$ac_cv_path_PRINTF
10070if test -n "$PRINTF"; then
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10072$as_echo "$PRINTF" >&6; }
10073else
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
10076fi
10077
10078
10079  test -n "$PRINTF" && break
10080done
10081
10082  else
10083    # The variable is set, but is it from the command line or the environment?
10084
10085    # Try to remove the string !PRINTF! from our list.
10086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10088      # If it failed, the variable was not from the command line. Ignore it,
10089      # but warn the user (except for BASH, which is always set by the calling BASH).
10090      if test "xPRINTF" != xBASH; then
10091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10092$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10093      fi
10094      # Try to locate tool using the code snippet
10095      for ac_prog in printf
10096do
10097  # Extract the first word of "$ac_prog", so it can be a program name with args.
10098set dummy $ac_prog; ac_word=$2
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10100$as_echo_n "checking for $ac_word... " >&6; }
10101if ${ac_cv_path_PRINTF+:} false; then :
10102  $as_echo_n "(cached) " >&6
10103else
10104  case $PRINTF in
10105  [\\/]* | ?:[\\/]*)
10106  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10107  ;;
10108  *)
10109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10110for as_dir in $PATH
10111do
10112  IFS=$as_save_IFS
10113  test -z "$as_dir" && as_dir=.
10114    for ac_exec_ext in '' $ac_executable_extensions; do
10115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10116    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10118    break 2
10119  fi
10120done
10121  done
10122IFS=$as_save_IFS
10123
10124  ;;
10125esac
10126fi
10127PRINTF=$ac_cv_path_PRINTF
10128if test -n "$PRINTF"; then
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10130$as_echo "$PRINTF" >&6; }
10131else
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
10134fi
10135
10136
10137  test -n "$PRINTF" && break
10138done
10139
10140    else
10141      # If it succeeded, then it was overridden by the user. We will use it
10142      # for the tool.
10143
10144      # First remove it from the list of overridden variables, so we can test
10145      # for unknown variables in the end.
10146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10147
10148      # Check if we try to supply an empty value
10149      if test "x$PRINTF" = x; then
10150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10151$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10153$as_echo_n "checking for PRINTF... " >&6; }
10154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10155$as_echo "disabled" >&6; }
10156      else
10157        # Check if the provided tool contains a complete path.
10158        tool_specified="$PRINTF"
10159        tool_basename="${tool_specified##*/}"
10160        if test "x$tool_basename" = "x$tool_specified"; then
10161          # A command without a complete path is provided, search $PATH.
10162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10163$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10164          # Extract the first word of "$tool_basename", so it can be a program name with args.
10165set dummy $tool_basename; ac_word=$2
10166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10167$as_echo_n "checking for $ac_word... " >&6; }
10168if ${ac_cv_path_PRINTF+:} false; then :
10169  $as_echo_n "(cached) " >&6
10170else
10171  case $PRINTF in
10172  [\\/]* | ?:[\\/]*)
10173  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10174  ;;
10175  *)
10176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10177for as_dir in $PATH
10178do
10179  IFS=$as_save_IFS
10180  test -z "$as_dir" && as_dir=.
10181    for ac_exec_ext in '' $ac_executable_extensions; do
10182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10183    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10185    break 2
10186  fi
10187done
10188  done
10189IFS=$as_save_IFS
10190
10191  ;;
10192esac
10193fi
10194PRINTF=$ac_cv_path_PRINTF
10195if test -n "$PRINTF"; then
10196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10197$as_echo "$PRINTF" >&6; }
10198else
10199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200$as_echo "no" >&6; }
10201fi
10202
10203
10204          if test "x$PRINTF" = x; then
10205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10206          fi
10207        else
10208          # Otherwise we believe it is a complete path. Use it as it is.
10209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10210$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10212$as_echo_n "checking for PRINTF... " >&6; }
10213          if test ! -x "$tool_specified"; then
10214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10215$as_echo "not found" >&6; }
10216            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10217          fi
10218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10219$as_echo "$tool_specified" >&6; }
10220        fi
10221      fi
10222    fi
10223
10224  fi
10225
10226
10227
10228  if test "x$PRINTF" = x; then
10229    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10230  fi
10231
10232
10233
10234
10235
10236  # Publish this variable in the help.
10237
10238
10239  if [ -z "${RM+x}" ]; then
10240    # The variable is not set by user, try to locate tool using the code snippet
10241    for ac_prog in rm
10242do
10243  # Extract the first word of "$ac_prog", so it can be a program name with args.
10244set dummy $ac_prog; ac_word=$2
10245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10246$as_echo_n "checking for $ac_word... " >&6; }
10247if ${ac_cv_path_RM+:} false; then :
10248  $as_echo_n "(cached) " >&6
10249else
10250  case $RM in
10251  [\\/]* | ?:[\\/]*)
10252  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10253  ;;
10254  *)
10255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10256for as_dir in $PATH
10257do
10258  IFS=$as_save_IFS
10259  test -z "$as_dir" && as_dir=.
10260    for ac_exec_ext in '' $ac_executable_extensions; do
10261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10262    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10264    break 2
10265  fi
10266done
10267  done
10268IFS=$as_save_IFS
10269
10270  ;;
10271esac
10272fi
10273RM=$ac_cv_path_RM
10274if test -n "$RM"; then
10275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10276$as_echo "$RM" >&6; }
10277else
10278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
10280fi
10281
10282
10283  test -n "$RM" && break
10284done
10285
10286  else
10287    # The variable is set, but is it from the command line or the environment?
10288
10289    # Try to remove the string !RM! from our list.
10290    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10291    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10292      # If it failed, the variable was not from the command line. Ignore it,
10293      # but warn the user (except for BASH, which is always set by the calling BASH).
10294      if test "xRM" != xBASH; then
10295        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10296$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10297      fi
10298      # Try to locate tool using the code snippet
10299      for ac_prog in rm
10300do
10301  # Extract the first word of "$ac_prog", so it can be a program name with args.
10302set dummy $ac_prog; ac_word=$2
10303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10304$as_echo_n "checking for $ac_word... " >&6; }
10305if ${ac_cv_path_RM+:} false; then :
10306  $as_echo_n "(cached) " >&6
10307else
10308  case $RM in
10309  [\\/]* | ?:[\\/]*)
10310  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10311  ;;
10312  *)
10313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10314for as_dir in $PATH
10315do
10316  IFS=$as_save_IFS
10317  test -z "$as_dir" && as_dir=.
10318    for ac_exec_ext in '' $ac_executable_extensions; do
10319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10320    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10322    break 2
10323  fi
10324done
10325  done
10326IFS=$as_save_IFS
10327
10328  ;;
10329esac
10330fi
10331RM=$ac_cv_path_RM
10332if test -n "$RM"; then
10333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10334$as_echo "$RM" >&6; }
10335else
10336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10337$as_echo "no" >&6; }
10338fi
10339
10340
10341  test -n "$RM" && break
10342done
10343
10344    else
10345      # If it succeeded, then it was overridden by the user. We will use it
10346      # for the tool.
10347
10348      # First remove it from the list of overridden variables, so we can test
10349      # for unknown variables in the end.
10350      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10351
10352      # Check if we try to supply an empty value
10353      if test "x$RM" = x; then
10354        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10355$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10356        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10357$as_echo_n "checking for RM... " >&6; }
10358        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10359$as_echo "disabled" >&6; }
10360      else
10361        # Check if the provided tool contains a complete path.
10362        tool_specified="$RM"
10363        tool_basename="${tool_specified##*/}"
10364        if test "x$tool_basename" = "x$tool_specified"; then
10365          # A command without a complete path is provided, search $PATH.
10366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10367$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10368          # Extract the first word of "$tool_basename", so it can be a program name with args.
10369set dummy $tool_basename; ac_word=$2
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10371$as_echo_n "checking for $ac_word... " >&6; }
10372if ${ac_cv_path_RM+:} false; then :
10373  $as_echo_n "(cached) " >&6
10374else
10375  case $RM in
10376  [\\/]* | ?:[\\/]*)
10377  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10378  ;;
10379  *)
10380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10381for as_dir in $PATH
10382do
10383  IFS=$as_save_IFS
10384  test -z "$as_dir" && as_dir=.
10385    for ac_exec_ext in '' $ac_executable_extensions; do
10386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10387    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10389    break 2
10390  fi
10391done
10392  done
10393IFS=$as_save_IFS
10394
10395  ;;
10396esac
10397fi
10398RM=$ac_cv_path_RM
10399if test -n "$RM"; then
10400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10401$as_echo "$RM" >&6; }
10402else
10403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404$as_echo "no" >&6; }
10405fi
10406
10407
10408          if test "x$RM" = x; then
10409            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10410          fi
10411        else
10412          # Otherwise we believe it is a complete path. Use it as it is.
10413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10414$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10415          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10416$as_echo_n "checking for RM... " >&6; }
10417          if test ! -x "$tool_specified"; then
10418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10419$as_echo "not found" >&6; }
10420            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10421          fi
10422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10423$as_echo "$tool_specified" >&6; }
10424        fi
10425      fi
10426    fi
10427
10428  fi
10429
10430
10431
10432  if test "x$RM" = x; then
10433    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10434  fi
10435
10436
10437
10438
10439
10440  # Publish this variable in the help.
10441
10442
10443  if [ -z "${RMDIR+x}" ]; then
10444    # The variable is not set by user, try to locate tool using the code snippet
10445    for ac_prog in rmdir
10446do
10447  # Extract the first word of "$ac_prog", so it can be a program name with args.
10448set dummy $ac_prog; ac_word=$2
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10450$as_echo_n "checking for $ac_word... " >&6; }
10451if ${ac_cv_path_RMDIR+:} false; then :
10452  $as_echo_n "(cached) " >&6
10453else
10454  case $RMDIR in
10455  [\\/]* | ?:[\\/]*)
10456  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10457  ;;
10458  *)
10459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10460for as_dir in $PATH
10461do
10462  IFS=$as_save_IFS
10463  test -z "$as_dir" && as_dir=.
10464    for ac_exec_ext in '' $ac_executable_extensions; do
10465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10466    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10468    break 2
10469  fi
10470done
10471  done
10472IFS=$as_save_IFS
10473
10474  ;;
10475esac
10476fi
10477RMDIR=$ac_cv_path_RMDIR
10478if test -n "$RMDIR"; then
10479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10480$as_echo "$RMDIR" >&6; }
10481else
10482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10483$as_echo "no" >&6; }
10484fi
10485
10486
10487  test -n "$RMDIR" && break
10488done
10489
10490  else
10491    # The variable is set, but is it from the command line or the environment?
10492
10493    # Try to remove the string !RMDIR! from our list.
10494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10496      # If it failed, the variable was not from the command line. Ignore it,
10497      # but warn the user (except for BASH, which is always set by the calling BASH).
10498      if test "xRMDIR" != xBASH; then
10499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10500$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10501      fi
10502      # Try to locate tool using the code snippet
10503      for ac_prog in rmdir
10504do
10505  # Extract the first word of "$ac_prog", so it can be a program name with args.
10506set dummy $ac_prog; ac_word=$2
10507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10508$as_echo_n "checking for $ac_word... " >&6; }
10509if ${ac_cv_path_RMDIR+:} false; then :
10510  $as_echo_n "(cached) " >&6
10511else
10512  case $RMDIR in
10513  [\\/]* | ?:[\\/]*)
10514  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10515  ;;
10516  *)
10517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10518for as_dir in $PATH
10519do
10520  IFS=$as_save_IFS
10521  test -z "$as_dir" && as_dir=.
10522    for ac_exec_ext in '' $ac_executable_extensions; do
10523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10524    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10526    break 2
10527  fi
10528done
10529  done
10530IFS=$as_save_IFS
10531
10532  ;;
10533esac
10534fi
10535RMDIR=$ac_cv_path_RMDIR
10536if test -n "$RMDIR"; then
10537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10538$as_echo "$RMDIR" >&6; }
10539else
10540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10541$as_echo "no" >&6; }
10542fi
10543
10544
10545  test -n "$RMDIR" && break
10546done
10547
10548    else
10549      # If it succeeded, then it was overridden by the user. We will use it
10550      # for the tool.
10551
10552      # First remove it from the list of overridden variables, so we can test
10553      # for unknown variables in the end.
10554      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10555
10556      # Check if we try to supply an empty value
10557      if test "x$RMDIR" = x; then
10558        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10559$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10561$as_echo_n "checking for RMDIR... " >&6; }
10562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10563$as_echo "disabled" >&6; }
10564      else
10565        # Check if the provided tool contains a complete path.
10566        tool_specified="$RMDIR"
10567        tool_basename="${tool_specified##*/}"
10568        if test "x$tool_basename" = "x$tool_specified"; then
10569          # A command without a complete path is provided, search $PATH.
10570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10571$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10572          # Extract the first word of "$tool_basename", so it can be a program name with args.
10573set dummy $tool_basename; ac_word=$2
10574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10575$as_echo_n "checking for $ac_word... " >&6; }
10576if ${ac_cv_path_RMDIR+:} false; then :
10577  $as_echo_n "(cached) " >&6
10578else
10579  case $RMDIR in
10580  [\\/]* | ?:[\\/]*)
10581  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10582  ;;
10583  *)
10584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10585for as_dir in $PATH
10586do
10587  IFS=$as_save_IFS
10588  test -z "$as_dir" && as_dir=.
10589    for ac_exec_ext in '' $ac_executable_extensions; do
10590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10591    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10593    break 2
10594  fi
10595done
10596  done
10597IFS=$as_save_IFS
10598
10599  ;;
10600esac
10601fi
10602RMDIR=$ac_cv_path_RMDIR
10603if test -n "$RMDIR"; then
10604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10605$as_echo "$RMDIR" >&6; }
10606else
10607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10608$as_echo "no" >&6; }
10609fi
10610
10611
10612          if test "x$RMDIR" = x; then
10613            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10614          fi
10615        else
10616          # Otherwise we believe it is a complete path. Use it as it is.
10617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10618$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10619          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10620$as_echo_n "checking for RMDIR... " >&6; }
10621          if test ! -x "$tool_specified"; then
10622            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10623$as_echo "not found" >&6; }
10624            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10625          fi
10626          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10627$as_echo "$tool_specified" >&6; }
10628        fi
10629      fi
10630    fi
10631
10632  fi
10633
10634
10635
10636  if test "x$RMDIR" = x; then
10637    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10638  fi
10639
10640
10641
10642
10643
10644  # Publish this variable in the help.
10645
10646
10647  if [ -z "${SH+x}" ]; then
10648    # The variable is not set by user, try to locate tool using the code snippet
10649    for ac_prog in sh
10650do
10651  # Extract the first word of "$ac_prog", so it can be a program name with args.
10652set dummy $ac_prog; ac_word=$2
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10654$as_echo_n "checking for $ac_word... " >&6; }
10655if ${ac_cv_path_SH+:} false; then :
10656  $as_echo_n "(cached) " >&6
10657else
10658  case $SH in
10659  [\\/]* | ?:[\\/]*)
10660  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10661  ;;
10662  *)
10663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10664for as_dir in $PATH
10665do
10666  IFS=$as_save_IFS
10667  test -z "$as_dir" && as_dir=.
10668    for ac_exec_ext in '' $ac_executable_extensions; do
10669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10670    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10672    break 2
10673  fi
10674done
10675  done
10676IFS=$as_save_IFS
10677
10678  ;;
10679esac
10680fi
10681SH=$ac_cv_path_SH
10682if test -n "$SH"; then
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10684$as_echo "$SH" >&6; }
10685else
10686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
10688fi
10689
10690
10691  test -n "$SH" && break
10692done
10693
10694  else
10695    # The variable is set, but is it from the command line or the environment?
10696
10697    # Try to remove the string !SH! from our list.
10698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10700      # If it failed, the variable was not from the command line. Ignore it,
10701      # but warn the user (except for BASH, which is always set by the calling BASH).
10702      if test "xSH" != xBASH; then
10703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10704$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10705      fi
10706      # Try to locate tool using the code snippet
10707      for ac_prog in sh
10708do
10709  # Extract the first word of "$ac_prog", so it can be a program name with args.
10710set dummy $ac_prog; ac_word=$2
10711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10712$as_echo_n "checking for $ac_word... " >&6; }
10713if ${ac_cv_path_SH+:} false; then :
10714  $as_echo_n "(cached) " >&6
10715else
10716  case $SH in
10717  [\\/]* | ?:[\\/]*)
10718  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10719  ;;
10720  *)
10721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10722for as_dir in $PATH
10723do
10724  IFS=$as_save_IFS
10725  test -z "$as_dir" && as_dir=.
10726    for ac_exec_ext in '' $ac_executable_extensions; do
10727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10728    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10730    break 2
10731  fi
10732done
10733  done
10734IFS=$as_save_IFS
10735
10736  ;;
10737esac
10738fi
10739SH=$ac_cv_path_SH
10740if test -n "$SH"; then
10741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10742$as_echo "$SH" >&6; }
10743else
10744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10745$as_echo "no" >&6; }
10746fi
10747
10748
10749  test -n "$SH" && break
10750done
10751
10752    else
10753      # If it succeeded, then it was overridden by the user. We will use it
10754      # for the tool.
10755
10756      # First remove it from the list of overridden variables, so we can test
10757      # for unknown variables in the end.
10758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10759
10760      # Check if we try to supply an empty value
10761      if test "x$SH" = x; then
10762        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10763$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10765$as_echo_n "checking for SH... " >&6; }
10766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10767$as_echo "disabled" >&6; }
10768      else
10769        # Check if the provided tool contains a complete path.
10770        tool_specified="$SH"
10771        tool_basename="${tool_specified##*/}"
10772        if test "x$tool_basename" = "x$tool_specified"; then
10773          # A command without a complete path is provided, search $PATH.
10774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10775$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10776          # Extract the first word of "$tool_basename", so it can be a program name with args.
10777set dummy $tool_basename; ac_word=$2
10778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10779$as_echo_n "checking for $ac_word... " >&6; }
10780if ${ac_cv_path_SH+:} false; then :
10781  $as_echo_n "(cached) " >&6
10782else
10783  case $SH in
10784  [\\/]* | ?:[\\/]*)
10785  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10786  ;;
10787  *)
10788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10789for as_dir in $PATH
10790do
10791  IFS=$as_save_IFS
10792  test -z "$as_dir" && as_dir=.
10793    for ac_exec_ext in '' $ac_executable_extensions; do
10794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10795    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10797    break 2
10798  fi
10799done
10800  done
10801IFS=$as_save_IFS
10802
10803  ;;
10804esac
10805fi
10806SH=$ac_cv_path_SH
10807if test -n "$SH"; then
10808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10809$as_echo "$SH" >&6; }
10810else
10811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10812$as_echo "no" >&6; }
10813fi
10814
10815
10816          if test "x$SH" = x; then
10817            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10818          fi
10819        else
10820          # Otherwise we believe it is a complete path. Use it as it is.
10821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10822$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10823          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10824$as_echo_n "checking for SH... " >&6; }
10825          if test ! -x "$tool_specified"; then
10826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10827$as_echo "not found" >&6; }
10828            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10829          fi
10830          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10831$as_echo "$tool_specified" >&6; }
10832        fi
10833      fi
10834    fi
10835
10836  fi
10837
10838
10839
10840  if test "x$SH" = x; then
10841    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10842  fi
10843
10844
10845
10846
10847
10848  # Publish this variable in the help.
10849
10850
10851  if [ -z "${SORT+x}" ]; then
10852    # The variable is not set by user, try to locate tool using the code snippet
10853    for ac_prog in sort
10854do
10855  # Extract the first word of "$ac_prog", so it can be a program name with args.
10856set dummy $ac_prog; ac_word=$2
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10858$as_echo_n "checking for $ac_word... " >&6; }
10859if ${ac_cv_path_SORT+:} false; then :
10860  $as_echo_n "(cached) " >&6
10861else
10862  case $SORT in
10863  [\\/]* | ?:[\\/]*)
10864  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10865  ;;
10866  *)
10867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10868for as_dir in $PATH
10869do
10870  IFS=$as_save_IFS
10871  test -z "$as_dir" && as_dir=.
10872    for ac_exec_ext in '' $ac_executable_extensions; do
10873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10874    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10876    break 2
10877  fi
10878done
10879  done
10880IFS=$as_save_IFS
10881
10882  ;;
10883esac
10884fi
10885SORT=$ac_cv_path_SORT
10886if test -n "$SORT"; then
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10888$as_echo "$SORT" >&6; }
10889else
10890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10891$as_echo "no" >&6; }
10892fi
10893
10894
10895  test -n "$SORT" && break
10896done
10897
10898  else
10899    # The variable is set, but is it from the command line or the environment?
10900
10901    # Try to remove the string !SORT! from our list.
10902    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10903    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10904      # If it failed, the variable was not from the command line. Ignore it,
10905      # but warn the user (except for BASH, which is always set by the calling BASH).
10906      if test "xSORT" != xBASH; then
10907        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10908$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10909      fi
10910      # Try to locate tool using the code snippet
10911      for ac_prog in sort
10912do
10913  # Extract the first word of "$ac_prog", so it can be a program name with args.
10914set dummy $ac_prog; ac_word=$2
10915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10916$as_echo_n "checking for $ac_word... " >&6; }
10917if ${ac_cv_path_SORT+:} false; then :
10918  $as_echo_n "(cached) " >&6
10919else
10920  case $SORT in
10921  [\\/]* | ?:[\\/]*)
10922  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10923  ;;
10924  *)
10925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10926for as_dir in $PATH
10927do
10928  IFS=$as_save_IFS
10929  test -z "$as_dir" && as_dir=.
10930    for ac_exec_ext in '' $ac_executable_extensions; do
10931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10932    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10934    break 2
10935  fi
10936done
10937  done
10938IFS=$as_save_IFS
10939
10940  ;;
10941esac
10942fi
10943SORT=$ac_cv_path_SORT
10944if test -n "$SORT"; then
10945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10946$as_echo "$SORT" >&6; }
10947else
10948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10949$as_echo "no" >&6; }
10950fi
10951
10952
10953  test -n "$SORT" && break
10954done
10955
10956    else
10957      # If it succeeded, then it was overridden by the user. We will use it
10958      # for the tool.
10959
10960      # First remove it from the list of overridden variables, so we can test
10961      # for unknown variables in the end.
10962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10963
10964      # Check if we try to supply an empty value
10965      if test "x$SORT" = x; then
10966        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10967$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10969$as_echo_n "checking for SORT... " >&6; }
10970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10971$as_echo "disabled" >&6; }
10972      else
10973        # Check if the provided tool contains a complete path.
10974        tool_specified="$SORT"
10975        tool_basename="${tool_specified##*/}"
10976        if test "x$tool_basename" = "x$tool_specified"; then
10977          # A command without a complete path is provided, search $PATH.
10978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10979$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10980          # Extract the first word of "$tool_basename", so it can be a program name with args.
10981set dummy $tool_basename; ac_word=$2
10982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10983$as_echo_n "checking for $ac_word... " >&6; }
10984if ${ac_cv_path_SORT+:} false; then :
10985  $as_echo_n "(cached) " >&6
10986else
10987  case $SORT in
10988  [\\/]* | ?:[\\/]*)
10989  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10990  ;;
10991  *)
10992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10993for as_dir in $PATH
10994do
10995  IFS=$as_save_IFS
10996  test -z "$as_dir" && as_dir=.
10997    for ac_exec_ext in '' $ac_executable_extensions; do
10998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10999    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11001    break 2
11002  fi
11003done
11004  done
11005IFS=$as_save_IFS
11006
11007  ;;
11008esac
11009fi
11010SORT=$ac_cv_path_SORT
11011if test -n "$SORT"; then
11012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11013$as_echo "$SORT" >&6; }
11014else
11015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11016$as_echo "no" >&6; }
11017fi
11018
11019
11020          if test "x$SORT" = x; then
11021            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11022          fi
11023        else
11024          # Otherwise we believe it is a complete path. Use it as it is.
11025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11026$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11027          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11028$as_echo_n "checking for SORT... " >&6; }
11029          if test ! -x "$tool_specified"; then
11030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11031$as_echo "not found" >&6; }
11032            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11033          fi
11034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11035$as_echo "$tool_specified" >&6; }
11036        fi
11037      fi
11038    fi
11039
11040  fi
11041
11042
11043
11044  if test "x$SORT" = x; then
11045    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11046  fi
11047
11048
11049
11050
11051
11052  # Publish this variable in the help.
11053
11054
11055  if [ -z "${TAIL+x}" ]; then
11056    # The variable is not set by user, try to locate tool using the code snippet
11057    for ac_prog in tail
11058do
11059  # Extract the first word of "$ac_prog", so it can be a program name with args.
11060set dummy $ac_prog; ac_word=$2
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062$as_echo_n "checking for $ac_word... " >&6; }
11063if ${ac_cv_path_TAIL+:} false; then :
11064  $as_echo_n "(cached) " >&6
11065else
11066  case $TAIL in
11067  [\\/]* | ?:[\\/]*)
11068  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11069  ;;
11070  *)
11071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11072for as_dir in $PATH
11073do
11074  IFS=$as_save_IFS
11075  test -z "$as_dir" && as_dir=.
11076    for ac_exec_ext in '' $ac_executable_extensions; do
11077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11078    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11080    break 2
11081  fi
11082done
11083  done
11084IFS=$as_save_IFS
11085
11086  ;;
11087esac
11088fi
11089TAIL=$ac_cv_path_TAIL
11090if test -n "$TAIL"; then
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11092$as_echo "$TAIL" >&6; }
11093else
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095$as_echo "no" >&6; }
11096fi
11097
11098
11099  test -n "$TAIL" && break
11100done
11101
11102  else
11103    # The variable is set, but is it from the command line or the environment?
11104
11105    # Try to remove the string !TAIL! from our list.
11106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11108      # If it failed, the variable was not from the command line. Ignore it,
11109      # but warn the user (except for BASH, which is always set by the calling BASH).
11110      if test "xTAIL" != xBASH; then
11111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11112$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11113      fi
11114      # Try to locate tool using the code snippet
11115      for ac_prog in tail
11116do
11117  # Extract the first word of "$ac_prog", so it can be a program name with args.
11118set dummy $ac_prog; ac_word=$2
11119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11120$as_echo_n "checking for $ac_word... " >&6; }
11121if ${ac_cv_path_TAIL+:} false; then :
11122  $as_echo_n "(cached) " >&6
11123else
11124  case $TAIL in
11125  [\\/]* | ?:[\\/]*)
11126  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11127  ;;
11128  *)
11129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11130for as_dir in $PATH
11131do
11132  IFS=$as_save_IFS
11133  test -z "$as_dir" && as_dir=.
11134    for ac_exec_ext in '' $ac_executable_extensions; do
11135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11136    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11138    break 2
11139  fi
11140done
11141  done
11142IFS=$as_save_IFS
11143
11144  ;;
11145esac
11146fi
11147TAIL=$ac_cv_path_TAIL
11148if test -n "$TAIL"; then
11149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11150$as_echo "$TAIL" >&6; }
11151else
11152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11153$as_echo "no" >&6; }
11154fi
11155
11156
11157  test -n "$TAIL" && break
11158done
11159
11160    else
11161      # If it succeeded, then it was overridden by the user. We will use it
11162      # for the tool.
11163
11164      # First remove it from the list of overridden variables, so we can test
11165      # for unknown variables in the end.
11166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11167
11168      # Check if we try to supply an empty value
11169      if test "x$TAIL" = x; then
11170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11171$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11173$as_echo_n "checking for TAIL... " >&6; }
11174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11175$as_echo "disabled" >&6; }
11176      else
11177        # Check if the provided tool contains a complete path.
11178        tool_specified="$TAIL"
11179        tool_basename="${tool_specified##*/}"
11180        if test "x$tool_basename" = "x$tool_specified"; then
11181          # A command without a complete path is provided, search $PATH.
11182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11183$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11184          # Extract the first word of "$tool_basename", so it can be a program name with args.
11185set dummy $tool_basename; ac_word=$2
11186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11187$as_echo_n "checking for $ac_word... " >&6; }
11188if ${ac_cv_path_TAIL+:} false; then :
11189  $as_echo_n "(cached) " >&6
11190else
11191  case $TAIL in
11192  [\\/]* | ?:[\\/]*)
11193  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11194  ;;
11195  *)
11196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11197for as_dir in $PATH
11198do
11199  IFS=$as_save_IFS
11200  test -z "$as_dir" && as_dir=.
11201    for ac_exec_ext in '' $ac_executable_extensions; do
11202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11203    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11205    break 2
11206  fi
11207done
11208  done
11209IFS=$as_save_IFS
11210
11211  ;;
11212esac
11213fi
11214TAIL=$ac_cv_path_TAIL
11215if test -n "$TAIL"; then
11216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11217$as_echo "$TAIL" >&6; }
11218else
11219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11220$as_echo "no" >&6; }
11221fi
11222
11223
11224          if test "x$TAIL" = x; then
11225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11226          fi
11227        else
11228          # Otherwise we believe it is a complete path. Use it as it is.
11229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11230$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11232$as_echo_n "checking for TAIL... " >&6; }
11233          if test ! -x "$tool_specified"; then
11234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11235$as_echo "not found" >&6; }
11236            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11237          fi
11238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11239$as_echo "$tool_specified" >&6; }
11240        fi
11241      fi
11242    fi
11243
11244  fi
11245
11246
11247
11248  if test "x$TAIL" = x; then
11249    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11250  fi
11251
11252
11253
11254
11255
11256  # Publish this variable in the help.
11257
11258
11259  if [ -z "${TAR+x}" ]; then
11260    # The variable is not set by user, try to locate tool using the code snippet
11261    for ac_prog in gtar tar
11262do
11263  # Extract the first word of "$ac_prog", so it can be a program name with args.
11264set dummy $ac_prog; ac_word=$2
11265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11266$as_echo_n "checking for $ac_word... " >&6; }
11267if ${ac_cv_path_TAR+:} false; then :
11268  $as_echo_n "(cached) " >&6
11269else
11270  case $TAR in
11271  [\\/]* | ?:[\\/]*)
11272  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11273  ;;
11274  *)
11275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11276for as_dir in $PATH
11277do
11278  IFS=$as_save_IFS
11279  test -z "$as_dir" && as_dir=.
11280    for ac_exec_ext in '' $ac_executable_extensions; do
11281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11282    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11284    break 2
11285  fi
11286done
11287  done
11288IFS=$as_save_IFS
11289
11290  ;;
11291esac
11292fi
11293TAR=$ac_cv_path_TAR
11294if test -n "$TAR"; then
11295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11296$as_echo "$TAR" >&6; }
11297else
11298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11299$as_echo "no" >&6; }
11300fi
11301
11302
11303  test -n "$TAR" && break
11304done
11305
11306  else
11307    # The variable is set, but is it from the command line or the environment?
11308
11309    # Try to remove the string !TAR! from our list.
11310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11312      # If it failed, the variable was not from the command line. Ignore it,
11313      # but warn the user (except for BASH, which is always set by the calling BASH).
11314      if test "xTAR" != xBASH; then
11315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11316$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11317      fi
11318      # Try to locate tool using the code snippet
11319      for ac_prog in gtar tar
11320do
11321  # Extract the first word of "$ac_prog", so it can be a program name with args.
11322set dummy $ac_prog; ac_word=$2
11323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11324$as_echo_n "checking for $ac_word... " >&6; }
11325if ${ac_cv_path_TAR+:} false; then :
11326  $as_echo_n "(cached) " >&6
11327else
11328  case $TAR in
11329  [\\/]* | ?:[\\/]*)
11330  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11331  ;;
11332  *)
11333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11334for as_dir in $PATH
11335do
11336  IFS=$as_save_IFS
11337  test -z "$as_dir" && as_dir=.
11338    for ac_exec_ext in '' $ac_executable_extensions; do
11339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11340    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11342    break 2
11343  fi
11344done
11345  done
11346IFS=$as_save_IFS
11347
11348  ;;
11349esac
11350fi
11351TAR=$ac_cv_path_TAR
11352if test -n "$TAR"; then
11353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11354$as_echo "$TAR" >&6; }
11355else
11356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11357$as_echo "no" >&6; }
11358fi
11359
11360
11361  test -n "$TAR" && break
11362done
11363
11364    else
11365      # If it succeeded, then it was overridden by the user. We will use it
11366      # for the tool.
11367
11368      # First remove it from the list of overridden variables, so we can test
11369      # for unknown variables in the end.
11370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11371
11372      # Check if we try to supply an empty value
11373      if test "x$TAR" = x; then
11374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11375$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11377$as_echo_n "checking for TAR... " >&6; }
11378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11379$as_echo "disabled" >&6; }
11380      else
11381        # Check if the provided tool contains a complete path.
11382        tool_specified="$TAR"
11383        tool_basename="${tool_specified##*/}"
11384        if test "x$tool_basename" = "x$tool_specified"; then
11385          # A command without a complete path is provided, search $PATH.
11386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11387$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11388          # Extract the first word of "$tool_basename", so it can be a program name with args.
11389set dummy $tool_basename; ac_word=$2
11390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11391$as_echo_n "checking for $ac_word... " >&6; }
11392if ${ac_cv_path_TAR+:} false; then :
11393  $as_echo_n "(cached) " >&6
11394else
11395  case $TAR in
11396  [\\/]* | ?:[\\/]*)
11397  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11398  ;;
11399  *)
11400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11401for as_dir in $PATH
11402do
11403  IFS=$as_save_IFS
11404  test -z "$as_dir" && as_dir=.
11405    for ac_exec_ext in '' $ac_executable_extensions; do
11406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11407    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11409    break 2
11410  fi
11411done
11412  done
11413IFS=$as_save_IFS
11414
11415  ;;
11416esac
11417fi
11418TAR=$ac_cv_path_TAR
11419if test -n "$TAR"; then
11420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11421$as_echo "$TAR" >&6; }
11422else
11423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11424$as_echo "no" >&6; }
11425fi
11426
11427
11428          if test "x$TAR" = x; then
11429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11430          fi
11431        else
11432          # Otherwise we believe it is a complete path. Use it as it is.
11433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11434$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11436$as_echo_n "checking for TAR... " >&6; }
11437          if test ! -x "$tool_specified"; then
11438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11439$as_echo "not found" >&6; }
11440            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11441          fi
11442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11443$as_echo "$tool_specified" >&6; }
11444        fi
11445      fi
11446    fi
11447
11448  fi
11449
11450
11451
11452  if test "x$TAR" = x; then
11453    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11454  fi
11455
11456
11457
11458
11459
11460  # Publish this variable in the help.
11461
11462
11463  if [ -z "${TEE+x}" ]; then
11464    # The variable is not set by user, try to locate tool using the code snippet
11465    for ac_prog in tee
11466do
11467  # Extract the first word of "$ac_prog", so it can be a program name with args.
11468set dummy $ac_prog; ac_word=$2
11469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11470$as_echo_n "checking for $ac_word... " >&6; }
11471if ${ac_cv_path_TEE+:} false; then :
11472  $as_echo_n "(cached) " >&6
11473else
11474  case $TEE in
11475  [\\/]* | ?:[\\/]*)
11476  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11477  ;;
11478  *)
11479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11480for as_dir in $PATH
11481do
11482  IFS=$as_save_IFS
11483  test -z "$as_dir" && as_dir=.
11484    for ac_exec_ext in '' $ac_executable_extensions; do
11485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11486    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11488    break 2
11489  fi
11490done
11491  done
11492IFS=$as_save_IFS
11493
11494  ;;
11495esac
11496fi
11497TEE=$ac_cv_path_TEE
11498if test -n "$TEE"; then
11499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11500$as_echo "$TEE" >&6; }
11501else
11502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11503$as_echo "no" >&6; }
11504fi
11505
11506
11507  test -n "$TEE" && break
11508done
11509
11510  else
11511    # The variable is set, but is it from the command line or the environment?
11512
11513    # Try to remove the string !TEE! from our list.
11514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11516      # If it failed, the variable was not from the command line. Ignore it,
11517      # but warn the user (except for BASH, which is always set by the calling BASH).
11518      if test "xTEE" != xBASH; then
11519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11520$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11521      fi
11522      # Try to locate tool using the code snippet
11523      for ac_prog in tee
11524do
11525  # Extract the first word of "$ac_prog", so it can be a program name with args.
11526set dummy $ac_prog; ac_word=$2
11527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11528$as_echo_n "checking for $ac_word... " >&6; }
11529if ${ac_cv_path_TEE+:} false; then :
11530  $as_echo_n "(cached) " >&6
11531else
11532  case $TEE in
11533  [\\/]* | ?:[\\/]*)
11534  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11535  ;;
11536  *)
11537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11538for as_dir in $PATH
11539do
11540  IFS=$as_save_IFS
11541  test -z "$as_dir" && as_dir=.
11542    for ac_exec_ext in '' $ac_executable_extensions; do
11543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11544    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11546    break 2
11547  fi
11548done
11549  done
11550IFS=$as_save_IFS
11551
11552  ;;
11553esac
11554fi
11555TEE=$ac_cv_path_TEE
11556if test -n "$TEE"; then
11557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11558$as_echo "$TEE" >&6; }
11559else
11560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561$as_echo "no" >&6; }
11562fi
11563
11564
11565  test -n "$TEE" && break
11566done
11567
11568    else
11569      # If it succeeded, then it was overridden by the user. We will use it
11570      # for the tool.
11571
11572      # First remove it from the list of overridden variables, so we can test
11573      # for unknown variables in the end.
11574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11575
11576      # Check if we try to supply an empty value
11577      if test "x$TEE" = x; then
11578        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11579$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11581$as_echo_n "checking for TEE... " >&6; }
11582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11583$as_echo "disabled" >&6; }
11584      else
11585        # Check if the provided tool contains a complete path.
11586        tool_specified="$TEE"
11587        tool_basename="${tool_specified##*/}"
11588        if test "x$tool_basename" = "x$tool_specified"; then
11589          # A command without a complete path is provided, search $PATH.
11590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11591$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11592          # Extract the first word of "$tool_basename", so it can be a program name with args.
11593set dummy $tool_basename; ac_word=$2
11594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11595$as_echo_n "checking for $ac_word... " >&6; }
11596if ${ac_cv_path_TEE+:} false; then :
11597  $as_echo_n "(cached) " >&6
11598else
11599  case $TEE in
11600  [\\/]* | ?:[\\/]*)
11601  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11602  ;;
11603  *)
11604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11605for as_dir in $PATH
11606do
11607  IFS=$as_save_IFS
11608  test -z "$as_dir" && as_dir=.
11609    for ac_exec_ext in '' $ac_executable_extensions; do
11610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11611    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11613    break 2
11614  fi
11615done
11616  done
11617IFS=$as_save_IFS
11618
11619  ;;
11620esac
11621fi
11622TEE=$ac_cv_path_TEE
11623if test -n "$TEE"; then
11624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11625$as_echo "$TEE" >&6; }
11626else
11627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11628$as_echo "no" >&6; }
11629fi
11630
11631
11632          if test "x$TEE" = x; then
11633            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11634          fi
11635        else
11636          # Otherwise we believe it is a complete path. Use it as it is.
11637          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11638$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11639          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11640$as_echo_n "checking for TEE... " >&6; }
11641          if test ! -x "$tool_specified"; then
11642            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11643$as_echo "not found" >&6; }
11644            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11645          fi
11646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11647$as_echo "$tool_specified" >&6; }
11648        fi
11649      fi
11650    fi
11651
11652  fi
11653
11654
11655
11656  if test "x$TEE" = x; then
11657    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11658  fi
11659
11660
11661
11662
11663
11664  # Publish this variable in the help.
11665
11666
11667  if [ -z "${TOUCH+x}" ]; then
11668    # The variable is not set by user, try to locate tool using the code snippet
11669    for ac_prog in touch
11670do
11671  # Extract the first word of "$ac_prog", so it can be a program name with args.
11672set dummy $ac_prog; ac_word=$2
11673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11674$as_echo_n "checking for $ac_word... " >&6; }
11675if ${ac_cv_path_TOUCH+:} false; then :
11676  $as_echo_n "(cached) " >&6
11677else
11678  case $TOUCH in
11679  [\\/]* | ?:[\\/]*)
11680  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11681  ;;
11682  *)
11683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11684for as_dir in $PATH
11685do
11686  IFS=$as_save_IFS
11687  test -z "$as_dir" && as_dir=.
11688    for ac_exec_ext in '' $ac_executable_extensions; do
11689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11690    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11692    break 2
11693  fi
11694done
11695  done
11696IFS=$as_save_IFS
11697
11698  ;;
11699esac
11700fi
11701TOUCH=$ac_cv_path_TOUCH
11702if test -n "$TOUCH"; then
11703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11704$as_echo "$TOUCH" >&6; }
11705else
11706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11707$as_echo "no" >&6; }
11708fi
11709
11710
11711  test -n "$TOUCH" && break
11712done
11713
11714  else
11715    # The variable is set, but is it from the command line or the environment?
11716
11717    # Try to remove the string !TOUCH! from our list.
11718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11720      # If it failed, the variable was not from the command line. Ignore it,
11721      # but warn the user (except for BASH, which is always set by the calling BASH).
11722      if test "xTOUCH" != xBASH; then
11723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11724$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11725      fi
11726      # Try to locate tool using the code snippet
11727      for ac_prog in touch
11728do
11729  # Extract the first word of "$ac_prog", so it can be a program name with args.
11730set dummy $ac_prog; ac_word=$2
11731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11732$as_echo_n "checking for $ac_word... " >&6; }
11733if ${ac_cv_path_TOUCH+:} false; then :
11734  $as_echo_n "(cached) " >&6
11735else
11736  case $TOUCH in
11737  [\\/]* | ?:[\\/]*)
11738  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11739  ;;
11740  *)
11741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11742for as_dir in $PATH
11743do
11744  IFS=$as_save_IFS
11745  test -z "$as_dir" && as_dir=.
11746    for ac_exec_ext in '' $ac_executable_extensions; do
11747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11748    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11750    break 2
11751  fi
11752done
11753  done
11754IFS=$as_save_IFS
11755
11756  ;;
11757esac
11758fi
11759TOUCH=$ac_cv_path_TOUCH
11760if test -n "$TOUCH"; then
11761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11762$as_echo "$TOUCH" >&6; }
11763else
11764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11765$as_echo "no" >&6; }
11766fi
11767
11768
11769  test -n "$TOUCH" && break
11770done
11771
11772    else
11773      # If it succeeded, then it was overridden by the user. We will use it
11774      # for the tool.
11775
11776      # First remove it from the list of overridden variables, so we can test
11777      # for unknown variables in the end.
11778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11779
11780      # Check if we try to supply an empty value
11781      if test "x$TOUCH" = x; then
11782        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11783$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11785$as_echo_n "checking for TOUCH... " >&6; }
11786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11787$as_echo "disabled" >&6; }
11788      else
11789        # Check if the provided tool contains a complete path.
11790        tool_specified="$TOUCH"
11791        tool_basename="${tool_specified##*/}"
11792        if test "x$tool_basename" = "x$tool_specified"; then
11793          # A command without a complete path is provided, search $PATH.
11794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11795$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11796          # Extract the first word of "$tool_basename", so it can be a program name with args.
11797set dummy $tool_basename; ac_word=$2
11798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11799$as_echo_n "checking for $ac_word... " >&6; }
11800if ${ac_cv_path_TOUCH+:} false; then :
11801  $as_echo_n "(cached) " >&6
11802else
11803  case $TOUCH in
11804  [\\/]* | ?:[\\/]*)
11805  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11806  ;;
11807  *)
11808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11809for as_dir in $PATH
11810do
11811  IFS=$as_save_IFS
11812  test -z "$as_dir" && as_dir=.
11813    for ac_exec_ext in '' $ac_executable_extensions; do
11814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11815    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11817    break 2
11818  fi
11819done
11820  done
11821IFS=$as_save_IFS
11822
11823  ;;
11824esac
11825fi
11826TOUCH=$ac_cv_path_TOUCH
11827if test -n "$TOUCH"; then
11828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11829$as_echo "$TOUCH" >&6; }
11830else
11831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11832$as_echo "no" >&6; }
11833fi
11834
11835
11836          if test "x$TOUCH" = x; then
11837            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11838          fi
11839        else
11840          # Otherwise we believe it is a complete path. Use it as it is.
11841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11842$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11843          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11844$as_echo_n "checking for TOUCH... " >&6; }
11845          if test ! -x "$tool_specified"; then
11846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11847$as_echo "not found" >&6; }
11848            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11849          fi
11850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11851$as_echo "$tool_specified" >&6; }
11852        fi
11853      fi
11854    fi
11855
11856  fi
11857
11858
11859
11860  if test "x$TOUCH" = x; then
11861    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11862  fi
11863
11864
11865
11866
11867
11868  # Publish this variable in the help.
11869
11870
11871  if [ -z "${TR+x}" ]; then
11872    # The variable is not set by user, try to locate tool using the code snippet
11873    for ac_prog in tr
11874do
11875  # Extract the first word of "$ac_prog", so it can be a program name with args.
11876set dummy $ac_prog; ac_word=$2
11877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11878$as_echo_n "checking for $ac_word... " >&6; }
11879if ${ac_cv_path_TR+:} false; then :
11880  $as_echo_n "(cached) " >&6
11881else
11882  case $TR in
11883  [\\/]* | ?:[\\/]*)
11884  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11885  ;;
11886  *)
11887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11888for as_dir in $PATH
11889do
11890  IFS=$as_save_IFS
11891  test -z "$as_dir" && as_dir=.
11892    for ac_exec_ext in '' $ac_executable_extensions; do
11893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11894    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11896    break 2
11897  fi
11898done
11899  done
11900IFS=$as_save_IFS
11901
11902  ;;
11903esac
11904fi
11905TR=$ac_cv_path_TR
11906if test -n "$TR"; then
11907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11908$as_echo "$TR" >&6; }
11909else
11910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11911$as_echo "no" >&6; }
11912fi
11913
11914
11915  test -n "$TR" && break
11916done
11917
11918  else
11919    # The variable is set, but is it from the command line or the environment?
11920
11921    # Try to remove the string !TR! from our list.
11922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11924      # If it failed, the variable was not from the command line. Ignore it,
11925      # but warn the user (except for BASH, which is always set by the calling BASH).
11926      if test "xTR" != xBASH; then
11927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11928$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11929      fi
11930      # Try to locate tool using the code snippet
11931      for ac_prog in tr
11932do
11933  # Extract the first word of "$ac_prog", so it can be a program name with args.
11934set dummy $ac_prog; ac_word=$2
11935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11936$as_echo_n "checking for $ac_word... " >&6; }
11937if ${ac_cv_path_TR+:} false; then :
11938  $as_echo_n "(cached) " >&6
11939else
11940  case $TR in
11941  [\\/]* | ?:[\\/]*)
11942  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11943  ;;
11944  *)
11945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11946for as_dir in $PATH
11947do
11948  IFS=$as_save_IFS
11949  test -z "$as_dir" && as_dir=.
11950    for ac_exec_ext in '' $ac_executable_extensions; do
11951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11952    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11954    break 2
11955  fi
11956done
11957  done
11958IFS=$as_save_IFS
11959
11960  ;;
11961esac
11962fi
11963TR=$ac_cv_path_TR
11964if test -n "$TR"; then
11965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11966$as_echo "$TR" >&6; }
11967else
11968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11969$as_echo "no" >&6; }
11970fi
11971
11972
11973  test -n "$TR" && break
11974done
11975
11976    else
11977      # If it succeeded, then it was overridden by the user. We will use it
11978      # for the tool.
11979
11980      # First remove it from the list of overridden variables, so we can test
11981      # for unknown variables in the end.
11982      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11983
11984      # Check if we try to supply an empty value
11985      if test "x$TR" = x; then
11986        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11987$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11989$as_echo_n "checking for TR... " >&6; }
11990        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11991$as_echo "disabled" >&6; }
11992      else
11993        # Check if the provided tool contains a complete path.
11994        tool_specified="$TR"
11995        tool_basename="${tool_specified##*/}"
11996        if test "x$tool_basename" = "x$tool_specified"; then
11997          # A command without a complete path is provided, search $PATH.
11998          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11999$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12000          # Extract the first word of "$tool_basename", so it can be a program name with args.
12001set dummy $tool_basename; ac_word=$2
12002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12003$as_echo_n "checking for $ac_word... " >&6; }
12004if ${ac_cv_path_TR+:} false; then :
12005  $as_echo_n "(cached) " >&6
12006else
12007  case $TR in
12008  [\\/]* | ?:[\\/]*)
12009  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12010  ;;
12011  *)
12012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12013for as_dir in $PATH
12014do
12015  IFS=$as_save_IFS
12016  test -z "$as_dir" && as_dir=.
12017    for ac_exec_ext in '' $ac_executable_extensions; do
12018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12019    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12021    break 2
12022  fi
12023done
12024  done
12025IFS=$as_save_IFS
12026
12027  ;;
12028esac
12029fi
12030TR=$ac_cv_path_TR
12031if test -n "$TR"; then
12032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12033$as_echo "$TR" >&6; }
12034else
12035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12036$as_echo "no" >&6; }
12037fi
12038
12039
12040          if test "x$TR" = x; then
12041            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12042          fi
12043        else
12044          # Otherwise we believe it is a complete path. Use it as it is.
12045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12046$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12047          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12048$as_echo_n "checking for TR... " >&6; }
12049          if test ! -x "$tool_specified"; then
12050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12051$as_echo "not found" >&6; }
12052            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12053          fi
12054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12055$as_echo "$tool_specified" >&6; }
12056        fi
12057      fi
12058    fi
12059
12060  fi
12061
12062
12063
12064  if test "x$TR" = x; then
12065    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12066  fi
12067
12068
12069
12070
12071
12072  # Publish this variable in the help.
12073
12074
12075  if [ -z "${UNAME+x}" ]; then
12076    # The variable is not set by user, try to locate tool using the code snippet
12077    for ac_prog in uname
12078do
12079  # Extract the first word of "$ac_prog", so it can be a program name with args.
12080set dummy $ac_prog; ac_word=$2
12081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12082$as_echo_n "checking for $ac_word... " >&6; }
12083if ${ac_cv_path_UNAME+:} false; then :
12084  $as_echo_n "(cached) " >&6
12085else
12086  case $UNAME in
12087  [\\/]* | ?:[\\/]*)
12088  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12089  ;;
12090  *)
12091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12092for as_dir in $PATH
12093do
12094  IFS=$as_save_IFS
12095  test -z "$as_dir" && as_dir=.
12096    for ac_exec_ext in '' $ac_executable_extensions; do
12097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12098    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12100    break 2
12101  fi
12102done
12103  done
12104IFS=$as_save_IFS
12105
12106  ;;
12107esac
12108fi
12109UNAME=$ac_cv_path_UNAME
12110if test -n "$UNAME"; then
12111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12112$as_echo "$UNAME" >&6; }
12113else
12114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12115$as_echo "no" >&6; }
12116fi
12117
12118
12119  test -n "$UNAME" && break
12120done
12121
12122  else
12123    # The variable is set, but is it from the command line or the environment?
12124
12125    # Try to remove the string !UNAME! from our list.
12126    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12127    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12128      # If it failed, the variable was not from the command line. Ignore it,
12129      # but warn the user (except for BASH, which is always set by the calling BASH).
12130      if test "xUNAME" != xBASH; then
12131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12132$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12133      fi
12134      # Try to locate tool using the code snippet
12135      for ac_prog in uname
12136do
12137  # Extract the first word of "$ac_prog", so it can be a program name with args.
12138set dummy $ac_prog; ac_word=$2
12139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12140$as_echo_n "checking for $ac_word... " >&6; }
12141if ${ac_cv_path_UNAME+:} false; then :
12142  $as_echo_n "(cached) " >&6
12143else
12144  case $UNAME in
12145  [\\/]* | ?:[\\/]*)
12146  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12147  ;;
12148  *)
12149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12150for as_dir in $PATH
12151do
12152  IFS=$as_save_IFS
12153  test -z "$as_dir" && as_dir=.
12154    for ac_exec_ext in '' $ac_executable_extensions; do
12155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12156    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12158    break 2
12159  fi
12160done
12161  done
12162IFS=$as_save_IFS
12163
12164  ;;
12165esac
12166fi
12167UNAME=$ac_cv_path_UNAME
12168if test -n "$UNAME"; then
12169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12170$as_echo "$UNAME" >&6; }
12171else
12172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12173$as_echo "no" >&6; }
12174fi
12175
12176
12177  test -n "$UNAME" && break
12178done
12179
12180    else
12181      # If it succeeded, then it was overridden by the user. We will use it
12182      # for the tool.
12183
12184      # First remove it from the list of overridden variables, so we can test
12185      # for unknown variables in the end.
12186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12187
12188      # Check if we try to supply an empty value
12189      if test "x$UNAME" = x; then
12190        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12191$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12193$as_echo_n "checking for UNAME... " >&6; }
12194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12195$as_echo "disabled" >&6; }
12196      else
12197        # Check if the provided tool contains a complete path.
12198        tool_specified="$UNAME"
12199        tool_basename="${tool_specified##*/}"
12200        if test "x$tool_basename" = "x$tool_specified"; then
12201          # A command without a complete path is provided, search $PATH.
12202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12203$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12204          # Extract the first word of "$tool_basename", so it can be a program name with args.
12205set dummy $tool_basename; ac_word=$2
12206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12207$as_echo_n "checking for $ac_word... " >&6; }
12208if ${ac_cv_path_UNAME+:} false; then :
12209  $as_echo_n "(cached) " >&6
12210else
12211  case $UNAME in
12212  [\\/]* | ?:[\\/]*)
12213  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12214  ;;
12215  *)
12216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12217for as_dir in $PATH
12218do
12219  IFS=$as_save_IFS
12220  test -z "$as_dir" && as_dir=.
12221    for ac_exec_ext in '' $ac_executable_extensions; do
12222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12223    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12225    break 2
12226  fi
12227done
12228  done
12229IFS=$as_save_IFS
12230
12231  ;;
12232esac
12233fi
12234UNAME=$ac_cv_path_UNAME
12235if test -n "$UNAME"; then
12236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12237$as_echo "$UNAME" >&6; }
12238else
12239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12240$as_echo "no" >&6; }
12241fi
12242
12243
12244          if test "x$UNAME" = x; then
12245            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12246          fi
12247        else
12248          # Otherwise we believe it is a complete path. Use it as it is.
12249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12250$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12251          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12252$as_echo_n "checking for UNAME... " >&6; }
12253          if test ! -x "$tool_specified"; then
12254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12255$as_echo "not found" >&6; }
12256            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12257          fi
12258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12259$as_echo "$tool_specified" >&6; }
12260        fi
12261      fi
12262    fi
12263
12264  fi
12265
12266
12267
12268  if test "x$UNAME" = x; then
12269    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12270  fi
12271
12272
12273
12274
12275
12276  # Publish this variable in the help.
12277
12278
12279  if [ -z "${UNIQ+x}" ]; then
12280    # The variable is not set by user, try to locate tool using the code snippet
12281    for ac_prog in uniq
12282do
12283  # Extract the first word of "$ac_prog", so it can be a program name with args.
12284set dummy $ac_prog; ac_word=$2
12285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12286$as_echo_n "checking for $ac_word... " >&6; }
12287if ${ac_cv_path_UNIQ+:} false; then :
12288  $as_echo_n "(cached) " >&6
12289else
12290  case $UNIQ in
12291  [\\/]* | ?:[\\/]*)
12292  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12293  ;;
12294  *)
12295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12296for as_dir in $PATH
12297do
12298  IFS=$as_save_IFS
12299  test -z "$as_dir" && as_dir=.
12300    for ac_exec_ext in '' $ac_executable_extensions; do
12301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12302    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12304    break 2
12305  fi
12306done
12307  done
12308IFS=$as_save_IFS
12309
12310  ;;
12311esac
12312fi
12313UNIQ=$ac_cv_path_UNIQ
12314if test -n "$UNIQ"; then
12315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12316$as_echo "$UNIQ" >&6; }
12317else
12318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12319$as_echo "no" >&6; }
12320fi
12321
12322
12323  test -n "$UNIQ" && break
12324done
12325
12326  else
12327    # The variable is set, but is it from the command line or the environment?
12328
12329    # Try to remove the string !UNIQ! from our list.
12330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12332      # If it failed, the variable was not from the command line. Ignore it,
12333      # but warn the user (except for BASH, which is always set by the calling BASH).
12334      if test "xUNIQ" != xBASH; then
12335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12336$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12337      fi
12338      # Try to locate tool using the code snippet
12339      for ac_prog in uniq
12340do
12341  # Extract the first word of "$ac_prog", so it can be a program name with args.
12342set dummy $ac_prog; ac_word=$2
12343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12344$as_echo_n "checking for $ac_word... " >&6; }
12345if ${ac_cv_path_UNIQ+:} false; then :
12346  $as_echo_n "(cached) " >&6
12347else
12348  case $UNIQ in
12349  [\\/]* | ?:[\\/]*)
12350  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12351  ;;
12352  *)
12353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12354for as_dir in $PATH
12355do
12356  IFS=$as_save_IFS
12357  test -z "$as_dir" && as_dir=.
12358    for ac_exec_ext in '' $ac_executable_extensions; do
12359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12360    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12362    break 2
12363  fi
12364done
12365  done
12366IFS=$as_save_IFS
12367
12368  ;;
12369esac
12370fi
12371UNIQ=$ac_cv_path_UNIQ
12372if test -n "$UNIQ"; then
12373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12374$as_echo "$UNIQ" >&6; }
12375else
12376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12377$as_echo "no" >&6; }
12378fi
12379
12380
12381  test -n "$UNIQ" && break
12382done
12383
12384    else
12385      # If it succeeded, then it was overridden by the user. We will use it
12386      # for the tool.
12387
12388      # First remove it from the list of overridden variables, so we can test
12389      # for unknown variables in the end.
12390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12391
12392      # Check if we try to supply an empty value
12393      if test "x$UNIQ" = x; then
12394        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12395$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12397$as_echo_n "checking for UNIQ... " >&6; }
12398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12399$as_echo "disabled" >&6; }
12400      else
12401        # Check if the provided tool contains a complete path.
12402        tool_specified="$UNIQ"
12403        tool_basename="${tool_specified##*/}"
12404        if test "x$tool_basename" = "x$tool_specified"; then
12405          # A command without a complete path is provided, search $PATH.
12406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12407$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12408          # Extract the first word of "$tool_basename", so it can be a program name with args.
12409set dummy $tool_basename; ac_word=$2
12410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12411$as_echo_n "checking for $ac_word... " >&6; }
12412if ${ac_cv_path_UNIQ+:} false; then :
12413  $as_echo_n "(cached) " >&6
12414else
12415  case $UNIQ in
12416  [\\/]* | ?:[\\/]*)
12417  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12418  ;;
12419  *)
12420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12421for as_dir in $PATH
12422do
12423  IFS=$as_save_IFS
12424  test -z "$as_dir" && as_dir=.
12425    for ac_exec_ext in '' $ac_executable_extensions; do
12426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12427    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12429    break 2
12430  fi
12431done
12432  done
12433IFS=$as_save_IFS
12434
12435  ;;
12436esac
12437fi
12438UNIQ=$ac_cv_path_UNIQ
12439if test -n "$UNIQ"; then
12440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12441$as_echo "$UNIQ" >&6; }
12442else
12443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12444$as_echo "no" >&6; }
12445fi
12446
12447
12448          if test "x$UNIQ" = x; then
12449            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12450          fi
12451        else
12452          # Otherwise we believe it is a complete path. Use it as it is.
12453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12454$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12455          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12456$as_echo_n "checking for UNIQ... " >&6; }
12457          if test ! -x "$tool_specified"; then
12458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12459$as_echo "not found" >&6; }
12460            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12461          fi
12462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12463$as_echo "$tool_specified" >&6; }
12464        fi
12465      fi
12466    fi
12467
12468  fi
12469
12470
12471
12472  if test "x$UNIQ" = x; then
12473    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12474  fi
12475
12476
12477
12478
12479
12480  # Publish this variable in the help.
12481
12482
12483  if [ -z "${WC+x}" ]; then
12484    # The variable is not set by user, try to locate tool using the code snippet
12485    for ac_prog in wc
12486do
12487  # Extract the first word of "$ac_prog", so it can be a program name with args.
12488set dummy $ac_prog; ac_word=$2
12489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12490$as_echo_n "checking for $ac_word... " >&6; }
12491if ${ac_cv_path_WC+:} false; then :
12492  $as_echo_n "(cached) " >&6
12493else
12494  case $WC in
12495  [\\/]* | ?:[\\/]*)
12496  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12497  ;;
12498  *)
12499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12500for as_dir in $PATH
12501do
12502  IFS=$as_save_IFS
12503  test -z "$as_dir" && as_dir=.
12504    for ac_exec_ext in '' $ac_executable_extensions; do
12505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12506    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12508    break 2
12509  fi
12510done
12511  done
12512IFS=$as_save_IFS
12513
12514  ;;
12515esac
12516fi
12517WC=$ac_cv_path_WC
12518if test -n "$WC"; then
12519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12520$as_echo "$WC" >&6; }
12521else
12522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12523$as_echo "no" >&6; }
12524fi
12525
12526
12527  test -n "$WC" && break
12528done
12529
12530  else
12531    # The variable is set, but is it from the command line or the environment?
12532
12533    # Try to remove the string !WC! from our list.
12534    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12535    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12536      # If it failed, the variable was not from the command line. Ignore it,
12537      # but warn the user (except for BASH, which is always set by the calling BASH).
12538      if test "xWC" != xBASH; then
12539        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12540$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12541      fi
12542      # Try to locate tool using the code snippet
12543      for ac_prog in wc
12544do
12545  # Extract the first word of "$ac_prog", so it can be a program name with args.
12546set dummy $ac_prog; ac_word=$2
12547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12548$as_echo_n "checking for $ac_word... " >&6; }
12549if ${ac_cv_path_WC+:} false; then :
12550  $as_echo_n "(cached) " >&6
12551else
12552  case $WC in
12553  [\\/]* | ?:[\\/]*)
12554  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12555  ;;
12556  *)
12557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12558for as_dir in $PATH
12559do
12560  IFS=$as_save_IFS
12561  test -z "$as_dir" && as_dir=.
12562    for ac_exec_ext in '' $ac_executable_extensions; do
12563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12564    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12566    break 2
12567  fi
12568done
12569  done
12570IFS=$as_save_IFS
12571
12572  ;;
12573esac
12574fi
12575WC=$ac_cv_path_WC
12576if test -n "$WC"; then
12577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12578$as_echo "$WC" >&6; }
12579else
12580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12581$as_echo "no" >&6; }
12582fi
12583
12584
12585  test -n "$WC" && break
12586done
12587
12588    else
12589      # If it succeeded, then it was overridden by the user. We will use it
12590      # for the tool.
12591
12592      # First remove it from the list of overridden variables, so we can test
12593      # for unknown variables in the end.
12594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12595
12596      # Check if we try to supply an empty value
12597      if test "x$WC" = x; then
12598        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12599$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12600        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12601$as_echo_n "checking for WC... " >&6; }
12602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12603$as_echo "disabled" >&6; }
12604      else
12605        # Check if the provided tool contains a complete path.
12606        tool_specified="$WC"
12607        tool_basename="${tool_specified##*/}"
12608        if test "x$tool_basename" = "x$tool_specified"; then
12609          # A command without a complete path is provided, search $PATH.
12610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12611$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12612          # Extract the first word of "$tool_basename", so it can be a program name with args.
12613set dummy $tool_basename; ac_word=$2
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12615$as_echo_n "checking for $ac_word... " >&6; }
12616if ${ac_cv_path_WC+:} false; then :
12617  $as_echo_n "(cached) " >&6
12618else
12619  case $WC in
12620  [\\/]* | ?:[\\/]*)
12621  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12622  ;;
12623  *)
12624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12625for as_dir in $PATH
12626do
12627  IFS=$as_save_IFS
12628  test -z "$as_dir" && as_dir=.
12629    for ac_exec_ext in '' $ac_executable_extensions; do
12630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12631    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12633    break 2
12634  fi
12635done
12636  done
12637IFS=$as_save_IFS
12638
12639  ;;
12640esac
12641fi
12642WC=$ac_cv_path_WC
12643if test -n "$WC"; then
12644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12645$as_echo "$WC" >&6; }
12646else
12647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12648$as_echo "no" >&6; }
12649fi
12650
12651
12652          if test "x$WC" = x; then
12653            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12654          fi
12655        else
12656          # Otherwise we believe it is a complete path. Use it as it is.
12657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12658$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12659          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12660$as_echo_n "checking for WC... " >&6; }
12661          if test ! -x "$tool_specified"; then
12662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12663$as_echo "not found" >&6; }
12664            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12665          fi
12666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12667$as_echo "$tool_specified" >&6; }
12668        fi
12669      fi
12670    fi
12671
12672  fi
12673
12674
12675
12676  if test "x$WC" = x; then
12677    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12678  fi
12679
12680
12681
12682
12683
12684  # Publish this variable in the help.
12685
12686
12687  if [ -z "${WHICH+x}" ]; then
12688    # The variable is not set by user, try to locate tool using the code snippet
12689    for ac_prog in which
12690do
12691  # Extract the first word of "$ac_prog", so it can be a program name with args.
12692set dummy $ac_prog; ac_word=$2
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12694$as_echo_n "checking for $ac_word... " >&6; }
12695if ${ac_cv_path_WHICH+:} false; then :
12696  $as_echo_n "(cached) " >&6
12697else
12698  case $WHICH in
12699  [\\/]* | ?:[\\/]*)
12700  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12701  ;;
12702  *)
12703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12704for as_dir in $PATH
12705do
12706  IFS=$as_save_IFS
12707  test -z "$as_dir" && as_dir=.
12708    for ac_exec_ext in '' $ac_executable_extensions; do
12709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12710    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12712    break 2
12713  fi
12714done
12715  done
12716IFS=$as_save_IFS
12717
12718  ;;
12719esac
12720fi
12721WHICH=$ac_cv_path_WHICH
12722if test -n "$WHICH"; then
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12724$as_echo "$WHICH" >&6; }
12725else
12726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12727$as_echo "no" >&6; }
12728fi
12729
12730
12731  test -n "$WHICH" && break
12732done
12733
12734  else
12735    # The variable is set, but is it from the command line or the environment?
12736
12737    # Try to remove the string !WHICH! from our list.
12738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12740      # If it failed, the variable was not from the command line. Ignore it,
12741      # but warn the user (except for BASH, which is always set by the calling BASH).
12742      if test "xWHICH" != xBASH; then
12743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12744$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12745      fi
12746      # Try to locate tool using the code snippet
12747      for ac_prog in which
12748do
12749  # Extract the first word of "$ac_prog", so it can be a program name with args.
12750set dummy $ac_prog; ac_word=$2
12751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12752$as_echo_n "checking for $ac_word... " >&6; }
12753if ${ac_cv_path_WHICH+:} false; then :
12754  $as_echo_n "(cached) " >&6
12755else
12756  case $WHICH in
12757  [\\/]* | ?:[\\/]*)
12758  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12759  ;;
12760  *)
12761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12762for as_dir in $PATH
12763do
12764  IFS=$as_save_IFS
12765  test -z "$as_dir" && as_dir=.
12766    for ac_exec_ext in '' $ac_executable_extensions; do
12767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12768    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12770    break 2
12771  fi
12772done
12773  done
12774IFS=$as_save_IFS
12775
12776  ;;
12777esac
12778fi
12779WHICH=$ac_cv_path_WHICH
12780if test -n "$WHICH"; then
12781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12782$as_echo "$WHICH" >&6; }
12783else
12784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12785$as_echo "no" >&6; }
12786fi
12787
12788
12789  test -n "$WHICH" && break
12790done
12791
12792    else
12793      # If it succeeded, then it was overridden by the user. We will use it
12794      # for the tool.
12795
12796      # First remove it from the list of overridden variables, so we can test
12797      # for unknown variables in the end.
12798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12799
12800      # Check if we try to supply an empty value
12801      if test "x$WHICH" = x; then
12802        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12803$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12805$as_echo_n "checking for WHICH... " >&6; }
12806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12807$as_echo "disabled" >&6; }
12808      else
12809        # Check if the provided tool contains a complete path.
12810        tool_specified="$WHICH"
12811        tool_basename="${tool_specified##*/}"
12812        if test "x$tool_basename" = "x$tool_specified"; then
12813          # A command without a complete path is provided, search $PATH.
12814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12815$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12816          # Extract the first word of "$tool_basename", so it can be a program name with args.
12817set dummy $tool_basename; ac_word=$2
12818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12819$as_echo_n "checking for $ac_word... " >&6; }
12820if ${ac_cv_path_WHICH+:} false; then :
12821  $as_echo_n "(cached) " >&6
12822else
12823  case $WHICH in
12824  [\\/]* | ?:[\\/]*)
12825  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12826  ;;
12827  *)
12828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12829for as_dir in $PATH
12830do
12831  IFS=$as_save_IFS
12832  test -z "$as_dir" && as_dir=.
12833    for ac_exec_ext in '' $ac_executable_extensions; do
12834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12835    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12837    break 2
12838  fi
12839done
12840  done
12841IFS=$as_save_IFS
12842
12843  ;;
12844esac
12845fi
12846WHICH=$ac_cv_path_WHICH
12847if test -n "$WHICH"; then
12848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12849$as_echo "$WHICH" >&6; }
12850else
12851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12852$as_echo "no" >&6; }
12853fi
12854
12855
12856          if test "x$WHICH" = x; then
12857            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12858          fi
12859        else
12860          # Otherwise we believe it is a complete path. Use it as it is.
12861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12862$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12863          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12864$as_echo_n "checking for WHICH... " >&6; }
12865          if test ! -x "$tool_specified"; then
12866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12867$as_echo "not found" >&6; }
12868            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12869          fi
12870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12871$as_echo "$tool_specified" >&6; }
12872        fi
12873      fi
12874    fi
12875
12876  fi
12877
12878
12879
12880  if test "x$WHICH" = x; then
12881    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12882  fi
12883
12884
12885
12886
12887
12888  # Publish this variable in the help.
12889
12890
12891  if [ -z "${XARGS+x}" ]; then
12892    # The variable is not set by user, try to locate tool using the code snippet
12893    for ac_prog in xargs
12894do
12895  # Extract the first word of "$ac_prog", so it can be a program name with args.
12896set dummy $ac_prog; ac_word=$2
12897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12898$as_echo_n "checking for $ac_word... " >&6; }
12899if ${ac_cv_path_XARGS+:} false; then :
12900  $as_echo_n "(cached) " >&6
12901else
12902  case $XARGS in
12903  [\\/]* | ?:[\\/]*)
12904  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12905  ;;
12906  *)
12907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12908for as_dir in $PATH
12909do
12910  IFS=$as_save_IFS
12911  test -z "$as_dir" && as_dir=.
12912    for ac_exec_ext in '' $ac_executable_extensions; do
12913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12914    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12916    break 2
12917  fi
12918done
12919  done
12920IFS=$as_save_IFS
12921
12922  ;;
12923esac
12924fi
12925XARGS=$ac_cv_path_XARGS
12926if test -n "$XARGS"; then
12927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12928$as_echo "$XARGS" >&6; }
12929else
12930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12931$as_echo "no" >&6; }
12932fi
12933
12934
12935  test -n "$XARGS" && break
12936done
12937
12938  else
12939    # The variable is set, but is it from the command line or the environment?
12940
12941    # Try to remove the string !XARGS! from our list.
12942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12944      # If it failed, the variable was not from the command line. Ignore it,
12945      # but warn the user (except for BASH, which is always set by the calling BASH).
12946      if test "xXARGS" != xBASH; then
12947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12948$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12949      fi
12950      # Try to locate tool using the code snippet
12951      for ac_prog in xargs
12952do
12953  # Extract the first word of "$ac_prog", so it can be a program name with args.
12954set dummy $ac_prog; ac_word=$2
12955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12956$as_echo_n "checking for $ac_word... " >&6; }
12957if ${ac_cv_path_XARGS+:} false; then :
12958  $as_echo_n "(cached) " >&6
12959else
12960  case $XARGS in
12961  [\\/]* | ?:[\\/]*)
12962  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12963  ;;
12964  *)
12965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12966for as_dir in $PATH
12967do
12968  IFS=$as_save_IFS
12969  test -z "$as_dir" && as_dir=.
12970    for ac_exec_ext in '' $ac_executable_extensions; do
12971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12972    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12974    break 2
12975  fi
12976done
12977  done
12978IFS=$as_save_IFS
12979
12980  ;;
12981esac
12982fi
12983XARGS=$ac_cv_path_XARGS
12984if test -n "$XARGS"; then
12985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12986$as_echo "$XARGS" >&6; }
12987else
12988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12989$as_echo "no" >&6; }
12990fi
12991
12992
12993  test -n "$XARGS" && break
12994done
12995
12996    else
12997      # If it succeeded, then it was overridden by the user. We will use it
12998      # for the tool.
12999
13000      # First remove it from the list of overridden variables, so we can test
13001      # for unknown variables in the end.
13002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13003
13004      # Check if we try to supply an empty value
13005      if test "x$XARGS" = x; then
13006        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13007$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13009$as_echo_n "checking for XARGS... " >&6; }
13010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13011$as_echo "disabled" >&6; }
13012      else
13013        # Check if the provided tool contains a complete path.
13014        tool_specified="$XARGS"
13015        tool_basename="${tool_specified##*/}"
13016        if test "x$tool_basename" = "x$tool_specified"; then
13017          # A command without a complete path is provided, search $PATH.
13018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13019$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13020          # Extract the first word of "$tool_basename", so it can be a program name with args.
13021set dummy $tool_basename; ac_word=$2
13022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13023$as_echo_n "checking for $ac_word... " >&6; }
13024if ${ac_cv_path_XARGS+:} false; then :
13025  $as_echo_n "(cached) " >&6
13026else
13027  case $XARGS in
13028  [\\/]* | ?:[\\/]*)
13029  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13030  ;;
13031  *)
13032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13033for as_dir in $PATH
13034do
13035  IFS=$as_save_IFS
13036  test -z "$as_dir" && as_dir=.
13037    for ac_exec_ext in '' $ac_executable_extensions; do
13038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13039    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13041    break 2
13042  fi
13043done
13044  done
13045IFS=$as_save_IFS
13046
13047  ;;
13048esac
13049fi
13050XARGS=$ac_cv_path_XARGS
13051if test -n "$XARGS"; then
13052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13053$as_echo "$XARGS" >&6; }
13054else
13055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13056$as_echo "no" >&6; }
13057fi
13058
13059
13060          if test "x$XARGS" = x; then
13061            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13062          fi
13063        else
13064          # Otherwise we believe it is a complete path. Use it as it is.
13065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13066$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13067          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13068$as_echo_n "checking for XARGS... " >&6; }
13069          if test ! -x "$tool_specified"; then
13070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13071$as_echo "not found" >&6; }
13072            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13073          fi
13074          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13075$as_echo "$tool_specified" >&6; }
13076        fi
13077      fi
13078    fi
13079
13080  fi
13081
13082
13083
13084  if test "x$XARGS" = x; then
13085    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13086  fi
13087
13088
13089
13090  # Then required tools that require some special treatment.
13091
13092
13093  # Publish this variable in the help.
13094
13095
13096  if [ -z "${AWK+x}" ]; then
13097    # The variable is not set by user, try to locate tool using the code snippet
13098    for ac_prog in gawk mawk nawk awk
13099do
13100  # Extract the first word of "$ac_prog", so it can be a program name with args.
13101set dummy $ac_prog; ac_word=$2
13102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13103$as_echo_n "checking for $ac_word... " >&6; }
13104if ${ac_cv_prog_AWK+:} false; then :
13105  $as_echo_n "(cached) " >&6
13106else
13107  if test -n "$AWK"; then
13108  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13109else
13110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13111for as_dir in $PATH
13112do
13113  IFS=$as_save_IFS
13114  test -z "$as_dir" && as_dir=.
13115    for ac_exec_ext in '' $ac_executable_extensions; do
13116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13117    ac_cv_prog_AWK="$ac_prog"
13118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13119    break 2
13120  fi
13121done
13122  done
13123IFS=$as_save_IFS
13124
13125fi
13126fi
13127AWK=$ac_cv_prog_AWK
13128if test -n "$AWK"; then
13129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13130$as_echo "$AWK" >&6; }
13131else
13132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13133$as_echo "no" >&6; }
13134fi
13135
13136
13137  test -n "$AWK" && break
13138done
13139
13140  else
13141    # The variable is set, but is it from the command line or the environment?
13142
13143    # Try to remove the string !AWK! from our list.
13144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13146      # If it failed, the variable was not from the command line. Ignore it,
13147      # but warn the user (except for BASH, which is always set by the calling BASH).
13148      if test "xAWK" != xBASH; then
13149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13150$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13151      fi
13152      # Try to locate tool using the code snippet
13153      for ac_prog in gawk mawk nawk awk
13154do
13155  # Extract the first word of "$ac_prog", so it can be a program name with args.
13156set dummy $ac_prog; ac_word=$2
13157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13158$as_echo_n "checking for $ac_word... " >&6; }
13159if ${ac_cv_prog_AWK+:} false; then :
13160  $as_echo_n "(cached) " >&6
13161else
13162  if test -n "$AWK"; then
13163  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13164else
13165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13166for as_dir in $PATH
13167do
13168  IFS=$as_save_IFS
13169  test -z "$as_dir" && as_dir=.
13170    for ac_exec_ext in '' $ac_executable_extensions; do
13171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13172    ac_cv_prog_AWK="$ac_prog"
13173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13174    break 2
13175  fi
13176done
13177  done
13178IFS=$as_save_IFS
13179
13180fi
13181fi
13182AWK=$ac_cv_prog_AWK
13183if test -n "$AWK"; then
13184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13185$as_echo "$AWK" >&6; }
13186else
13187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13188$as_echo "no" >&6; }
13189fi
13190
13191
13192  test -n "$AWK" && break
13193done
13194
13195    else
13196      # If it succeeded, then it was overridden by the user. We will use it
13197      # for the tool.
13198
13199      # First remove it from the list of overridden variables, so we can test
13200      # for unknown variables in the end.
13201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13202
13203      # Check if we try to supply an empty value
13204      if test "x$AWK" = x; then
13205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13206$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13208$as_echo_n "checking for AWK... " >&6; }
13209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13210$as_echo "disabled" >&6; }
13211      else
13212        # Check if the provided tool contains a complete path.
13213        tool_specified="$AWK"
13214        tool_basename="${tool_specified##*/}"
13215        if test "x$tool_basename" = "x$tool_specified"; then
13216          # A command without a complete path is provided, search $PATH.
13217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13218$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13219          # Extract the first word of "$tool_basename", so it can be a program name with args.
13220set dummy $tool_basename; ac_word=$2
13221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13222$as_echo_n "checking for $ac_word... " >&6; }
13223if ${ac_cv_path_AWK+:} false; then :
13224  $as_echo_n "(cached) " >&6
13225else
13226  case $AWK in
13227  [\\/]* | ?:[\\/]*)
13228  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13229  ;;
13230  *)
13231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13232for as_dir in $PATH
13233do
13234  IFS=$as_save_IFS
13235  test -z "$as_dir" && as_dir=.
13236    for ac_exec_ext in '' $ac_executable_extensions; do
13237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13238    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13240    break 2
13241  fi
13242done
13243  done
13244IFS=$as_save_IFS
13245
13246  ;;
13247esac
13248fi
13249AWK=$ac_cv_path_AWK
13250if test -n "$AWK"; then
13251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13252$as_echo "$AWK" >&6; }
13253else
13254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13255$as_echo "no" >&6; }
13256fi
13257
13258
13259          if test "x$AWK" = x; then
13260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13261          fi
13262        else
13263          # Otherwise we believe it is a complete path. Use it as it is.
13264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13265$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13267$as_echo_n "checking for AWK... " >&6; }
13268          if test ! -x "$tool_specified"; then
13269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13270$as_echo "not found" >&6; }
13271            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13272          fi
13273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13274$as_echo "$tool_specified" >&6; }
13275        fi
13276      fi
13277    fi
13278
13279  fi
13280
13281
13282  if test "x$AWK" = x; then
13283    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13284  fi
13285
13286
13287
13288
13289  # Publish this variable in the help.
13290
13291
13292  if [ -z "${GREP+x}" ]; then
13293    # The variable is not set by user, try to locate tool using the code snippet
13294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13295$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13296if ${ac_cv_path_GREP+:} false; then :
13297  $as_echo_n "(cached) " >&6
13298else
13299  if test -z "$GREP"; then
13300  ac_path_GREP_found=false
13301  # Loop through the user's path and test for each of PROGNAME-LIST
13302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13303for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13304do
13305  IFS=$as_save_IFS
13306  test -z "$as_dir" && as_dir=.
13307    for ac_prog in grep ggrep; do
13308    for ac_exec_ext in '' $ac_executable_extensions; do
13309      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13310      as_fn_executable_p "$ac_path_GREP" || continue
13311# Check for GNU ac_path_GREP and select it if it is found.
13312  # Check for GNU $ac_path_GREP
13313case `"$ac_path_GREP" --version 2>&1` in
13314*GNU*)
13315  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13316*)
13317  ac_count=0
13318  $as_echo_n 0123456789 >"conftest.in"
13319  while :
13320  do
13321    cat "conftest.in" "conftest.in" >"conftest.tmp"
13322    mv "conftest.tmp" "conftest.in"
13323    cp "conftest.in" "conftest.nl"
13324    $as_echo 'GREP' >> "conftest.nl"
13325    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13326    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13327    as_fn_arith $ac_count + 1 && ac_count=$as_val
13328    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13329      # Best one so far, save it but keep looking for a better one
13330      ac_cv_path_GREP="$ac_path_GREP"
13331      ac_path_GREP_max=$ac_count
13332    fi
13333    # 10*(2^10) chars as input seems more than enough
13334    test $ac_count -gt 10 && break
13335  done
13336  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13337esac
13338
13339      $ac_path_GREP_found && break 3
13340    done
13341  done
13342  done
13343IFS=$as_save_IFS
13344  if test -z "$ac_cv_path_GREP"; then
13345    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13346  fi
13347else
13348  ac_cv_path_GREP=$GREP
13349fi
13350
13351fi
13352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13353$as_echo "$ac_cv_path_GREP" >&6; }
13354 GREP="$ac_cv_path_GREP"
13355
13356
13357  else
13358    # The variable is set, but is it from the command line or the environment?
13359
13360    # Try to remove the string !GREP! from our list.
13361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13363      # If it failed, the variable was not from the command line. Ignore it,
13364      # but warn the user (except for BASH, which is always set by the calling BASH).
13365      if test "xGREP" != xBASH; then
13366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13367$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13368      fi
13369      # Try to locate tool using the code snippet
13370      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13371$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13372if ${ac_cv_path_GREP+:} false; then :
13373  $as_echo_n "(cached) " >&6
13374else
13375  if test -z "$GREP"; then
13376  ac_path_GREP_found=false
13377  # Loop through the user's path and test for each of PROGNAME-LIST
13378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13379for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13380do
13381  IFS=$as_save_IFS
13382  test -z "$as_dir" && as_dir=.
13383    for ac_prog in grep ggrep; do
13384    for ac_exec_ext in '' $ac_executable_extensions; do
13385      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13386      as_fn_executable_p "$ac_path_GREP" || continue
13387# Check for GNU ac_path_GREP and select it if it is found.
13388  # Check for GNU $ac_path_GREP
13389case `"$ac_path_GREP" --version 2>&1` in
13390*GNU*)
13391  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13392*)
13393  ac_count=0
13394  $as_echo_n 0123456789 >"conftest.in"
13395  while :
13396  do
13397    cat "conftest.in" "conftest.in" >"conftest.tmp"
13398    mv "conftest.tmp" "conftest.in"
13399    cp "conftest.in" "conftest.nl"
13400    $as_echo 'GREP' >> "conftest.nl"
13401    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13402    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13403    as_fn_arith $ac_count + 1 && ac_count=$as_val
13404    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13405      # Best one so far, save it but keep looking for a better one
13406      ac_cv_path_GREP="$ac_path_GREP"
13407      ac_path_GREP_max=$ac_count
13408    fi
13409    # 10*(2^10) chars as input seems more than enough
13410    test $ac_count -gt 10 && break
13411  done
13412  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13413esac
13414
13415      $ac_path_GREP_found && break 3
13416    done
13417  done
13418  done
13419IFS=$as_save_IFS
13420  if test -z "$ac_cv_path_GREP"; then
13421    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13422  fi
13423else
13424  ac_cv_path_GREP=$GREP
13425fi
13426
13427fi
13428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13429$as_echo "$ac_cv_path_GREP" >&6; }
13430 GREP="$ac_cv_path_GREP"
13431
13432
13433    else
13434      # If it succeeded, then it was overridden by the user. We will use it
13435      # for the tool.
13436
13437      # First remove it from the list of overridden variables, so we can test
13438      # for unknown variables in the end.
13439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13440
13441      # Check if we try to supply an empty value
13442      if test "x$GREP" = x; then
13443        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13444$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13446$as_echo_n "checking for GREP... " >&6; }
13447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13448$as_echo "disabled" >&6; }
13449      else
13450        # Check if the provided tool contains a complete path.
13451        tool_specified="$GREP"
13452        tool_basename="${tool_specified##*/}"
13453        if test "x$tool_basename" = "x$tool_specified"; then
13454          # A command without a complete path is provided, search $PATH.
13455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13456$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13457          # Extract the first word of "$tool_basename", so it can be a program name with args.
13458set dummy $tool_basename; ac_word=$2
13459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13460$as_echo_n "checking for $ac_word... " >&6; }
13461if ${ac_cv_path_GREP+:} false; then :
13462  $as_echo_n "(cached) " >&6
13463else
13464  case $GREP in
13465  [\\/]* | ?:[\\/]*)
13466  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13467  ;;
13468  *)
13469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13470for as_dir in $PATH
13471do
13472  IFS=$as_save_IFS
13473  test -z "$as_dir" && as_dir=.
13474    for ac_exec_ext in '' $ac_executable_extensions; do
13475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13476    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13478    break 2
13479  fi
13480done
13481  done
13482IFS=$as_save_IFS
13483
13484  ;;
13485esac
13486fi
13487GREP=$ac_cv_path_GREP
13488if test -n "$GREP"; then
13489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13490$as_echo "$GREP" >&6; }
13491else
13492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13493$as_echo "no" >&6; }
13494fi
13495
13496
13497          if test "x$GREP" = x; then
13498            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13499          fi
13500        else
13501          # Otherwise we believe it is a complete path. Use it as it is.
13502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13503$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13504          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13505$as_echo_n "checking for GREP... " >&6; }
13506          if test ! -x "$tool_specified"; then
13507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13508$as_echo "not found" >&6; }
13509            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13510          fi
13511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13512$as_echo "$tool_specified" >&6; }
13513        fi
13514      fi
13515    fi
13516
13517  fi
13518
13519
13520  if test "x$GREP" = x; then
13521    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13522  fi
13523
13524
13525
13526
13527  # Publish this variable in the help.
13528
13529
13530  if [ -z "${EGREP+x}" ]; then
13531    # The variable is not set by user, try to locate tool using the code snippet
13532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13533$as_echo_n "checking for egrep... " >&6; }
13534if ${ac_cv_path_EGREP+:} false; then :
13535  $as_echo_n "(cached) " >&6
13536else
13537  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13538   then ac_cv_path_EGREP="$GREP -E"
13539   else
13540     if test -z "$EGREP"; then
13541  ac_path_EGREP_found=false
13542  # Loop through the user's path and test for each of PROGNAME-LIST
13543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13544for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13545do
13546  IFS=$as_save_IFS
13547  test -z "$as_dir" && as_dir=.
13548    for ac_prog in egrep; do
13549    for ac_exec_ext in '' $ac_executable_extensions; do
13550      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13551      as_fn_executable_p "$ac_path_EGREP" || continue
13552# Check for GNU ac_path_EGREP and select it if it is found.
13553  # Check for GNU $ac_path_EGREP
13554case `"$ac_path_EGREP" --version 2>&1` in
13555*GNU*)
13556  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13557*)
13558  ac_count=0
13559  $as_echo_n 0123456789 >"conftest.in"
13560  while :
13561  do
13562    cat "conftest.in" "conftest.in" >"conftest.tmp"
13563    mv "conftest.tmp" "conftest.in"
13564    cp "conftest.in" "conftest.nl"
13565    $as_echo 'EGREP' >> "conftest.nl"
13566    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13567    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13568    as_fn_arith $ac_count + 1 && ac_count=$as_val
13569    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13570      # Best one so far, save it but keep looking for a better one
13571      ac_cv_path_EGREP="$ac_path_EGREP"
13572      ac_path_EGREP_max=$ac_count
13573    fi
13574    # 10*(2^10) chars as input seems more than enough
13575    test $ac_count -gt 10 && break
13576  done
13577  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13578esac
13579
13580      $ac_path_EGREP_found && break 3
13581    done
13582  done
13583  done
13584IFS=$as_save_IFS
13585  if test -z "$ac_cv_path_EGREP"; then
13586    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13587  fi
13588else
13589  ac_cv_path_EGREP=$EGREP
13590fi
13591
13592   fi
13593fi
13594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13595$as_echo "$ac_cv_path_EGREP" >&6; }
13596 EGREP="$ac_cv_path_EGREP"
13597
13598
13599  else
13600    # The variable is set, but is it from the command line or the environment?
13601
13602    # Try to remove the string !EGREP! from our list.
13603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13605      # If it failed, the variable was not from the command line. Ignore it,
13606      # but warn the user (except for BASH, which is always set by the calling BASH).
13607      if test "xEGREP" != xBASH; then
13608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13609$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13610      fi
13611      # Try to locate tool using the code snippet
13612      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13613$as_echo_n "checking for egrep... " >&6; }
13614if ${ac_cv_path_EGREP+:} false; then :
13615  $as_echo_n "(cached) " >&6
13616else
13617  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13618   then ac_cv_path_EGREP="$GREP -E"
13619   else
13620     if test -z "$EGREP"; then
13621  ac_path_EGREP_found=false
13622  # Loop through the user's path and test for each of PROGNAME-LIST
13623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13624for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13625do
13626  IFS=$as_save_IFS
13627  test -z "$as_dir" && as_dir=.
13628    for ac_prog in egrep; do
13629    for ac_exec_ext in '' $ac_executable_extensions; do
13630      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13631      as_fn_executable_p "$ac_path_EGREP" || continue
13632# Check for GNU ac_path_EGREP and select it if it is found.
13633  # Check for GNU $ac_path_EGREP
13634case `"$ac_path_EGREP" --version 2>&1` in
13635*GNU*)
13636  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13637*)
13638  ac_count=0
13639  $as_echo_n 0123456789 >"conftest.in"
13640  while :
13641  do
13642    cat "conftest.in" "conftest.in" >"conftest.tmp"
13643    mv "conftest.tmp" "conftest.in"
13644    cp "conftest.in" "conftest.nl"
13645    $as_echo 'EGREP' >> "conftest.nl"
13646    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13647    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13648    as_fn_arith $ac_count + 1 && ac_count=$as_val
13649    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13650      # Best one so far, save it but keep looking for a better one
13651      ac_cv_path_EGREP="$ac_path_EGREP"
13652      ac_path_EGREP_max=$ac_count
13653    fi
13654    # 10*(2^10) chars as input seems more than enough
13655    test $ac_count -gt 10 && break
13656  done
13657  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13658esac
13659
13660      $ac_path_EGREP_found && break 3
13661    done
13662  done
13663  done
13664IFS=$as_save_IFS
13665  if test -z "$ac_cv_path_EGREP"; then
13666    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13667  fi
13668else
13669  ac_cv_path_EGREP=$EGREP
13670fi
13671
13672   fi
13673fi
13674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13675$as_echo "$ac_cv_path_EGREP" >&6; }
13676 EGREP="$ac_cv_path_EGREP"
13677
13678
13679    else
13680      # If it succeeded, then it was overridden by the user. We will use it
13681      # for the tool.
13682
13683      # First remove it from the list of overridden variables, so we can test
13684      # for unknown variables in the end.
13685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13686
13687      # Check if we try to supply an empty value
13688      if test "x$EGREP" = x; then
13689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13690$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13692$as_echo_n "checking for EGREP... " >&6; }
13693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13694$as_echo "disabled" >&6; }
13695      else
13696        # Check if the provided tool contains a complete path.
13697        tool_specified="$EGREP"
13698        tool_basename="${tool_specified##*/}"
13699        if test "x$tool_basename" = "x$tool_specified"; then
13700          # A command without a complete path is provided, search $PATH.
13701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13702$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13703          # Extract the first word of "$tool_basename", so it can be a program name with args.
13704set dummy $tool_basename; ac_word=$2
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13706$as_echo_n "checking for $ac_word... " >&6; }
13707if ${ac_cv_path_EGREP+:} false; then :
13708  $as_echo_n "(cached) " >&6
13709else
13710  case $EGREP in
13711  [\\/]* | ?:[\\/]*)
13712  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13713  ;;
13714  *)
13715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13716for as_dir in $PATH
13717do
13718  IFS=$as_save_IFS
13719  test -z "$as_dir" && as_dir=.
13720    for ac_exec_ext in '' $ac_executable_extensions; do
13721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13722    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13724    break 2
13725  fi
13726done
13727  done
13728IFS=$as_save_IFS
13729
13730  ;;
13731esac
13732fi
13733EGREP=$ac_cv_path_EGREP
13734if test -n "$EGREP"; then
13735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13736$as_echo "$EGREP" >&6; }
13737else
13738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13739$as_echo "no" >&6; }
13740fi
13741
13742
13743          if test "x$EGREP" = x; then
13744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13745          fi
13746        else
13747          # Otherwise we believe it is a complete path. Use it as it is.
13748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13749$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13751$as_echo_n "checking for EGREP... " >&6; }
13752          if test ! -x "$tool_specified"; then
13753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13754$as_echo "not found" >&6; }
13755            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13756          fi
13757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13758$as_echo "$tool_specified" >&6; }
13759        fi
13760      fi
13761    fi
13762
13763  fi
13764
13765
13766  if test "x$EGREP" = x; then
13767    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13768  fi
13769
13770
13771
13772
13773  # Publish this variable in the help.
13774
13775
13776  if [ -z "${FGREP+x}" ]; then
13777    # The variable is not set by user, try to locate tool using the code snippet
13778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13779$as_echo_n "checking for fgrep... " >&6; }
13780if ${ac_cv_path_FGREP+:} false; then :
13781  $as_echo_n "(cached) " >&6
13782else
13783  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13784   then ac_cv_path_FGREP="$GREP -F"
13785   else
13786     if test -z "$FGREP"; then
13787  ac_path_FGREP_found=false
13788  # Loop through the user's path and test for each of PROGNAME-LIST
13789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13790for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13791do
13792  IFS=$as_save_IFS
13793  test -z "$as_dir" && as_dir=.
13794    for ac_prog in fgrep; do
13795    for ac_exec_ext in '' $ac_executable_extensions; do
13796      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13797      as_fn_executable_p "$ac_path_FGREP" || continue
13798# Check for GNU ac_path_FGREP and select it if it is found.
13799  # Check for GNU $ac_path_FGREP
13800case `"$ac_path_FGREP" --version 2>&1` in
13801*GNU*)
13802  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13803*)
13804  ac_count=0
13805  $as_echo_n 0123456789 >"conftest.in"
13806  while :
13807  do
13808    cat "conftest.in" "conftest.in" >"conftest.tmp"
13809    mv "conftest.tmp" "conftest.in"
13810    cp "conftest.in" "conftest.nl"
13811    $as_echo 'FGREP' >> "conftest.nl"
13812    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13813    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13814    as_fn_arith $ac_count + 1 && ac_count=$as_val
13815    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13816      # Best one so far, save it but keep looking for a better one
13817      ac_cv_path_FGREP="$ac_path_FGREP"
13818      ac_path_FGREP_max=$ac_count
13819    fi
13820    # 10*(2^10) chars as input seems more than enough
13821    test $ac_count -gt 10 && break
13822  done
13823  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13824esac
13825
13826      $ac_path_FGREP_found && break 3
13827    done
13828  done
13829  done
13830IFS=$as_save_IFS
13831  if test -z "$ac_cv_path_FGREP"; then
13832    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13833  fi
13834else
13835  ac_cv_path_FGREP=$FGREP
13836fi
13837
13838   fi
13839fi
13840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13841$as_echo "$ac_cv_path_FGREP" >&6; }
13842 FGREP="$ac_cv_path_FGREP"
13843
13844
13845  else
13846    # The variable is set, but is it from the command line or the environment?
13847
13848    # Try to remove the string !FGREP! from our list.
13849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13851      # If it failed, the variable was not from the command line. Ignore it,
13852      # but warn the user (except for BASH, which is always set by the calling BASH).
13853      if test "xFGREP" != xBASH; then
13854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13855$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13856      fi
13857      # Try to locate tool using the code snippet
13858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13859$as_echo_n "checking for fgrep... " >&6; }
13860if ${ac_cv_path_FGREP+:} false; then :
13861  $as_echo_n "(cached) " >&6
13862else
13863  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13864   then ac_cv_path_FGREP="$GREP -F"
13865   else
13866     if test -z "$FGREP"; then
13867  ac_path_FGREP_found=false
13868  # Loop through the user's path and test for each of PROGNAME-LIST
13869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13870for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13871do
13872  IFS=$as_save_IFS
13873  test -z "$as_dir" && as_dir=.
13874    for ac_prog in fgrep; do
13875    for ac_exec_ext in '' $ac_executable_extensions; do
13876      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13877      as_fn_executable_p "$ac_path_FGREP" || continue
13878# Check for GNU ac_path_FGREP and select it if it is found.
13879  # Check for GNU $ac_path_FGREP
13880case `"$ac_path_FGREP" --version 2>&1` in
13881*GNU*)
13882  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13883*)
13884  ac_count=0
13885  $as_echo_n 0123456789 >"conftest.in"
13886  while :
13887  do
13888    cat "conftest.in" "conftest.in" >"conftest.tmp"
13889    mv "conftest.tmp" "conftest.in"
13890    cp "conftest.in" "conftest.nl"
13891    $as_echo 'FGREP' >> "conftest.nl"
13892    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13893    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13894    as_fn_arith $ac_count + 1 && ac_count=$as_val
13895    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13896      # Best one so far, save it but keep looking for a better one
13897      ac_cv_path_FGREP="$ac_path_FGREP"
13898      ac_path_FGREP_max=$ac_count
13899    fi
13900    # 10*(2^10) chars as input seems more than enough
13901    test $ac_count -gt 10 && break
13902  done
13903  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13904esac
13905
13906      $ac_path_FGREP_found && break 3
13907    done
13908  done
13909  done
13910IFS=$as_save_IFS
13911  if test -z "$ac_cv_path_FGREP"; then
13912    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13913  fi
13914else
13915  ac_cv_path_FGREP=$FGREP
13916fi
13917
13918   fi
13919fi
13920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13921$as_echo "$ac_cv_path_FGREP" >&6; }
13922 FGREP="$ac_cv_path_FGREP"
13923
13924
13925    else
13926      # If it succeeded, then it was overridden by the user. We will use it
13927      # for the tool.
13928
13929      # First remove it from the list of overridden variables, so we can test
13930      # for unknown variables in the end.
13931      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13932
13933      # Check if we try to supply an empty value
13934      if test "x$FGREP" = x; then
13935        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13936$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13937        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13938$as_echo_n "checking for FGREP... " >&6; }
13939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13940$as_echo "disabled" >&6; }
13941      else
13942        # Check if the provided tool contains a complete path.
13943        tool_specified="$FGREP"
13944        tool_basename="${tool_specified##*/}"
13945        if test "x$tool_basename" = "x$tool_specified"; then
13946          # A command without a complete path is provided, search $PATH.
13947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13948$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13949          # Extract the first word of "$tool_basename", so it can be a program name with args.
13950set dummy $tool_basename; ac_word=$2
13951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13952$as_echo_n "checking for $ac_word... " >&6; }
13953if ${ac_cv_path_FGREP+:} false; then :
13954  $as_echo_n "(cached) " >&6
13955else
13956  case $FGREP in
13957  [\\/]* | ?:[\\/]*)
13958  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13959  ;;
13960  *)
13961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13962for as_dir in $PATH
13963do
13964  IFS=$as_save_IFS
13965  test -z "$as_dir" && as_dir=.
13966    for ac_exec_ext in '' $ac_executable_extensions; do
13967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13968    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13970    break 2
13971  fi
13972done
13973  done
13974IFS=$as_save_IFS
13975
13976  ;;
13977esac
13978fi
13979FGREP=$ac_cv_path_FGREP
13980if test -n "$FGREP"; then
13981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13982$as_echo "$FGREP" >&6; }
13983else
13984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13985$as_echo "no" >&6; }
13986fi
13987
13988
13989          if test "x$FGREP" = x; then
13990            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13991          fi
13992        else
13993          # Otherwise we believe it is a complete path. Use it as it is.
13994          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13995$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13996          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13997$as_echo_n "checking for FGREP... " >&6; }
13998          if test ! -x "$tool_specified"; then
13999            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14000$as_echo "not found" >&6; }
14001            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14002          fi
14003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14004$as_echo "$tool_specified" >&6; }
14005        fi
14006      fi
14007    fi
14008
14009  fi
14010
14011
14012  if test "x$FGREP" = x; then
14013    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14014  fi
14015
14016
14017
14018
14019  # Publish this variable in the help.
14020
14021
14022  if [ -z "${SED+x}" ]; then
14023    # The variable is not set by user, try to locate tool using the code snippet
14024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14025$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14026if ${ac_cv_path_SED+:} false; then :
14027  $as_echo_n "(cached) " >&6
14028else
14029            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14030     for ac_i in 1 2 3 4 5 6 7; do
14031       ac_script="$ac_script$as_nl$ac_script"
14032     done
14033     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14034     { ac_script=; unset ac_script;}
14035     if test -z "$SED"; then
14036  ac_path_SED_found=false
14037  # Loop through the user's path and test for each of PROGNAME-LIST
14038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14039for as_dir in $PATH
14040do
14041  IFS=$as_save_IFS
14042  test -z "$as_dir" && as_dir=.
14043    for ac_prog in sed gsed; do
14044    for ac_exec_ext in '' $ac_executable_extensions; do
14045      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14046      as_fn_executable_p "$ac_path_SED" || continue
14047# Check for GNU ac_path_SED and select it if it is found.
14048  # Check for GNU $ac_path_SED
14049case `"$ac_path_SED" --version 2>&1` in
14050*GNU*)
14051  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14052*)
14053  ac_count=0
14054  $as_echo_n 0123456789 >"conftest.in"
14055  while :
14056  do
14057    cat "conftest.in" "conftest.in" >"conftest.tmp"
14058    mv "conftest.tmp" "conftest.in"
14059    cp "conftest.in" "conftest.nl"
14060    $as_echo '' >> "conftest.nl"
14061    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14062    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14063    as_fn_arith $ac_count + 1 && ac_count=$as_val
14064    if test $ac_count -gt ${ac_path_SED_max-0}; then
14065      # Best one so far, save it but keep looking for a better one
14066      ac_cv_path_SED="$ac_path_SED"
14067      ac_path_SED_max=$ac_count
14068    fi
14069    # 10*(2^10) chars as input seems more than enough
14070    test $ac_count -gt 10 && break
14071  done
14072  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14073esac
14074
14075      $ac_path_SED_found && break 3
14076    done
14077  done
14078  done
14079IFS=$as_save_IFS
14080  if test -z "$ac_cv_path_SED"; then
14081    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14082  fi
14083else
14084  ac_cv_path_SED=$SED
14085fi
14086
14087fi
14088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14089$as_echo "$ac_cv_path_SED" >&6; }
14090 SED="$ac_cv_path_SED"
14091  rm -f conftest.sed
14092
14093  else
14094    # The variable is set, but is it from the command line or the environment?
14095
14096    # Try to remove the string !SED! from our list.
14097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14099      # If it failed, the variable was not from the command line. Ignore it,
14100      # but warn the user (except for BASH, which is always set by the calling BASH).
14101      if test "xSED" != xBASH; then
14102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14103$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14104      fi
14105      # Try to locate tool using the code snippet
14106      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14107$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14108if ${ac_cv_path_SED+:} false; then :
14109  $as_echo_n "(cached) " >&6
14110else
14111            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14112     for ac_i in 1 2 3 4 5 6 7; do
14113       ac_script="$ac_script$as_nl$ac_script"
14114     done
14115     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14116     { ac_script=; unset ac_script;}
14117     if test -z "$SED"; then
14118  ac_path_SED_found=false
14119  # Loop through the user's path and test for each of PROGNAME-LIST
14120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14121for as_dir in $PATH
14122do
14123  IFS=$as_save_IFS
14124  test -z "$as_dir" && as_dir=.
14125    for ac_prog in sed gsed; do
14126    for ac_exec_ext in '' $ac_executable_extensions; do
14127      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14128      as_fn_executable_p "$ac_path_SED" || continue
14129# Check for GNU ac_path_SED and select it if it is found.
14130  # Check for GNU $ac_path_SED
14131case `"$ac_path_SED" --version 2>&1` in
14132*GNU*)
14133  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14134*)
14135  ac_count=0
14136  $as_echo_n 0123456789 >"conftest.in"
14137  while :
14138  do
14139    cat "conftest.in" "conftest.in" >"conftest.tmp"
14140    mv "conftest.tmp" "conftest.in"
14141    cp "conftest.in" "conftest.nl"
14142    $as_echo '' >> "conftest.nl"
14143    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14144    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14145    as_fn_arith $ac_count + 1 && ac_count=$as_val
14146    if test $ac_count -gt ${ac_path_SED_max-0}; then
14147      # Best one so far, save it but keep looking for a better one
14148      ac_cv_path_SED="$ac_path_SED"
14149      ac_path_SED_max=$ac_count
14150    fi
14151    # 10*(2^10) chars as input seems more than enough
14152    test $ac_count -gt 10 && break
14153  done
14154  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14155esac
14156
14157      $ac_path_SED_found && break 3
14158    done
14159  done
14160  done
14161IFS=$as_save_IFS
14162  if test -z "$ac_cv_path_SED"; then
14163    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14164  fi
14165else
14166  ac_cv_path_SED=$SED
14167fi
14168
14169fi
14170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14171$as_echo "$ac_cv_path_SED" >&6; }
14172 SED="$ac_cv_path_SED"
14173  rm -f conftest.sed
14174
14175    else
14176      # If it succeeded, then it was overridden by the user. We will use it
14177      # for the tool.
14178
14179      # First remove it from the list of overridden variables, so we can test
14180      # for unknown variables in the end.
14181      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14182
14183      # Check if we try to supply an empty value
14184      if test "x$SED" = x; then
14185        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14186$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14188$as_echo_n "checking for SED... " >&6; }
14189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14190$as_echo "disabled" >&6; }
14191      else
14192        # Check if the provided tool contains a complete path.
14193        tool_specified="$SED"
14194        tool_basename="${tool_specified##*/}"
14195        if test "x$tool_basename" = "x$tool_specified"; then
14196          # A command without a complete path is provided, search $PATH.
14197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14198$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14199          # Extract the first word of "$tool_basename", so it can be a program name with args.
14200set dummy $tool_basename; ac_word=$2
14201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14202$as_echo_n "checking for $ac_word... " >&6; }
14203if ${ac_cv_path_SED+:} false; then :
14204  $as_echo_n "(cached) " >&6
14205else
14206  case $SED in
14207  [\\/]* | ?:[\\/]*)
14208  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14209  ;;
14210  *)
14211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14212for as_dir in $PATH
14213do
14214  IFS=$as_save_IFS
14215  test -z "$as_dir" && as_dir=.
14216    for ac_exec_ext in '' $ac_executable_extensions; do
14217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14218    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14220    break 2
14221  fi
14222done
14223  done
14224IFS=$as_save_IFS
14225
14226  ;;
14227esac
14228fi
14229SED=$ac_cv_path_SED
14230if test -n "$SED"; then
14231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14232$as_echo "$SED" >&6; }
14233else
14234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14235$as_echo "no" >&6; }
14236fi
14237
14238
14239          if test "x$SED" = x; then
14240            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14241          fi
14242        else
14243          # Otherwise we believe it is a complete path. Use it as it is.
14244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14245$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14246          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14247$as_echo_n "checking for SED... " >&6; }
14248          if test ! -x "$tool_specified"; then
14249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14250$as_echo "not found" >&6; }
14251            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14252          fi
14253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14254$as_echo "$tool_specified" >&6; }
14255        fi
14256      fi
14257    fi
14258
14259  fi
14260
14261
14262  if test "x$SED" = x; then
14263    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14264  fi
14265
14266
14267
14268  # Always force rm.
14269  RM="$RM -f"
14270
14271  # pwd behaves differently on various platforms and some don't support the -L flag.
14272  # Always use the bash builtin pwd to get uniform behavior.
14273  THEPWDCMD=pwd
14274
14275  # These are not required on all platforms
14276
14277
14278  # Publish this variable in the help.
14279
14280
14281  if [ -z "${CYGPATH+x}" ]; then
14282    # The variable is not set by user, try to locate tool using the code snippet
14283    for ac_prog in cygpath
14284do
14285  # Extract the first word of "$ac_prog", so it can be a program name with args.
14286set dummy $ac_prog; ac_word=$2
14287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14288$as_echo_n "checking for $ac_word... " >&6; }
14289if ${ac_cv_path_CYGPATH+:} false; then :
14290  $as_echo_n "(cached) " >&6
14291else
14292  case $CYGPATH in
14293  [\\/]* | ?:[\\/]*)
14294  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14295  ;;
14296  *)
14297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14298for as_dir in $PATH
14299do
14300  IFS=$as_save_IFS
14301  test -z "$as_dir" && as_dir=.
14302    for ac_exec_ext in '' $ac_executable_extensions; do
14303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14304    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14306    break 2
14307  fi
14308done
14309  done
14310IFS=$as_save_IFS
14311
14312  ;;
14313esac
14314fi
14315CYGPATH=$ac_cv_path_CYGPATH
14316if test -n "$CYGPATH"; then
14317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14318$as_echo "$CYGPATH" >&6; }
14319else
14320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14321$as_echo "no" >&6; }
14322fi
14323
14324
14325  test -n "$CYGPATH" && break
14326done
14327
14328  else
14329    # The variable is set, but is it from the command line or the environment?
14330
14331    # Try to remove the string !CYGPATH! from our list.
14332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14334      # If it failed, the variable was not from the command line. Ignore it,
14335      # but warn the user (except for BASH, which is always set by the calling BASH).
14336      if test "xCYGPATH" != xBASH; then
14337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14338$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14339      fi
14340      # Try to locate tool using the code snippet
14341      for ac_prog in cygpath
14342do
14343  # Extract the first word of "$ac_prog", so it can be a program name with args.
14344set dummy $ac_prog; ac_word=$2
14345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14346$as_echo_n "checking for $ac_word... " >&6; }
14347if ${ac_cv_path_CYGPATH+:} false; then :
14348  $as_echo_n "(cached) " >&6
14349else
14350  case $CYGPATH in
14351  [\\/]* | ?:[\\/]*)
14352  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14353  ;;
14354  *)
14355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14356for as_dir in $PATH
14357do
14358  IFS=$as_save_IFS
14359  test -z "$as_dir" && as_dir=.
14360    for ac_exec_ext in '' $ac_executable_extensions; do
14361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14362    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14364    break 2
14365  fi
14366done
14367  done
14368IFS=$as_save_IFS
14369
14370  ;;
14371esac
14372fi
14373CYGPATH=$ac_cv_path_CYGPATH
14374if test -n "$CYGPATH"; then
14375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14376$as_echo "$CYGPATH" >&6; }
14377else
14378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14379$as_echo "no" >&6; }
14380fi
14381
14382
14383  test -n "$CYGPATH" && break
14384done
14385
14386    else
14387      # If it succeeded, then it was overridden by the user. We will use it
14388      # for the tool.
14389
14390      # First remove it from the list of overridden variables, so we can test
14391      # for unknown variables in the end.
14392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14393
14394      # Check if we try to supply an empty value
14395      if test "x$CYGPATH" = x; then
14396        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14397$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14399$as_echo_n "checking for CYGPATH... " >&6; }
14400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14401$as_echo "disabled" >&6; }
14402      else
14403        # Check if the provided tool contains a complete path.
14404        tool_specified="$CYGPATH"
14405        tool_basename="${tool_specified##*/}"
14406        if test "x$tool_basename" = "x$tool_specified"; then
14407          # A command without a complete path is provided, search $PATH.
14408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14409$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14410          # Extract the first word of "$tool_basename", so it can be a program name with args.
14411set dummy $tool_basename; ac_word=$2
14412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14413$as_echo_n "checking for $ac_word... " >&6; }
14414if ${ac_cv_path_CYGPATH+:} false; then :
14415  $as_echo_n "(cached) " >&6
14416else
14417  case $CYGPATH in
14418  [\\/]* | ?:[\\/]*)
14419  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14420  ;;
14421  *)
14422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14423for as_dir in $PATH
14424do
14425  IFS=$as_save_IFS
14426  test -z "$as_dir" && as_dir=.
14427    for ac_exec_ext in '' $ac_executable_extensions; do
14428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14429    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14431    break 2
14432  fi
14433done
14434  done
14435IFS=$as_save_IFS
14436
14437  ;;
14438esac
14439fi
14440CYGPATH=$ac_cv_path_CYGPATH
14441if test -n "$CYGPATH"; then
14442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14443$as_echo "$CYGPATH" >&6; }
14444else
14445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14446$as_echo "no" >&6; }
14447fi
14448
14449
14450          if test "x$CYGPATH" = x; then
14451            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14452          fi
14453        else
14454          # Otherwise we believe it is a complete path. Use it as it is.
14455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14456$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14457          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14458$as_echo_n "checking for CYGPATH... " >&6; }
14459          if test ! -x "$tool_specified"; then
14460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14461$as_echo "not found" >&6; }
14462            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14463          fi
14464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14465$as_echo "$tool_specified" >&6; }
14466        fi
14467      fi
14468    fi
14469
14470  fi
14471
14472
14473
14474
14475  # Publish this variable in the help.
14476
14477
14478  if [ -z "${READLINK+x}" ]; then
14479    # The variable is not set by user, try to locate tool using the code snippet
14480    for ac_prog in greadlink readlink
14481do
14482  # Extract the first word of "$ac_prog", so it can be a program name with args.
14483set dummy $ac_prog; ac_word=$2
14484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14485$as_echo_n "checking for $ac_word... " >&6; }
14486if ${ac_cv_path_READLINK+:} false; then :
14487  $as_echo_n "(cached) " >&6
14488else
14489  case $READLINK in
14490  [\\/]* | ?:[\\/]*)
14491  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14492  ;;
14493  *)
14494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14495for as_dir in $PATH
14496do
14497  IFS=$as_save_IFS
14498  test -z "$as_dir" && as_dir=.
14499    for ac_exec_ext in '' $ac_executable_extensions; do
14500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14501    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14503    break 2
14504  fi
14505done
14506  done
14507IFS=$as_save_IFS
14508
14509  ;;
14510esac
14511fi
14512READLINK=$ac_cv_path_READLINK
14513if test -n "$READLINK"; then
14514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14515$as_echo "$READLINK" >&6; }
14516else
14517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14518$as_echo "no" >&6; }
14519fi
14520
14521
14522  test -n "$READLINK" && break
14523done
14524
14525  else
14526    # The variable is set, but is it from the command line or the environment?
14527
14528    # Try to remove the string !READLINK! from our list.
14529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14531      # If it failed, the variable was not from the command line. Ignore it,
14532      # but warn the user (except for BASH, which is always set by the calling BASH).
14533      if test "xREADLINK" != xBASH; then
14534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14535$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14536      fi
14537      # Try to locate tool using the code snippet
14538      for ac_prog in greadlink readlink
14539do
14540  # Extract the first word of "$ac_prog", so it can be a program name with args.
14541set dummy $ac_prog; ac_word=$2
14542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14543$as_echo_n "checking for $ac_word... " >&6; }
14544if ${ac_cv_path_READLINK+:} false; then :
14545  $as_echo_n "(cached) " >&6
14546else
14547  case $READLINK in
14548  [\\/]* | ?:[\\/]*)
14549  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14550  ;;
14551  *)
14552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14553for as_dir in $PATH
14554do
14555  IFS=$as_save_IFS
14556  test -z "$as_dir" && as_dir=.
14557    for ac_exec_ext in '' $ac_executable_extensions; do
14558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14559    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14561    break 2
14562  fi
14563done
14564  done
14565IFS=$as_save_IFS
14566
14567  ;;
14568esac
14569fi
14570READLINK=$ac_cv_path_READLINK
14571if test -n "$READLINK"; then
14572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14573$as_echo "$READLINK" >&6; }
14574else
14575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14576$as_echo "no" >&6; }
14577fi
14578
14579
14580  test -n "$READLINK" && break
14581done
14582
14583    else
14584      # If it succeeded, then it was overridden by the user. We will use it
14585      # for the tool.
14586
14587      # First remove it from the list of overridden variables, so we can test
14588      # for unknown variables in the end.
14589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14590
14591      # Check if we try to supply an empty value
14592      if test "x$READLINK" = x; then
14593        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14594$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14596$as_echo_n "checking for READLINK... " >&6; }
14597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14598$as_echo "disabled" >&6; }
14599      else
14600        # Check if the provided tool contains a complete path.
14601        tool_specified="$READLINK"
14602        tool_basename="${tool_specified##*/}"
14603        if test "x$tool_basename" = "x$tool_specified"; then
14604          # A command without a complete path is provided, search $PATH.
14605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14606$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14607          # Extract the first word of "$tool_basename", so it can be a program name with args.
14608set dummy $tool_basename; ac_word=$2
14609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14610$as_echo_n "checking for $ac_word... " >&6; }
14611if ${ac_cv_path_READLINK+:} false; then :
14612  $as_echo_n "(cached) " >&6
14613else
14614  case $READLINK in
14615  [\\/]* | ?:[\\/]*)
14616  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14617  ;;
14618  *)
14619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14620for as_dir in $PATH
14621do
14622  IFS=$as_save_IFS
14623  test -z "$as_dir" && as_dir=.
14624    for ac_exec_ext in '' $ac_executable_extensions; do
14625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14626    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14628    break 2
14629  fi
14630done
14631  done
14632IFS=$as_save_IFS
14633
14634  ;;
14635esac
14636fi
14637READLINK=$ac_cv_path_READLINK
14638if test -n "$READLINK"; then
14639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14640$as_echo "$READLINK" >&6; }
14641else
14642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14643$as_echo "no" >&6; }
14644fi
14645
14646
14647          if test "x$READLINK" = x; then
14648            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14649          fi
14650        else
14651          # Otherwise we believe it is a complete path. Use it as it is.
14652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14653$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14654          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14655$as_echo_n "checking for READLINK... " >&6; }
14656          if test ! -x "$tool_specified"; then
14657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14658$as_echo "not found" >&6; }
14659            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14660          fi
14661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14662$as_echo "$tool_specified" >&6; }
14663        fi
14664      fi
14665    fi
14666
14667  fi
14668
14669
14670
14671
14672  # Publish this variable in the help.
14673
14674
14675  if [ -z "${DF+x}" ]; then
14676    # The variable is not set by user, try to locate tool using the code snippet
14677    for ac_prog in df
14678do
14679  # Extract the first word of "$ac_prog", so it can be a program name with args.
14680set dummy $ac_prog; ac_word=$2
14681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14682$as_echo_n "checking for $ac_word... " >&6; }
14683if ${ac_cv_path_DF+:} false; then :
14684  $as_echo_n "(cached) " >&6
14685else
14686  case $DF in
14687  [\\/]* | ?:[\\/]*)
14688  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14689  ;;
14690  *)
14691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14692for as_dir in $PATH
14693do
14694  IFS=$as_save_IFS
14695  test -z "$as_dir" && as_dir=.
14696    for ac_exec_ext in '' $ac_executable_extensions; do
14697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14698    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14700    break 2
14701  fi
14702done
14703  done
14704IFS=$as_save_IFS
14705
14706  ;;
14707esac
14708fi
14709DF=$ac_cv_path_DF
14710if test -n "$DF"; then
14711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14712$as_echo "$DF" >&6; }
14713else
14714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14715$as_echo "no" >&6; }
14716fi
14717
14718
14719  test -n "$DF" && break
14720done
14721
14722  else
14723    # The variable is set, but is it from the command line or the environment?
14724
14725    # Try to remove the string !DF! from our list.
14726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14728      # If it failed, the variable was not from the command line. Ignore it,
14729      # but warn the user (except for BASH, which is always set by the calling BASH).
14730      if test "xDF" != xBASH; then
14731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14732$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14733      fi
14734      # Try to locate tool using the code snippet
14735      for ac_prog in df
14736do
14737  # Extract the first word of "$ac_prog", so it can be a program name with args.
14738set dummy $ac_prog; ac_word=$2
14739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14740$as_echo_n "checking for $ac_word... " >&6; }
14741if ${ac_cv_path_DF+:} false; then :
14742  $as_echo_n "(cached) " >&6
14743else
14744  case $DF in
14745  [\\/]* | ?:[\\/]*)
14746  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14747  ;;
14748  *)
14749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14750for as_dir in $PATH
14751do
14752  IFS=$as_save_IFS
14753  test -z "$as_dir" && as_dir=.
14754    for ac_exec_ext in '' $ac_executable_extensions; do
14755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14756    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14758    break 2
14759  fi
14760done
14761  done
14762IFS=$as_save_IFS
14763
14764  ;;
14765esac
14766fi
14767DF=$ac_cv_path_DF
14768if test -n "$DF"; then
14769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14770$as_echo "$DF" >&6; }
14771else
14772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14773$as_echo "no" >&6; }
14774fi
14775
14776
14777  test -n "$DF" && break
14778done
14779
14780    else
14781      # If it succeeded, then it was overridden by the user. We will use it
14782      # for the tool.
14783
14784      # First remove it from the list of overridden variables, so we can test
14785      # for unknown variables in the end.
14786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14787
14788      # Check if we try to supply an empty value
14789      if test "x$DF" = x; then
14790        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14791$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14793$as_echo_n "checking for DF... " >&6; }
14794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14795$as_echo "disabled" >&6; }
14796      else
14797        # Check if the provided tool contains a complete path.
14798        tool_specified="$DF"
14799        tool_basename="${tool_specified##*/}"
14800        if test "x$tool_basename" = "x$tool_specified"; then
14801          # A command without a complete path is provided, search $PATH.
14802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14803$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14804          # Extract the first word of "$tool_basename", so it can be a program name with args.
14805set dummy $tool_basename; ac_word=$2
14806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14807$as_echo_n "checking for $ac_word... " >&6; }
14808if ${ac_cv_path_DF+:} false; then :
14809  $as_echo_n "(cached) " >&6
14810else
14811  case $DF in
14812  [\\/]* | ?:[\\/]*)
14813  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14814  ;;
14815  *)
14816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14817for as_dir in $PATH
14818do
14819  IFS=$as_save_IFS
14820  test -z "$as_dir" && as_dir=.
14821    for ac_exec_ext in '' $ac_executable_extensions; do
14822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14823    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14825    break 2
14826  fi
14827done
14828  done
14829IFS=$as_save_IFS
14830
14831  ;;
14832esac
14833fi
14834DF=$ac_cv_path_DF
14835if test -n "$DF"; then
14836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14837$as_echo "$DF" >&6; }
14838else
14839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14840$as_echo "no" >&6; }
14841fi
14842
14843
14844          if test "x$DF" = x; then
14845            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14846          fi
14847        else
14848          # Otherwise we believe it is a complete path. Use it as it is.
14849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14850$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14852$as_echo_n "checking for DF... " >&6; }
14853          if test ! -x "$tool_specified"; then
14854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14855$as_echo "not found" >&6; }
14856            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14857          fi
14858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14859$as_echo "$tool_specified" >&6; }
14860        fi
14861      fi
14862    fi
14863
14864  fi
14865
14866
14867
14868
14869  # Publish this variable in the help.
14870
14871
14872  if [ -z "${CPIO+x}" ]; then
14873    # The variable is not set by user, try to locate tool using the code snippet
14874    for ac_prog in cpio bsdcpio
14875do
14876  # Extract the first word of "$ac_prog", so it can be a program name with args.
14877set dummy $ac_prog; ac_word=$2
14878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14879$as_echo_n "checking for $ac_word... " >&6; }
14880if ${ac_cv_path_CPIO+:} false; then :
14881  $as_echo_n "(cached) " >&6
14882else
14883  case $CPIO in
14884  [\\/]* | ?:[\\/]*)
14885  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14886  ;;
14887  *)
14888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14889for as_dir in $PATH
14890do
14891  IFS=$as_save_IFS
14892  test -z "$as_dir" && as_dir=.
14893    for ac_exec_ext in '' $ac_executable_extensions; do
14894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14895    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14897    break 2
14898  fi
14899done
14900  done
14901IFS=$as_save_IFS
14902
14903  ;;
14904esac
14905fi
14906CPIO=$ac_cv_path_CPIO
14907if test -n "$CPIO"; then
14908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14909$as_echo "$CPIO" >&6; }
14910else
14911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14912$as_echo "no" >&6; }
14913fi
14914
14915
14916  test -n "$CPIO" && break
14917done
14918
14919  else
14920    # The variable is set, but is it from the command line or the environment?
14921
14922    # Try to remove the string !CPIO! from our list.
14923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14925      # If it failed, the variable was not from the command line. Ignore it,
14926      # but warn the user (except for BASH, which is always set by the calling BASH).
14927      if test "xCPIO" != xBASH; then
14928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14929$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14930      fi
14931      # Try to locate tool using the code snippet
14932      for ac_prog in cpio bsdcpio
14933do
14934  # Extract the first word of "$ac_prog", so it can be a program name with args.
14935set dummy $ac_prog; ac_word=$2
14936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14937$as_echo_n "checking for $ac_word... " >&6; }
14938if ${ac_cv_path_CPIO+:} false; then :
14939  $as_echo_n "(cached) " >&6
14940else
14941  case $CPIO in
14942  [\\/]* | ?:[\\/]*)
14943  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14944  ;;
14945  *)
14946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14947for as_dir in $PATH
14948do
14949  IFS=$as_save_IFS
14950  test -z "$as_dir" && as_dir=.
14951    for ac_exec_ext in '' $ac_executable_extensions; do
14952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14953    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14955    break 2
14956  fi
14957done
14958  done
14959IFS=$as_save_IFS
14960
14961  ;;
14962esac
14963fi
14964CPIO=$ac_cv_path_CPIO
14965if test -n "$CPIO"; then
14966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14967$as_echo "$CPIO" >&6; }
14968else
14969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14970$as_echo "no" >&6; }
14971fi
14972
14973
14974  test -n "$CPIO" && break
14975done
14976
14977    else
14978      # If it succeeded, then it was overridden by the user. We will use it
14979      # for the tool.
14980
14981      # First remove it from the list of overridden variables, so we can test
14982      # for unknown variables in the end.
14983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14984
14985      # Check if we try to supply an empty value
14986      if test "x$CPIO" = x; then
14987        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14988$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14990$as_echo_n "checking for CPIO... " >&6; }
14991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14992$as_echo "disabled" >&6; }
14993      else
14994        # Check if the provided tool contains a complete path.
14995        tool_specified="$CPIO"
14996        tool_basename="${tool_specified##*/}"
14997        if test "x$tool_basename" = "x$tool_specified"; then
14998          # A command without a complete path is provided, search $PATH.
14999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15000$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15001          # Extract the first word of "$tool_basename", so it can be a program name with args.
15002set dummy $tool_basename; ac_word=$2
15003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15004$as_echo_n "checking for $ac_word... " >&6; }
15005if ${ac_cv_path_CPIO+:} false; then :
15006  $as_echo_n "(cached) " >&6
15007else
15008  case $CPIO in
15009  [\\/]* | ?:[\\/]*)
15010  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15011  ;;
15012  *)
15013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15014for as_dir in $PATH
15015do
15016  IFS=$as_save_IFS
15017  test -z "$as_dir" && as_dir=.
15018    for ac_exec_ext in '' $ac_executable_extensions; do
15019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15020    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15022    break 2
15023  fi
15024done
15025  done
15026IFS=$as_save_IFS
15027
15028  ;;
15029esac
15030fi
15031CPIO=$ac_cv_path_CPIO
15032if test -n "$CPIO"; then
15033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15034$as_echo "$CPIO" >&6; }
15035else
15036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15037$as_echo "no" >&6; }
15038fi
15039
15040
15041          if test "x$CPIO" = x; then
15042            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15043          fi
15044        else
15045          # Otherwise we believe it is a complete path. Use it as it is.
15046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15047$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15048          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15049$as_echo_n "checking for CPIO... " >&6; }
15050          if test ! -x "$tool_specified"; then
15051            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15052$as_echo "not found" >&6; }
15053            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15054          fi
15055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15056$as_echo "$tool_specified" >&6; }
15057        fi
15058      fi
15059    fi
15060
15061  fi
15062
15063
15064
15065
15066  # Publish this variable in the help.
15067
15068
15069  if [ -z "${NICE+x}" ]; then
15070    # The variable is not set by user, try to locate tool using the code snippet
15071    for ac_prog in nice
15072do
15073  # Extract the first word of "$ac_prog", so it can be a program name with args.
15074set dummy $ac_prog; ac_word=$2
15075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15076$as_echo_n "checking for $ac_word... " >&6; }
15077if ${ac_cv_path_NICE+:} false; then :
15078  $as_echo_n "(cached) " >&6
15079else
15080  case $NICE in
15081  [\\/]* | ?:[\\/]*)
15082  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15083  ;;
15084  *)
15085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15086for as_dir in $PATH
15087do
15088  IFS=$as_save_IFS
15089  test -z "$as_dir" && as_dir=.
15090    for ac_exec_ext in '' $ac_executable_extensions; do
15091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15092    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15094    break 2
15095  fi
15096done
15097  done
15098IFS=$as_save_IFS
15099
15100  ;;
15101esac
15102fi
15103NICE=$ac_cv_path_NICE
15104if test -n "$NICE"; then
15105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15106$as_echo "$NICE" >&6; }
15107else
15108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15109$as_echo "no" >&6; }
15110fi
15111
15112
15113  test -n "$NICE" && break
15114done
15115
15116  else
15117    # The variable is set, but is it from the command line or the environment?
15118
15119    # Try to remove the string !NICE! from our list.
15120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15122      # If it failed, the variable was not from the command line. Ignore it,
15123      # but warn the user (except for BASH, which is always set by the calling BASH).
15124      if test "xNICE" != xBASH; then
15125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15126$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15127      fi
15128      # Try to locate tool using the code snippet
15129      for ac_prog in nice
15130do
15131  # Extract the first word of "$ac_prog", so it can be a program name with args.
15132set dummy $ac_prog; ac_word=$2
15133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15134$as_echo_n "checking for $ac_word... " >&6; }
15135if ${ac_cv_path_NICE+:} false; then :
15136  $as_echo_n "(cached) " >&6
15137else
15138  case $NICE in
15139  [\\/]* | ?:[\\/]*)
15140  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15141  ;;
15142  *)
15143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15144for as_dir in $PATH
15145do
15146  IFS=$as_save_IFS
15147  test -z "$as_dir" && as_dir=.
15148    for ac_exec_ext in '' $ac_executable_extensions; do
15149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15150    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15152    break 2
15153  fi
15154done
15155  done
15156IFS=$as_save_IFS
15157
15158  ;;
15159esac
15160fi
15161NICE=$ac_cv_path_NICE
15162if test -n "$NICE"; then
15163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15164$as_echo "$NICE" >&6; }
15165else
15166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15167$as_echo "no" >&6; }
15168fi
15169
15170
15171  test -n "$NICE" && break
15172done
15173
15174    else
15175      # If it succeeded, then it was overridden by the user. We will use it
15176      # for the tool.
15177
15178      # First remove it from the list of overridden variables, so we can test
15179      # for unknown variables in the end.
15180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15181
15182      # Check if we try to supply an empty value
15183      if test "x$NICE" = x; then
15184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15185$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15187$as_echo_n "checking for NICE... " >&6; }
15188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15189$as_echo "disabled" >&6; }
15190      else
15191        # Check if the provided tool contains a complete path.
15192        tool_specified="$NICE"
15193        tool_basename="${tool_specified##*/}"
15194        if test "x$tool_basename" = "x$tool_specified"; then
15195          # A command without a complete path is provided, search $PATH.
15196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15197$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15198          # Extract the first word of "$tool_basename", so it can be a program name with args.
15199set dummy $tool_basename; ac_word=$2
15200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15201$as_echo_n "checking for $ac_word... " >&6; }
15202if ${ac_cv_path_NICE+:} false; then :
15203  $as_echo_n "(cached) " >&6
15204else
15205  case $NICE in
15206  [\\/]* | ?:[\\/]*)
15207  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15208  ;;
15209  *)
15210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15211for as_dir in $PATH
15212do
15213  IFS=$as_save_IFS
15214  test -z "$as_dir" && as_dir=.
15215    for ac_exec_ext in '' $ac_executable_extensions; do
15216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15217    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15219    break 2
15220  fi
15221done
15222  done
15223IFS=$as_save_IFS
15224
15225  ;;
15226esac
15227fi
15228NICE=$ac_cv_path_NICE
15229if test -n "$NICE"; then
15230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15231$as_echo "$NICE" >&6; }
15232else
15233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15234$as_echo "no" >&6; }
15235fi
15236
15237
15238          if test "x$NICE" = x; then
15239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15240          fi
15241        else
15242          # Otherwise we believe it is a complete path. Use it as it is.
15243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15244$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15246$as_echo_n "checking for NICE... " >&6; }
15247          if test ! -x "$tool_specified"; then
15248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15249$as_echo "not found" >&6; }
15250            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15251          fi
15252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15253$as_echo "$tool_specified" >&6; }
15254        fi
15255      fi
15256    fi
15257
15258  fi
15259
15260
15261
15262
15263# Now we can determine OpenJDK build and target platforms. This is required to
15264# have early on.
15265# Make sure we can run config.sub.
15266$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15267  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15268
15269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15270$as_echo_n "checking build system type... " >&6; }
15271if ${ac_cv_build+:} false; then :
15272  $as_echo_n "(cached) " >&6
15273else
15274  ac_build_alias=$build_alias
15275test "x$ac_build_alias" = x &&
15276  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15277test "x$ac_build_alias" = x &&
15278  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15279ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15280  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15281
15282fi
15283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15284$as_echo "$ac_cv_build" >&6; }
15285case $ac_cv_build in
15286*-*-*) ;;
15287*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15288esac
15289build=$ac_cv_build
15290ac_save_IFS=$IFS; IFS='-'
15291set x $ac_cv_build
15292shift
15293build_cpu=$1
15294build_vendor=$2
15295shift; shift
15296# Remember, the first character of IFS is used to create $*,
15297# except with old shells:
15298build_os=$*
15299IFS=$ac_save_IFS
15300case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15301
15302
15303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15304$as_echo_n "checking host system type... " >&6; }
15305if ${ac_cv_host+:} false; then :
15306  $as_echo_n "(cached) " >&6
15307else
15308  if test "x$host_alias" = x; then
15309  ac_cv_host=$ac_cv_build
15310else
15311  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15312    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15313fi
15314
15315fi
15316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15317$as_echo "$ac_cv_host" >&6; }
15318case $ac_cv_host in
15319*-*-*) ;;
15320*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15321esac
15322host=$ac_cv_host
15323ac_save_IFS=$IFS; IFS='-'
15324set x $ac_cv_host
15325shift
15326host_cpu=$1
15327host_vendor=$2
15328shift; shift
15329# Remember, the first character of IFS is used to create $*,
15330# except with old shells:
15331host_os=$*
15332IFS=$ac_save_IFS
15333case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15334
15335
15336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15337$as_echo_n "checking target system type... " >&6; }
15338if ${ac_cv_target+:} false; then :
15339  $as_echo_n "(cached) " >&6
15340else
15341  if test "x$target_alias" = x; then
15342  ac_cv_target=$ac_cv_host
15343else
15344  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15345    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15346fi
15347
15348fi
15349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15350$as_echo "$ac_cv_target" >&6; }
15351case $ac_cv_target in
15352*-*-*) ;;
15353*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15354esac
15355target=$ac_cv_target
15356ac_save_IFS=$IFS; IFS='-'
15357set x $ac_cv_target
15358shift
15359target_cpu=$1
15360target_vendor=$2
15361shift; shift
15362# Remember, the first character of IFS is used to create $*,
15363# except with old shells:
15364target_os=$*
15365IFS=$ac_save_IFS
15366case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15367
15368
15369# The aliases save the names the user supplied, while $host etc.
15370# will get canonicalized.
15371test -n "$target_alias" &&
15372  test "$program_prefix$program_suffix$program_transform_name" = \
15373    NONENONEs,x,x, &&
15374  program_prefix=${target_alias}-
15375
15376  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15377  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15378  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15379  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15380  # to use the configure naming style.
15381
15382
15383
15384
15385
15386  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15387  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15388  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15389  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15390  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15391  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15392
15393
15394
15395  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15396
15397  case "$build_os" in
15398    *linux*)
15399      VAR_OS=linux
15400      VAR_OS_TYPE=unix
15401      ;;
15402    *solaris*)
15403      VAR_OS=solaris
15404      VAR_OS_TYPE=unix
15405      ;;
15406    *darwin*)
15407      VAR_OS=macosx
15408      VAR_OS_TYPE=unix
15409      ;;
15410    *bsd*)
15411      VAR_OS=bsd
15412      VAR_OS_TYPE=unix
15413      ;;
15414    *cygwin*)
15415      VAR_OS=windows
15416      VAR_OS_ENV=windows.cygwin
15417      ;;
15418    *mingw*)
15419      VAR_OS=windows
15420      VAR_OS_ENV=windows.msys
15421      ;;
15422    *aix*)
15423      VAR_OS=aix
15424      VAR_OS_TYPE=unix
15425      ;;
15426    *)
15427      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15428      ;;
15429  esac
15430
15431
15432  # First argument is the cpu name from the trip/quad
15433  case "$build_cpu" in
15434    x86_64)
15435      VAR_CPU=x86_64
15436      VAR_CPU_ARCH=x86
15437      VAR_CPU_BITS=64
15438      VAR_CPU_ENDIAN=little
15439      ;;
15440    i?86)
15441      VAR_CPU=x86
15442      VAR_CPU_ARCH=x86
15443      VAR_CPU_BITS=32
15444      VAR_CPU_ENDIAN=little
15445      ;;
15446    arm*)
15447      VAR_CPU=arm
15448      VAR_CPU_ARCH=arm
15449      VAR_CPU_BITS=32
15450      VAR_CPU_ENDIAN=little
15451      ;;
15452    aarch64)
15453      VAR_CPU=aarch64
15454      VAR_CPU_ARCH=aarch64
15455      VAR_CPU_BITS=64
15456      VAR_CPU_ENDIAN=little
15457      ;;
15458    powerpc)
15459      VAR_CPU=ppc
15460      VAR_CPU_ARCH=ppc
15461      VAR_CPU_BITS=32
15462      VAR_CPU_ENDIAN=big
15463      ;;
15464    powerpc64)
15465      VAR_CPU=ppc64
15466      VAR_CPU_ARCH=ppc
15467      VAR_CPU_BITS=64
15468      VAR_CPU_ENDIAN=big
15469      ;;
15470    powerpc64le)
15471      VAR_CPU=ppc64le
15472      VAR_CPU_ARCH=ppc
15473      VAR_CPU_BITS=64
15474      VAR_CPU_ENDIAN=little
15475      ;;
15476    s390)
15477      VAR_CPU=s390
15478      VAR_CPU_ARCH=s390
15479      VAR_CPU_BITS=32
15480      VAR_CPU_ENDIAN=big
15481      ;;
15482    s390x)
15483      VAR_CPU=s390x
15484      VAR_CPU_ARCH=s390
15485      VAR_CPU_BITS=64
15486      VAR_CPU_ENDIAN=big
15487      ;;
15488    sparc)
15489      VAR_CPU=sparc
15490      VAR_CPU_ARCH=sparc
15491      VAR_CPU_BITS=32
15492      VAR_CPU_ENDIAN=big
15493      ;;
15494    sparcv9|sparc64)
15495      VAR_CPU=sparcv9
15496      VAR_CPU_ARCH=sparc
15497      VAR_CPU_BITS=64
15498      VAR_CPU_ENDIAN=big
15499      ;;
15500    *)
15501      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15502      ;;
15503  esac
15504
15505  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15506  OPENJDK_BUILD_OS="$VAR_OS"
15507  if test "x$VAR_OS_TYPE" != x; then
15508    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15509  else
15510    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15511  fi
15512  if test "x$VAR_OS_ENV" != x; then
15513    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15514  else
15515    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15516  fi
15517  OPENJDK_BUILD_CPU="$VAR_CPU"
15518  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15519  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15520  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15521
15522
15523
15524
15525
15526
15527
15528
15529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15530$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15532$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15533
15534  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15535
15536  case "$host_os" in
15537    *linux*)
15538      VAR_OS=linux
15539      VAR_OS_TYPE=unix
15540      ;;
15541    *solaris*)
15542      VAR_OS=solaris
15543      VAR_OS_TYPE=unix
15544      ;;
15545    *darwin*)
15546      VAR_OS=macosx
15547      VAR_OS_TYPE=unix
15548      ;;
15549    *bsd*)
15550      VAR_OS=bsd
15551      VAR_OS_TYPE=unix
15552      ;;
15553    *cygwin*)
15554      VAR_OS=windows
15555      VAR_OS_ENV=windows.cygwin
15556      ;;
15557    *mingw*)
15558      VAR_OS=windows
15559      VAR_OS_ENV=windows.msys
15560      ;;
15561    *aix*)
15562      VAR_OS=aix
15563      VAR_OS_TYPE=unix
15564      ;;
15565    *)
15566      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15567      ;;
15568  esac
15569
15570
15571  # First argument is the cpu name from the trip/quad
15572  case "$host_cpu" in
15573    x86_64)
15574      VAR_CPU=x86_64
15575      VAR_CPU_ARCH=x86
15576      VAR_CPU_BITS=64
15577      VAR_CPU_ENDIAN=little
15578      ;;
15579    i?86)
15580      VAR_CPU=x86
15581      VAR_CPU_ARCH=x86
15582      VAR_CPU_BITS=32
15583      VAR_CPU_ENDIAN=little
15584      ;;
15585    arm*)
15586      VAR_CPU=arm
15587      VAR_CPU_ARCH=arm
15588      VAR_CPU_BITS=32
15589      VAR_CPU_ENDIAN=little
15590      ;;
15591    aarch64)
15592      VAR_CPU=aarch64
15593      VAR_CPU_ARCH=aarch64
15594      VAR_CPU_BITS=64
15595      VAR_CPU_ENDIAN=little
15596      ;;
15597    powerpc)
15598      VAR_CPU=ppc
15599      VAR_CPU_ARCH=ppc
15600      VAR_CPU_BITS=32
15601      VAR_CPU_ENDIAN=big
15602      ;;
15603    powerpc64)
15604      VAR_CPU=ppc64
15605      VAR_CPU_ARCH=ppc
15606      VAR_CPU_BITS=64
15607      VAR_CPU_ENDIAN=big
15608      ;;
15609    powerpc64le)
15610      VAR_CPU=ppc64le
15611      VAR_CPU_ARCH=ppc
15612      VAR_CPU_BITS=64
15613      VAR_CPU_ENDIAN=little
15614      ;;
15615    s390)
15616      VAR_CPU=s390
15617      VAR_CPU_ARCH=s390
15618      VAR_CPU_BITS=32
15619      VAR_CPU_ENDIAN=big
15620      ;;
15621    s390x)
15622      VAR_CPU=s390x
15623      VAR_CPU_ARCH=s390
15624      VAR_CPU_BITS=64
15625      VAR_CPU_ENDIAN=big
15626      ;;
15627    sparc)
15628      VAR_CPU=sparc
15629      VAR_CPU_ARCH=sparc
15630      VAR_CPU_BITS=32
15631      VAR_CPU_ENDIAN=big
15632      ;;
15633    sparcv9|sparc64)
15634      VAR_CPU=sparcv9
15635      VAR_CPU_ARCH=sparc
15636      VAR_CPU_BITS=64
15637      VAR_CPU_ENDIAN=big
15638      ;;
15639    *)
15640      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15641      ;;
15642  esac
15643
15644  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15645  OPENJDK_TARGET_OS="$VAR_OS"
15646  if test "x$VAR_OS_TYPE" != x; then
15647    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15648  else
15649    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15650  fi
15651  if test "x$VAR_OS_ENV" != x; then
15652    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15653  else
15654    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15655  fi
15656  OPENJDK_TARGET_CPU="$VAR_CPU"
15657  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15658  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15659  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15660
15661
15662
15663
15664
15665
15666
15667
15668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15669$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15671$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15672
15673
15674
15675# Check whether --with-target-bits was given.
15676if test "${with_target_bits+set}" = set; then :
15677  withval=$with_target_bits;
15678fi
15679
15680
15681  # We have three types of compiles:
15682  # native  == normal compilation, target system == build system
15683  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15684  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15685  #
15686  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15687    # We're doing a proper cross-compilation
15688    COMPILE_TYPE="cross"
15689  else
15690    COMPILE_TYPE="native"
15691  fi
15692
15693  if test "x$with_target_bits" != x; then
15694    if test "x$COMPILE_TYPE" = "xcross"; then
15695      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15696    fi
15697
15698    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15699      # A reduced build is requested
15700      COMPILE_TYPE="reduced"
15701      OPENJDK_TARGET_CPU_BITS=32
15702      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15703        OPENJDK_TARGET_CPU=x86
15704      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15705        OPENJDK_TARGET_CPU=sparc
15706      else
15707        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15708      fi
15709    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15710      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
15711    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15712      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15713$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15714    else
15715      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15716    fi
15717  fi
15718
15719
15720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15721$as_echo_n "checking compilation type... " >&6; }
15722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15723$as_echo "$COMPILE_TYPE" >&6; }
15724
15725
15726  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15727    REQUIRED_OS_NAME=SunOS
15728    REQUIRED_OS_VERSION=5.10
15729  fi
15730  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15731    REQUIRED_OS_NAME=Linux
15732    REQUIRED_OS_VERSION=2.6
15733  fi
15734  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15735    REQUIRED_OS_NAME=Windows
15736    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15737      REQUIRED_OS_VERSION=5.2
15738    else
15739      REQUIRED_OS_VERSION=5.1
15740    fi
15741  fi
15742  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15743    REQUIRED_OS_NAME=Darwin
15744    REQUIRED_OS_VERSION=11.2
15745  fi
15746  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15747    REQUIRED_OS_NAME=AIX
15748    REQUIRED_OS_VERSION=7.1
15749  fi
15750
15751
15752
15753
15754
15755
15756  # Also store the legacy naming of the cpu.
15757  # Ie i586 and amd64 instead of x86 and x86_64
15758  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15759  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15760    OPENJDK_TARGET_CPU_LEGACY="i586"
15761  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15762    # On all platforms except MacOSX replace x86_64 with amd64.
15763    OPENJDK_TARGET_CPU_LEGACY="amd64"
15764  fi
15765
15766
15767  # And the second legacy naming of the cpu.
15768  # Ie i386 and amd64 instead of x86 and x86_64.
15769  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15770  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15771    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15772  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15773    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15774  fi
15775
15776
15777  # This is the name of the cpu (but using i386 and amd64 instead of
15778  # x86 and x86_64, respectively), preceeded by a /, to be used when
15779  # locating libraries. On macosx, it's empty, though.
15780  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15781  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15782    OPENJDK_TARGET_CPU_LIBDIR=""
15783  fi
15784
15785
15786  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15787  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15788  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15789  OPENJDK_TARGET_CPU_ISADIR=""
15790  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15791    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15792      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15793    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15794      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15795    fi
15796  fi
15797
15798
15799  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15800  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15801  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15802    # On linux only, we replace x86 with i386.
15803    OPENJDK_TARGET_CPU_OSARCH="i386"
15804  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15805    # On all platforms except macosx, we replace x86_64 with amd64.
15806    OPENJDK_TARGET_CPU_OSARCH="amd64"
15807  fi
15808
15809
15810  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15811  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15812    OPENJDK_TARGET_CPU_JLI="i386"
15813  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15814    # On all platforms except macosx, we replace x86_64 with amd64.
15815    OPENJDK_TARGET_CPU_JLI="amd64"
15816  fi
15817  # Now setup the -D flags for building libjli.
15818  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15819  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15820    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15821      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15822    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15823      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15824    fi
15825  fi
15826
15827
15828  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15829      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15830  else
15831      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15832  fi
15833
15834
15835  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15836  # Macosx is osx and x86_64 is x64
15837  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15838    OPENJDK_TARGET_OS_BUNDLE="osx"
15839  else
15840    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15841  fi
15842  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15843    OPENJDK_TARGET_CPU_BUNDLE="x64"
15844  else
15845    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15846  fi
15847  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15848
15849
15850
15851
15852  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15853    A_LP64="LP64:="
15854    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15855    # unpack200.exe
15856    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15857      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15858    fi
15859  fi
15860  LP64=$A_LP64
15861
15862
15863  if test "x$COMPILE_TYPE" = "xcross"; then
15864    # FIXME: ... or should this include reduced builds..?
15865    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15866  else
15867    DEFINE_CROSS_COMPILE_ARCH=""
15868  fi
15869
15870
15871  # Convert openjdk platform names to hotspot names
15872
15873  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15874  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15875    HOTSPOT_TARGET_OS=bsd
15876  fi
15877
15878
15879  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15880  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15881    HOTSPOT_TARGET_OS_TYPE=posix
15882  fi
15883
15884
15885  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15886  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15887    HOTSPOT_TARGET_CPU=x86_32
15888  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15889    HOTSPOT_TARGET_CPU=sparc
15890  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15891    HOTSPOT_TARGET_CPU=ppc_64
15892  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15893    HOTSPOT_TARGET_CPU=ppc_64
15894  fi
15895
15896
15897  # This is identical with OPENJDK_*, but define anyway for consistency.
15898  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15899
15900
15901  # Setup HOTSPOT_TARGET_CPU_DEFINE
15902  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15903    HOTSPOT_TARGET_CPU_DEFINE=IA32
15904  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15905    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15906  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15907    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15908  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15909    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15910  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15911    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15912  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15913    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15914
15915  # The cpu defines below are for zero, we don't support them directly.
15916  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15917    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15918  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15919    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15920  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15921    HOTSPOT_TARGET_CPU_DEFINE=S390
15922  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15923    HOTSPOT_TARGET_CPU_DEFINE=S390
15924  fi
15925
15926
15927
15928
15929  # Also store the legacy naming of the cpu.
15930  # Ie i586 and amd64 instead of x86 and x86_64
15931  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15932  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15933    OPENJDK_BUILD_CPU_LEGACY="i586"
15934  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15935    # On all platforms except MacOSX replace x86_64 with amd64.
15936    OPENJDK_BUILD_CPU_LEGACY="amd64"
15937  fi
15938
15939
15940  # And the second legacy naming of the cpu.
15941  # Ie i386 and amd64 instead of x86 and x86_64.
15942  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15943  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15944    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15945  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15946    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15947  fi
15948
15949
15950  # This is the name of the cpu (but using i386 and amd64 instead of
15951  # x86 and x86_64, respectively), preceeded by a /, to be used when
15952  # locating libraries. On macosx, it's empty, though.
15953  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15954  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15955    OPENJDK_BUILD_CPU_LIBDIR=""
15956  fi
15957
15958
15959  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15960  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15961  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15962  OPENJDK_BUILD_CPU_ISADIR=""
15963  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15964    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15965      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15966    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15967      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15968    fi
15969  fi
15970
15971
15972  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15973  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15974  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15975    # On linux only, we replace x86 with i386.
15976    OPENJDK_BUILD_CPU_OSARCH="i386"
15977  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15978    # On all platforms except macosx, we replace x86_64 with amd64.
15979    OPENJDK_BUILD_CPU_OSARCH="amd64"
15980  fi
15981
15982
15983  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15984  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15985    OPENJDK_BUILD_CPU_JLI="i386"
15986  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15987    # On all platforms except macosx, we replace x86_64 with amd64.
15988    OPENJDK_BUILD_CPU_JLI="amd64"
15989  fi
15990  # Now setup the -D flags for building libjli.
15991  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15992  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15993    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15994      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15995    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15996      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15997    fi
15998  fi
15999
16000
16001  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16002      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16003  else
16004      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16005  fi
16006
16007
16008  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16009  # Macosx is osx and x86_64 is x64
16010  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16011    OPENJDK_BUILD_OS_BUNDLE="osx"
16012  else
16013    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16014  fi
16015  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16016    OPENJDK_BUILD_CPU_BUNDLE="x64"
16017  else
16018    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16019  fi
16020  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16021
16022
16023
16024
16025  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16026    A_LP64="LP64:="
16027    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16028    # unpack200.exe
16029    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16030      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16031    fi
16032  fi
16033  LP64=$A_LP64
16034
16035
16036  if test "x$COMPILE_TYPE" = "xcross"; then
16037    # FIXME: ... or should this include reduced builds..?
16038    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16039  else
16040    DEFINE_CROSS_COMPILE_ARCH=""
16041  fi
16042
16043
16044  # Convert openjdk platform names to hotspot names
16045
16046  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16047  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16048    HOTSPOT_BUILD_OS=bsd
16049  fi
16050
16051
16052  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16053  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16054    HOTSPOT_BUILD_OS_TYPE=posix
16055  fi
16056
16057
16058  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16059  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16060    HOTSPOT_BUILD_CPU=x86_32
16061  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16062    HOTSPOT_BUILD_CPU=sparc
16063  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16064    HOTSPOT_BUILD_CPU=ppc_64
16065  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16066    HOTSPOT_BUILD_CPU=ppc_64
16067  fi
16068
16069
16070  # This is identical with OPENJDK_*, but define anyway for consistency.
16071  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16072
16073
16074  # Setup HOTSPOT_BUILD_CPU_DEFINE
16075  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16076    HOTSPOT_BUILD_CPU_DEFINE=IA32
16077  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16078    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16079  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16080    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16081  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16082    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16083  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16084    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16085  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16086    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16087
16088  # The cpu defines below are for zero, we don't support them directly.
16089  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16090    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16091  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16092    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16093  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16094    HOTSPOT_BUILD_CPU_DEFINE=S390
16095  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16096    HOTSPOT_BUILD_CPU_DEFINE=S390
16097  fi
16098
16099
16100
16101
16102  # ZERO_ARCHDEF is used to enable architecture-specific code.
16103  # This is used in legacy hotspot build.
16104  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16105
16106
16107
16108
16109
16110# Continue setting up basic stuff. Most remaining code require fundamental tools.
16111
16112  # Save the current directory this script was started from
16113  CURDIR="$PWD"
16114
16115  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16116  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16117  # was not available at that time.
16118  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16119  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16120    ORIGINAL_PATH="$REWRITTEN_PATH"
16121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16122$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16123  fi
16124
16125  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16126    PATH_SEP=";"
16127
16128  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16129  if test $SRC_ROOT_LENGTH -gt 100; then
16130    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16131  fi
16132
16133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16135$as_echo_n "checking cygwin release... " >&6; }
16136    CYGWIN_VERSION=`$UNAME -r`
16137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16138$as_echo "$CYGWIN_VERSION" >&6; }
16139    WINDOWS_ENV_VENDOR='cygwin'
16140    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16141
16142    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16143    if test "x$CYGWIN_VERSION_OLD" != x; then
16144      { $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
16145$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;}
16146      as_fn_error $? "Cannot continue" "$LINENO" 5
16147    fi
16148    if test "x$CYGPATH" = x; then
16149      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16150    fi
16151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16152$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16153    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16154    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
16155    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16156    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16158$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16159    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16160    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16161    if test "x$test_cygdrive_prefix" = x; then
16162      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16163    fi
16164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16166$as_echo_n "checking msys release... " >&6; }
16167    MSYS_VERSION=`$UNAME -r`
16168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16169$as_echo "$MSYS_VERSION" >&6; }
16170
16171    WINDOWS_ENV_VENDOR='msys'
16172    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16173
16174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16175$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16176    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16177    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
16178
16179  windows_path="$MSYS_ROOT_PATH"
16180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16181    unix_path=`$CYGPATH -u "$windows_path"`
16182    MSYS_ROOT_PATH="$unix_path"
16183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16185    MSYS_ROOT_PATH="$unix_path"
16186  fi
16187
16188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16189$as_echo "$MSYS_ROOT_PATH" >&6; }
16190    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16191  else
16192    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16193  fi
16194
16195  # Test if windows or unix (cygwin/msys) find is first in path.
16196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16197$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16198  FIND_BINARY_OUTPUT=`find --version 2>&1`
16199  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16201$as_echo "unix style" >&6; }
16202  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16204$as_echo "Windows" >&6; }
16205    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16206$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16207    { $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
16208$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16209    as_fn_error $? "Cannot continue" "$LINENO" 5
16210  else
16211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16212$as_echo "unknown" >&6; }
16213    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16214$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16215  fi
16216
16217  else
16218    PATH_SEP=":"
16219  fi
16220
16221
16222  # We get the top-level directory from the supporting wrappers.
16223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16224$as_echo_n "checking for top-level directory... " >&6; }
16225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16226$as_echo "$TOPDIR" >&6; }
16227
16228
16229  # Save the original version of TOPDIR for string comparisons
16230  ORIGINAL_TOPDIR="$TOPDIR"
16231
16232
16233  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16234
16235  # Only process if variable expands to non-empty
16236
16237  if test "x$CURDIR" != x; then
16238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16239
16240  # Input might be given as Windows format, start by converting to
16241  # unix format.
16242  path="$CURDIR"
16243  new_path=`$CYGPATH -u "$path"`
16244
16245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16248  # "foo.exe" is OK but "foo" is an error.
16249  #
16250  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16251  # It is also a way to make sure we got the proper file name for the real test later on.
16252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16253  if test "x$test_shortpath" = x; then
16254    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16255$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16256    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16257  fi
16258
16259  # Call helper function which possibly converts this using DOS-style short mode.
16260  # If so, the updated path is stored in $new_path.
16261
16262  input_path="$new_path"
16263  # Check if we need to convert this using DOS-style short mode. If the path
16264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16265  # take no chances and rewrite it.
16266  # Note: m4 eats our [], so we need to use [ and ] instead.
16267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16268  if test "x$has_forbidden_chars" != x; then
16269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16273      # Going to short mode and back again did indeed matter. Since short mode is
16274      # case insensitive, let's make it lowercase to improve readability.
16275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16276      # Now convert it back to Unix-style (cygpath)
16277      input_path=`$CYGPATH -u "$shortmode_path"`
16278      new_path="$input_path"
16279    fi
16280  fi
16281
16282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16283  if test "x$test_cygdrive_prefix" = x; then
16284    # As a simple fix, exclude /usr/bin since it's not a real path.
16285    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16287      # a path prefixed by /cygdrive for fixpath to work.
16288      new_path="$CYGWIN_ROOT_PATH$input_path"
16289    fi
16290  fi
16291
16292
16293  if test "x$path" != "x$new_path"; then
16294    CURDIR="$new_path"
16295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16296$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16297  fi
16298
16299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16300
16301  path="$CURDIR"
16302  has_colon=`$ECHO $path | $GREP ^.:`
16303  new_path="$path"
16304  if test "x$has_colon" = x; then
16305    # Not in mixed or Windows style, start by that.
16306    new_path=`cmd //c echo $path`
16307  fi
16308
16309
16310  input_path="$new_path"
16311  # Check if we need to convert this using DOS-style short mode. If the path
16312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16313  # take no chances and rewrite it.
16314  # Note: m4 eats our [], so we need to use [ and ] instead.
16315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16316  if test "x$has_forbidden_chars" != x; then
16317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16319  fi
16320
16321
16322  windows_path="$new_path"
16323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16324    unix_path=`$CYGPATH -u "$windows_path"`
16325    new_path="$unix_path"
16326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16328    new_path="$unix_path"
16329  fi
16330
16331  if test "x$path" != "x$new_path"; then
16332    CURDIR="$new_path"
16333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16334$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16335  fi
16336
16337  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16338  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16339
16340    else
16341      # We're on a unix platform. Hooray! :)
16342      path="$CURDIR"
16343      has_space=`$ECHO "$path" | $GREP " "`
16344      if test "x$has_space" != x; then
16345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16346$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16347        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16348      fi
16349
16350      # Use eval to expand a potential ~
16351      eval path="$path"
16352      if test ! -f "$path" && test ! -d "$path"; then
16353        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16354      fi
16355
16356      if test -d "$path"; then
16357        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16358      else
16359        dir="`$DIRNAME "$path"`"
16360        base="`$BASENAME "$path"`"
16361        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16362      fi
16363    fi
16364  fi
16365
16366
16367  # Only process if variable expands to non-empty
16368
16369  if test "x$TOPDIR" != x; then
16370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16371
16372  # Input might be given as Windows format, start by converting to
16373  # unix format.
16374  path="$TOPDIR"
16375  new_path=`$CYGPATH -u "$path"`
16376
16377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16380  # "foo.exe" is OK but "foo" is an error.
16381  #
16382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16383  # It is also a way to make sure we got the proper file name for the real test later on.
16384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16385  if test "x$test_shortpath" = x; then
16386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16387$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16388    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16389  fi
16390
16391  # Call helper function which possibly converts this using DOS-style short mode.
16392  # If so, the updated path is stored in $new_path.
16393
16394  input_path="$new_path"
16395  # Check if we need to convert this using DOS-style short mode. If the path
16396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16397  # take no chances and rewrite it.
16398  # Note: m4 eats our [], so we need to use [ and ] instead.
16399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16400  if test "x$has_forbidden_chars" != x; then
16401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16405      # Going to short mode and back again did indeed matter. Since short mode is
16406      # case insensitive, let's make it lowercase to improve readability.
16407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16408      # Now convert it back to Unix-style (cygpath)
16409      input_path=`$CYGPATH -u "$shortmode_path"`
16410      new_path="$input_path"
16411    fi
16412  fi
16413
16414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16415  if test "x$test_cygdrive_prefix" = x; then
16416    # As a simple fix, exclude /usr/bin since it's not a real path.
16417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16419      # a path prefixed by /cygdrive for fixpath to work.
16420      new_path="$CYGWIN_ROOT_PATH$input_path"
16421    fi
16422  fi
16423
16424
16425  if test "x$path" != "x$new_path"; then
16426    TOPDIR="$new_path"
16427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16428$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16429  fi
16430
16431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16432
16433  path="$TOPDIR"
16434  has_colon=`$ECHO $path | $GREP ^.:`
16435  new_path="$path"
16436  if test "x$has_colon" = x; then
16437    # Not in mixed or Windows style, start by that.
16438    new_path=`cmd //c echo $path`
16439  fi
16440
16441
16442  input_path="$new_path"
16443  # Check if we need to convert this using DOS-style short mode. If the path
16444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16445  # take no chances and rewrite it.
16446  # Note: m4 eats our [], so we need to use [ and ] instead.
16447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16448  if test "x$has_forbidden_chars" != x; then
16449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16451  fi
16452
16453
16454  windows_path="$new_path"
16455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16456    unix_path=`$CYGPATH -u "$windows_path"`
16457    new_path="$unix_path"
16458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16460    new_path="$unix_path"
16461  fi
16462
16463  if test "x$path" != "x$new_path"; then
16464    TOPDIR="$new_path"
16465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16466$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16467  fi
16468
16469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16471
16472    else
16473      # We're on a unix platform. Hooray! :)
16474      path="$TOPDIR"
16475      has_space=`$ECHO "$path" | $GREP " "`
16476      if test "x$has_space" != x; then
16477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16478$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16480      fi
16481
16482      # Use eval to expand a potential ~
16483      eval path="$path"
16484      if test ! -f "$path" && test ! -d "$path"; then
16485        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16486      fi
16487
16488      if test -d "$path"; then
16489        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16490      else
16491        dir="`$DIRNAME "$path"`"
16492        base="`$BASENAME "$path"`"
16493        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16494      fi
16495    fi
16496  fi
16497
16498  # SRC_ROOT is a traditional alias for TOPDIR.
16499  SRC_ROOT=$TOPDIR
16500
16501  # Calculate a canonical version of TOPDIR for string comparisons
16502  CANONICAL_TOPDIR=$TOPDIR
16503
16504  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16505    # Follow a chain of symbolic links. Use readlink
16506    # where it exists, else fall back to horribly
16507    # complicated shell code.
16508    if test "x$READLINK_TESTED" != yes; then
16509      # On MacOSX there is a readlink tool with a different
16510      # purpose than the GNU readlink tool. Check the found readlink.
16511      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16512      if test "x$ISGNU" = x; then
16513        # A readlink that we do not know how to use.
16514        # Are there other non-GNU readlinks out there?
16515        READLINK_TESTED=yes
16516        READLINK=
16517      fi
16518    fi
16519
16520    if test "x$READLINK" != x; then
16521      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16522    else
16523      # Save the current directory for restoring afterwards
16524      STARTDIR=$PWD
16525      COUNTER=0
16526      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16527      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16528      cd $sym_link_dir
16529      # Use -P flag to resolve symlinks in directories.
16530      cd `$THEPWDCMD -P`
16531      sym_link_dir=`$THEPWDCMD -P`
16532      # Resolve file symlinks
16533      while test $COUNTER -lt 20; do
16534        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16535        if test "x$ISLINK" == x; then
16536          # This is not a symbolic link! We are done!
16537          break
16538        fi
16539        # Again resolve directory symlinks since the target of the just found
16540        # link could be in a different directory
16541        cd `$DIRNAME $ISLINK`
16542        sym_link_dir=`$THEPWDCMD -P`
16543        sym_link_file=`$BASENAME $ISLINK`
16544        let COUNTER=COUNTER+1
16545      done
16546      cd $STARTDIR
16547      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16548    fi
16549  fi
16550
16551
16552
16553  # Locate the directory of this script.
16554  AUTOCONF_DIR=$TOPDIR/common/autoconf
16555
16556  # Setup username (for use in adhoc version strings etc)
16557  # Outer [ ] to quote m4.
16558   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16559
16560
16561
16562# Check if it's a pure open build or if custom sources are to be used.
16563
16564  # Check whether --enable-openjdk-only was given.
16565if test "${enable_openjdk_only+set}" = set; then :
16566  enableval=$enable_openjdk_only;
16567else
16568  enable_openjdk_only="no"
16569fi
16570
16571
16572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16573$as_echo_n "checking for presence of closed sources... " >&6; }
16574  if test -d "$SRC_ROOT/jdk/src/closed"; then
16575    CLOSED_SOURCE_PRESENT=yes
16576  else
16577    CLOSED_SOURCE_PRESENT=no
16578  fi
16579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16580$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16581
16582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16583$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16584  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16586$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16587
16588  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16589    OPENJDK=true
16590    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16591      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16592$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16593    fi
16594  else
16595    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16596      OPENJDK=true
16597    else
16598      OPENJDK=false
16599    fi
16600  fi
16601
16602  if test "x$OPENJDK" = "xtrue"; then
16603    SET_OPENJDK="OPENJDK=true"
16604  fi
16605
16606
16607
16608  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16609  # the IncludeCustomExtension macro.
16610
16611
16612# Check whether --with-custom-make-dir was given.
16613if test "${with_custom_make_dir+set}" = set; then :
16614  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
16615$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16616fi
16617
16618
16619
16620
16621# These are needed to be able to create a configuration name (and thus the output directory)
16622
16623  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16624$as_echo_n "checking which variant of the JDK to build... " >&6; }
16625
16626# Check whether --with-jdk-variant was given.
16627if test "${with_jdk_variant+set}" = set; then :
16628  withval=$with_jdk_variant;
16629fi
16630
16631
16632  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16633    JDK_VARIANT="normal"
16634  else
16635    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16636  fi
16637
16638
16639
16640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16641$as_echo "$JDK_VARIANT" >&6; }
16642
16643
16644  DEBUG_LEVEL="release"
16645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16646$as_echo_n "checking which debug level to use... " >&6; }
16647  # Check whether --enable-debug was given.
16648if test "${enable_debug+set}" = set; then :
16649  enableval=$enable_debug;
16650        ENABLE_DEBUG="${enableval}"
16651        DEBUG_LEVEL="fastdebug"
16652
16653else
16654  ENABLE_DEBUG="no"
16655fi
16656
16657
16658
16659# Check whether --with-debug-level was given.
16660if test "${with_debug_level+set}" = set; then :
16661  withval=$with_debug_level;
16662        DEBUG_LEVEL="${withval}"
16663        if test "x$ENABLE_DEBUG" = xyes; then
16664          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16665        fi
16666
16667fi
16668
16669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16670$as_echo "$DEBUG_LEVEL" >&6; }
16671
16672  if test "x$DEBUG_LEVEL" != xrelease && \
16673      test "x$DEBUG_LEVEL" != xoptimized && \
16674      test "x$DEBUG_LEVEL" != xfastdebug && \
16675      test "x$DEBUG_LEVEL" != xslowdebug; then
16676    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16677  fi
16678
16679  # Translate DEBUG_LEVEL to debug level used by Hotspot
16680  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16681  if test "x$DEBUG_LEVEL" = xrelease; then
16682    HOTSPOT_DEBUG_LEVEL="product"
16683  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16684    HOTSPOT_DEBUG_LEVEL="debug"
16685  fi
16686
16687  if test "x$DEBUG_LEVEL" = xoptimized; then
16688    # The debug level 'optimized' is a little special because it is currently only
16689    # applicable to the HotSpot build where it means to build a completely
16690    # optimized version of the VM without any debugging code (like for the
16691    # 'release' debug level which is called 'product' in the HotSpot build) but
16692    # with the exception that it can contain additional code which is otherwise
16693    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16694    # test new and/or experimental features which are not intended for customer
16695    # shipment. Because these new features need to be tested and benchmarked in
16696    # real world scenarios, we want to build the containing JDK at the 'release'
16697    # debug level.
16698    DEBUG_LEVEL="release"
16699  fi
16700
16701
16702
16703
16704
16705
16706# Check whether --with-jvm-variants was given.
16707if test "${with_jvm_variants+set}" = set; then :
16708  withval=$with_jvm_variants;
16709fi
16710
16711
16712  if test "x$with_jvm_variants" = x; then
16713    with_jvm_variants="server"
16714  fi
16715  JVM_VARIANTS_OPT="$with_jvm_variants"
16716
16717  # Has the user listed more than one variant?
16718  # Additional [] needed to keep m4 from mangling shell constructs.
16719  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16720    BUILDING_MULTIPLE_JVM_VARIANTS=true
16721  else
16722    BUILDING_MULTIPLE_JVM_VARIANTS=false
16723  fi
16724  # Replace the commas with AND for use in the build directory name.
16725  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16726
16727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16728$as_echo_n "checking which variants of the JVM to build... " >&6; }
16729  # JVM_VARIANTS is a space-separated list.
16730  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16731  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16733$as_echo "$JVM_VARIANTS" >&6; }
16734
16735  # Check that the selected variants are valid
16736
16737  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16738  # Notice that the original variant failes on SLES 10 and 11
16739  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16740  STACK=${JVM_VARIANTS// /$'\n'}
16741  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16742  if test "x$INVALID_VARIANTS" != x; then
16743    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16744$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16745    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16746  fi
16747
16748  # All "special" variants share the same output directory ("server")
16749  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16750  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16751  STACK=${JVM_VARIANTS// /$'\n'}
16752  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16753  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16754    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16755  fi
16756
16757
16758
16759
16760  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16761    # zero behaves as a platform and rewrites these values. This is really weird. :(
16762    # We are guaranteed that we do not build any other variants when building zero.
16763    HOTSPOT_TARGET_CPU=zero
16764    HOTSPOT_TARGET_CPU_ARCH=zero
16765  fi
16766
16767
16768# With basic setup done, call the custom early hook.
16769
16770
16771# Check if we have devkits, extra paths or sysroot set.
16772
16773
16774# Check whether --with-devkit was given.
16775if test "${with_devkit+set}" = set; then :
16776  withval=$with_devkit;
16777
16778  # Only process if variable expands to non-empty
16779
16780  if test "x$with_devkit" != x; then
16781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16782
16783  # Input might be given as Windows format, start by converting to
16784  # unix format.
16785  path="$with_devkit"
16786  new_path=`$CYGPATH -u "$path"`
16787
16788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16791  # "foo.exe" is OK but "foo" is an error.
16792  #
16793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16794  # It is also a way to make sure we got the proper file name for the real test later on.
16795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16796  if test "x$test_shortpath" = x; then
16797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16798$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16799    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16800  fi
16801
16802  # Call helper function which possibly converts this using DOS-style short mode.
16803  # If so, the updated path is stored in $new_path.
16804
16805  input_path="$new_path"
16806  # Check if we need to convert this using DOS-style short mode. If the path
16807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16808  # take no chances and rewrite it.
16809  # Note: m4 eats our [], so we need to use [ and ] instead.
16810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16811  if test "x$has_forbidden_chars" != x; then
16812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16816      # Going to short mode and back again did indeed matter. Since short mode is
16817      # case insensitive, let's make it lowercase to improve readability.
16818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16819      # Now convert it back to Unix-style (cygpath)
16820      input_path=`$CYGPATH -u "$shortmode_path"`
16821      new_path="$input_path"
16822    fi
16823  fi
16824
16825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16826  if test "x$test_cygdrive_prefix" = x; then
16827    # As a simple fix, exclude /usr/bin since it's not a real path.
16828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16830      # a path prefixed by /cygdrive for fixpath to work.
16831      new_path="$CYGWIN_ROOT_PATH$input_path"
16832    fi
16833  fi
16834
16835
16836  if test "x$path" != "x$new_path"; then
16837    with_devkit="$new_path"
16838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16839$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16840  fi
16841
16842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16843
16844  path="$with_devkit"
16845  has_colon=`$ECHO $path | $GREP ^.:`
16846  new_path="$path"
16847  if test "x$has_colon" = x; then
16848    # Not in mixed or Windows style, start by that.
16849    new_path=`cmd //c echo $path`
16850  fi
16851
16852
16853  input_path="$new_path"
16854  # Check if we need to convert this using DOS-style short mode. If the path
16855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16856  # take no chances and rewrite it.
16857  # Note: m4 eats our [], so we need to use [ and ] instead.
16858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16859  if test "x$has_forbidden_chars" != x; then
16860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16862  fi
16863
16864
16865  windows_path="$new_path"
16866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867    unix_path=`$CYGPATH -u "$windows_path"`
16868    new_path="$unix_path"
16869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16871    new_path="$unix_path"
16872  fi
16873
16874  if test "x$path" != "x$new_path"; then
16875    with_devkit="$new_path"
16876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16877$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16878  fi
16879
16880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16882
16883    else
16884      # We're on a unix platform. Hooray! :)
16885      path="$with_devkit"
16886      has_space=`$ECHO "$path" | $GREP " "`
16887      if test "x$has_space" != x; then
16888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16889$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16890        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16891      fi
16892
16893      # Use eval to expand a potential ~
16894      eval path="$path"
16895      if test ! -f "$path" && test ! -d "$path"; then
16896        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16897      fi
16898
16899      if test -d "$path"; then
16900        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16901      else
16902        dir="`$DIRNAME "$path"`"
16903        base="`$BASENAME "$path"`"
16904        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16905      fi
16906    fi
16907  fi
16908
16909        DEVKIT_ROOT="$with_devkit"
16910        # Check for a meta data info file in the root of the devkit
16911        if test -f "$DEVKIT_ROOT/devkit.info"; then
16912          . $DEVKIT_ROOT/devkit.info
16913          # This potentially sets the following:
16914          # A descriptive name of the devkit
16915
16916  if test "x$DEVKIT_NAME" = x; then
16917    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16918  fi
16919
16920          # Corresponds to --with-extra-path
16921
16922  if test "x$DEVKIT_EXTRA_PATH" = x; then
16923    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16924  fi
16925
16926          # Corresponds to --with-toolchain-path
16927
16928  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16929    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16930  fi
16931
16932          # Corresponds to --with-sysroot
16933
16934  if test "x$DEVKIT_SYSROOT" = x; then
16935    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16936  fi
16937
16938
16939          # Identifies the Visual Studio version in the devkit
16940
16941  if test "x$DEVKIT_VS_VERSION" = x; then
16942    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16943  fi
16944
16945          # The Visual Studio include environment variable
16946
16947  if test "x$DEVKIT_VS_INCLUDE" = x; then
16948    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16949  fi
16950
16951          # The Visual Studio lib environment variable
16952
16953  if test "x$DEVKIT_VS_LIB" = x; then
16954    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16955  fi
16956
16957          # Corresponds to --with-msvcr-dll
16958
16959  if test "x$DEVKIT_MSVCR_DLL" = x; then
16960    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16961  fi
16962
16963          # Corresponds to --with-msvcp-dll
16964
16965  if test "x$DEVKIT_MSVCP_DLL" = x; then
16966    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16967  fi
16968
16969        fi
16970
16971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16972$as_echo_n "checking for devkit... " >&6; }
16973        if test "x$DEVKIT_NAME" != x; then
16974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16975$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16976        else
16977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16978$as_echo "$DEVKIT_ROOT" >&6; }
16979        fi
16980
16981
16982  if test "x$DEVKIT_EXTRA_PATH" != x; then
16983    if test "x$EXTRA_PATH" = x; then
16984      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16985    else
16986      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16987    fi
16988  fi
16989
16990
16991        # Fallback default of just /bin if DEVKIT_PATH is not defined
16992        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16993          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16994        fi
16995
16996  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16997    if test "x$TOOLCHAIN_PATH" = x; then
16998      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16999    else
17000      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17001    fi
17002  fi
17003
17004
17005        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17006        # places for backwards compatiblity.
17007        if test "x$DEVKIT_SYSROOT" != x; then
17008          SYSROOT="$DEVKIT_SYSROOT"
17009        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17010          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17011        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17012          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17013        fi
17014
17015
17016fi
17017
17018
17019  # You can force the sysroot if the sysroot encoded into the compiler tools
17020  # is not correct.
17021
17022# Check whether --with-sys-root was given.
17023if test "${with_sys_root+set}" = set; then :
17024  withval=$with_sys_root; SYSROOT=$with_sys_root
17025
17026fi
17027
17028
17029
17030# Check whether --with-sysroot was given.
17031if test "${with_sysroot+set}" = set; then :
17032  withval=$with_sysroot; SYSROOT=$with_sysroot
17033
17034fi
17035
17036
17037
17038# Check whether --with-tools-dir was given.
17039if test "${with_tools_dir+set}" = set; then :
17040  withval=$with_tools_dir;
17041  if test "x$with_tools_dir" != x; then
17042    if test "x$TOOLCHAIN_PATH" = x; then
17043      TOOLCHAIN_PATH="$with_tools_dir"
17044    else
17045      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17046    fi
17047  fi
17048
17049
17050fi
17051
17052
17053
17054# Check whether --with-toolchain-path was given.
17055if test "${with_toolchain_path+set}" = set; then :
17056  withval=$with_toolchain_path;
17057  if test "x$with_toolchain_path" != x; then
17058    if test "x$TOOLCHAIN_PATH" = x; then
17059      TOOLCHAIN_PATH="$with_toolchain_path"
17060    else
17061      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17062    fi
17063  fi
17064
17065
17066fi
17067
17068
17069
17070# Check whether --with-extra-path was given.
17071if test "${with_extra_path+set}" = set; then :
17072  withval=$with_extra_path;
17073  if test "x$with_extra_path" != x; then
17074    if test "x$EXTRA_PATH" = x; then
17075      EXTRA_PATH="$with_extra_path"
17076    else
17077      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17078    fi
17079  fi
17080
17081
17082fi
17083
17084
17085  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17086    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17087    # If not, detect if Xcode is installed by running xcodebuild -version
17088    # if no Xcode installed, xcodebuild exits with 1
17089    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17090    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17091      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17092      # fall back on the stub binary in /usr/bin/xcodebuild
17093      # Extract the first word of "xcodebuild", so it can be a program name with args.
17094set dummy xcodebuild; ac_word=$2
17095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17096$as_echo_n "checking for $ac_word... " >&6; }
17097if ${ac_cv_path_XCODEBUILD+:} false; then :
17098  $as_echo_n "(cached) " >&6
17099else
17100  case $XCODEBUILD in
17101  [\\/]* | ?:[\\/]*)
17102  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17103  ;;
17104  *)
17105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17106for as_dir in $TOOLCHAIN_PATH
17107do
17108  IFS=$as_save_IFS
17109  test -z "$as_dir" && as_dir=.
17110    for ac_exec_ext in '' $ac_executable_extensions; do
17111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17112    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17114    break 2
17115  fi
17116done
17117  done
17118IFS=$as_save_IFS
17119
17120  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17121  ;;
17122esac
17123fi
17124XCODEBUILD=$ac_cv_path_XCODEBUILD
17125if test -n "$XCODEBUILD"; then
17126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17127$as_echo "$XCODEBUILD" >&6; }
17128else
17129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17130$as_echo "no" >&6; }
17131fi
17132
17133
17134    else
17135      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17136      # when only the command line tools are installed there are no SDKs, so headers
17137      # are copied into the system frameworks
17138      XCODEBUILD=
17139
17140    fi
17141
17142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17143$as_echo_n "checking for sdk name... " >&6; }
17144
17145# Check whether --with-sdk-name was given.
17146if test "${with_sdk_name+set}" = set; then :
17147  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17148
17149fi
17150
17151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17152$as_echo "$SDKNAME" >&6; }
17153
17154    # if toolchain path is specified then don't rely on system headers, they may not compile
17155    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17156    test -z "$TOOLCHAIN_PATH" && \
17157      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17158
17159    if test -z "$SYSROOT"; then
17160      if test -n "$XCODEBUILD"; then
17161        # if we don't have system headers, use default SDK name (last resort)
17162        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17163          SDKNAME=${SDKNAME:-macosx}
17164        fi
17165
17166        if test -n "$SDKNAME"; then
17167          # Call xcodebuild to determine SYSROOT
17168          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
17169        fi
17170      else
17171        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17172          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
17173        fi
17174      fi
17175    else
17176      # warn user if --with-sdk-name was also set
17177      if test -n "$with_sdk_name"; then
17178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17179$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17180      fi
17181    fi
17182
17183    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17184      # If no system framework headers, then SYSROOT must be set, or we won't build
17185      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
17186    fi
17187
17188    # Perform a basic sanity test
17189    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17190      if test -z "$SYSROOT"; then
17191        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
17192      else
17193        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17194      fi
17195    fi
17196
17197    # set SDKROOT too, Xcode tools will pick it up
17198    SDKROOT=$SYSROOT
17199
17200  fi
17201
17202  # Prepend the extra path to the global path
17203
17204  if test "x$EXTRA_PATH" != x; then
17205    if test "x$PATH" = x; then
17206      PATH="$EXTRA_PATH"
17207    else
17208      PATH="$EXTRA_PATH:$PATH"
17209    fi
17210  fi
17211
17212
17213  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
17214    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
17215    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
17216  fi
17217
17218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17219$as_echo_n "checking for sysroot... " >&6; }
17220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17221$as_echo "$SYSROOT" >&6; }
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17223$as_echo_n "checking for toolchain path... " >&6; }
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17225$as_echo "$TOOLCHAIN_PATH" >&6; }
17226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17227$as_echo_n "checking for extra path... " >&6; }
17228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17229$as_echo "$EXTRA_PATH" >&6; }
17230
17231
17232# To properly create a configuration name, we need to have the OpenJDK target
17233# and options (variants and debug level) parsed.
17234
17235
17236
17237# Check whether --with-conf-name was given.
17238if test "${with_conf_name+set}" = set; then :
17239  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17240fi
17241
17242
17243  # Test from where we are running configure, in or outside of src root.
17244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17245$as_echo_n "checking where to store configuration... " >&6; }
17246  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17247      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17248      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17249    # We are running configure from the src root.
17250    # Create a default ./build/target-variant-debuglevel output root.
17251    if test "x${CONF_NAME}" = x; then
17252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17253$as_echo "in default location" >&6; }
17254      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17255    else
17256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17257$as_echo "in build directory with custom name" >&6; }
17258    fi
17259    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17260    $MKDIR -p "$OUTPUT_ROOT"
17261    if test ! -d "$OUTPUT_ROOT"; then
17262      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17263    fi
17264  else
17265    # We are running configure from outside of the src dir.
17266    # Then use the current directory as output dir!
17267    # If configuration is situated in normal build directory, just use the build
17268    # directory name as configuration name, otherwise use the complete path.
17269    if test "x${CONF_NAME}" = x; then
17270      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17271    fi
17272    OUTPUT_ROOT="$CURDIR"
17273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17274$as_echo "in current directory" >&6; }
17275
17276    # WARNING: This might be a bad thing to do. You need to be sure you want to
17277    # have a configuration in this directory. Do some sanity checks!
17278
17279    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17280      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17281      # other files
17282      files_present=`$LS $OUTPUT_ROOT`
17283      # Configure has already touched config.log and confdefs.h in the current dir when this check
17284      # is performed.
17285      filtered_files=`$ECHO "$files_present" \
17286          | $SED -e 's/config.log//g' \
17287              -e 's/configure.log//g' \
17288              -e 's/confdefs.h//g' \
17289              -e 's/ //g' \
17290          | $TR -d '\n'`
17291      if test "x$filtered_files" != x; then
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17293$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17295$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17297$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17299$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17301$as_echo "$as_me: seriously mess up just about everything." >&6;}
17302        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17303$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17304        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17305$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17306        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17307      fi
17308    fi
17309  fi
17310  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17311$as_echo_n "checking what configuration name to use... " >&6; }
17312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17313$as_echo "$CONF_NAME" >&6; }
17314
17315
17316  # Only process if variable expands to non-empty
17317
17318  if test "x$OUTPUT_ROOT" != x; then
17319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17320
17321  # Input might be given as Windows format, start by converting to
17322  # unix format.
17323  path="$OUTPUT_ROOT"
17324  new_path=`$CYGPATH -u "$path"`
17325
17326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17329  # "foo.exe" is OK but "foo" is an error.
17330  #
17331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17332  # It is also a way to make sure we got the proper file name for the real test later on.
17333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17334  if test "x$test_shortpath" = x; then
17335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17336$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17337    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17338  fi
17339
17340  # Call helper function which possibly converts this using DOS-style short mode.
17341  # If so, the updated path is stored in $new_path.
17342
17343  input_path="$new_path"
17344  # Check if we need to convert this using DOS-style short mode. If the path
17345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17346  # take no chances and rewrite it.
17347  # Note: m4 eats our [], so we need to use [ and ] instead.
17348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17349  if test "x$has_forbidden_chars" != x; then
17350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17354      # Going to short mode and back again did indeed matter. Since short mode is
17355      # case insensitive, let's make it lowercase to improve readability.
17356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17357      # Now convert it back to Unix-style (cygpath)
17358      input_path=`$CYGPATH -u "$shortmode_path"`
17359      new_path="$input_path"
17360    fi
17361  fi
17362
17363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17364  if test "x$test_cygdrive_prefix" = x; then
17365    # As a simple fix, exclude /usr/bin since it's not a real path.
17366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17368      # a path prefixed by /cygdrive for fixpath to work.
17369      new_path="$CYGWIN_ROOT_PATH$input_path"
17370    fi
17371  fi
17372
17373
17374  if test "x$path" != "x$new_path"; then
17375    OUTPUT_ROOT="$new_path"
17376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17377$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17378  fi
17379
17380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17381
17382  path="$OUTPUT_ROOT"
17383  has_colon=`$ECHO $path | $GREP ^.:`
17384  new_path="$path"
17385  if test "x$has_colon" = x; then
17386    # Not in mixed or Windows style, start by that.
17387    new_path=`cmd //c echo $path`
17388  fi
17389
17390
17391  input_path="$new_path"
17392  # Check if we need to convert this using DOS-style short mode. If the path
17393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17394  # take no chances and rewrite it.
17395  # Note: m4 eats our [], so we need to use [ and ] instead.
17396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17397  if test "x$has_forbidden_chars" != x; then
17398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17400  fi
17401
17402
17403  windows_path="$new_path"
17404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17405    unix_path=`$CYGPATH -u "$windows_path"`
17406    new_path="$unix_path"
17407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17409    new_path="$unix_path"
17410  fi
17411
17412  if test "x$path" != "x$new_path"; then
17413    OUTPUT_ROOT="$new_path"
17414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17415$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17416  fi
17417
17418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17420
17421    else
17422      # We're on a unix platform. Hooray! :)
17423      path="$OUTPUT_ROOT"
17424      has_space=`$ECHO "$path" | $GREP " "`
17425      if test "x$has_space" != x; then
17426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17427$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17429      fi
17430
17431      # Use eval to expand a potential ~
17432      eval path="$path"
17433      if test ! -f "$path" && test ! -d "$path"; then
17434        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17435      fi
17436
17437      if test -d "$path"; then
17438        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17439      else
17440        dir="`$DIRNAME "$path"`"
17441        base="`$BASENAME "$path"`"
17442        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17443      fi
17444    fi
17445  fi
17446
17447
17448  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17449  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17450
17451  SPEC=$OUTPUT_ROOT/spec.gmk
17452
17453  CONF_NAME=$CONF_NAME
17454
17455  OUTPUT_ROOT=$OUTPUT_ROOT
17456
17457
17458
17459  # The spec.gmk file contains all variables for the make system.
17460  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17461
17462  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17463  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17464
17465  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17466  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17467
17468  # The compare.sh is used to compare the build output to other builds.
17469  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17470
17471  # The generated Makefile knows where the spec.gmk is and where the source is.
17472  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17473  # which will look for generated configurations
17474  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17475
17476
17477
17478# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17479
17480  for ac_prog in apt-get yum port pkgutil pkgadd
17481do
17482  # Extract the first word of "$ac_prog", so it can be a program name with args.
17483set dummy $ac_prog; ac_word=$2
17484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17485$as_echo_n "checking for $ac_word... " >&6; }
17486if ${ac_cv_prog_PKGHANDLER+:} false; then :
17487  $as_echo_n "(cached) " >&6
17488else
17489  if test -n "$PKGHANDLER"; then
17490  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17491else
17492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17493for as_dir in $PATH
17494do
17495  IFS=$as_save_IFS
17496  test -z "$as_dir" && as_dir=.
17497    for ac_exec_ext in '' $ac_executable_extensions; do
17498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17499    ac_cv_prog_PKGHANDLER="$ac_prog"
17500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17501    break 2
17502  fi
17503done
17504  done
17505IFS=$as_save_IFS
17506
17507fi
17508fi
17509PKGHANDLER=$ac_cv_prog_PKGHANDLER
17510if test -n "$PKGHANDLER"; then
17511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17512$as_echo "$PKGHANDLER" >&6; }
17513else
17514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17515$as_echo "no" >&6; }
17516fi
17517
17518
17519  test -n "$PKGHANDLER" && break
17520done
17521
17522
17523
17524# Setup tools that requires more complex handling, or that is not needed by the configure script.
17525
17526
17527
17528  # Publish this variable in the help.
17529
17530
17531  if [ -z "${MAKE+x}" ]; then
17532    # The variable is not set by user, try to locate tool using the code snippet
17533
17534    # Try our hardest to locate a correct version of GNU make
17535    for ac_prog in gmake
17536do
17537  # Extract the first word of "$ac_prog", so it can be a program name with args.
17538set dummy $ac_prog; ac_word=$2
17539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17540$as_echo_n "checking for $ac_word... " >&6; }
17541if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17542  $as_echo_n "(cached) " >&6
17543else
17544  case $CHECK_GMAKE in
17545  [\\/]* | ?:[\\/]*)
17546  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17547  ;;
17548  *)
17549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17550for as_dir in $PATH
17551do
17552  IFS=$as_save_IFS
17553  test -z "$as_dir" && as_dir=.
17554    for ac_exec_ext in '' $ac_executable_extensions; do
17555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17556    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17558    break 2
17559  fi
17560done
17561  done
17562IFS=$as_save_IFS
17563
17564  ;;
17565esac
17566fi
17567CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17568if test -n "$CHECK_GMAKE"; then
17569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17570$as_echo "$CHECK_GMAKE" >&6; }
17571else
17572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17573$as_echo "no" >&6; }
17574fi
17575
17576
17577  test -n "$CHECK_GMAKE" && break
17578done
17579
17580
17581  MAKE_CANDIDATE=""$CHECK_GMAKE""
17582  DESCRIPTION="gmake in PATH"
17583
17584  # On Cygwin, we require a newer version of make than on other platforms
17585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17586    MAKE_VERSION_EXPR="-e 4\."
17587    MAKE_REQUIRED_VERSION="4.0"
17588   else
17589    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17590    MAKE_REQUIRED_VERSION="3.81"
17591  fi
17592
17593  if test "x$MAKE_CANDIDATE" != x; then
17594    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17595$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17596    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17597    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17598    if test "x$IS_GNU_MAKE" = x; then
17599      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17600$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17601    else
17602      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17603      if test "x$IS_MODERN_MAKE" = x; then
17604        { $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
17605$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;}
17606      else
17607        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17608          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17609            MAKE_EXPECTED_ENV='cygwin'
17610          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17611            MAKE_EXPECTED_ENV='msys'
17612          else
17613            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17614          fi
17615          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17616          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17617        else
17618          # Not relevant for non-Windows
17619          IS_MAKE_CORRECT_ENV=true
17620        fi
17621        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17622          { $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
17623$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;}
17624        else
17625          FOUND_MAKE=$MAKE_CANDIDATE
17626
17627  # Only process if variable expands to non-empty
17628
17629  if test "x$FOUND_MAKE" != x; then
17630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17631
17632  # First separate the path from the arguments. This will split at the first
17633  # space.
17634  complete="$FOUND_MAKE"
17635  path="${complete%% *}"
17636  tmp="$complete EOL"
17637  arguments="${tmp#* }"
17638
17639  # Input might be given as Windows format, start by converting to
17640  # unix format.
17641  new_path=`$CYGPATH -u "$path"`
17642
17643  # Now try to locate executable using which
17644  new_path=`$WHICH "$new_path" 2> /dev/null`
17645  # bat and cmd files are not always considered executable in cygwin causing which
17646  # to not find them
17647  if test "x$new_path" = x \
17648      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17649      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17650    new_path=`$CYGPATH -u "$path"`
17651  fi
17652  if test "x$new_path" = x; then
17653    # Oops. Which didn't find the executable.
17654    # The splitting of arguments from the executable at a space might have been incorrect,
17655    # since paths with space are more likely in Windows. Give it another try with the whole
17656    # argument.
17657    path="$complete"
17658    arguments="EOL"
17659    new_path=`$CYGPATH -u "$path"`
17660    new_path=`$WHICH "$new_path" 2> /dev/null`
17661    # bat and cmd files are not always considered executable in cygwin causing which
17662    # to not find them
17663    if test "x$new_path" = x \
17664        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17665        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17666      new_path=`$CYGPATH -u "$path"`
17667    fi
17668    if test "x$new_path" = x; then
17669      # It's still not found. Now this is an unrecoverable error.
17670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17671$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17672      has_space=`$ECHO "$complete" | $GREP " "`
17673      if test "x$has_space" != x; then
17674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17676      fi
17677      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17678    fi
17679  fi
17680
17681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17684  # "foo.exe" is OK but "foo" is an error.
17685  #
17686  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17687  # It is also a way to make sure we got the proper file name for the real test later on.
17688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17689  if test "x$test_shortpath" = x; then
17690    # Short path failed, file does not exist as specified.
17691    # Try adding .exe or .cmd
17692    if test -f "${new_path}.exe"; then
17693      input_to_shortpath="${new_path}.exe"
17694    elif test -f "${new_path}.cmd"; then
17695      input_to_shortpath="${new_path}.cmd"
17696    else
17697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17698$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17699      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17700$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17701      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17702    fi
17703  else
17704    input_to_shortpath="$new_path"
17705  fi
17706
17707  # Call helper function which possibly converts this using DOS-style short mode.
17708  # If so, the updated path is stored in $new_path.
17709  new_path="$input_to_shortpath"
17710
17711  input_path="$input_to_shortpath"
17712  # Check if we need to convert this using DOS-style short mode. If the path
17713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17714  # take no chances and rewrite it.
17715  # Note: m4 eats our [], so we need to use [ and ] instead.
17716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17717  if test "x$has_forbidden_chars" != x; then
17718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17722      # Going to short mode and back again did indeed matter. Since short mode is
17723      # case insensitive, let's make it lowercase to improve readability.
17724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17725      # Now convert it back to Unix-style (cygpath)
17726      input_path=`$CYGPATH -u "$shortmode_path"`
17727      new_path="$input_path"
17728    fi
17729  fi
17730
17731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17732  if test "x$test_cygdrive_prefix" = x; then
17733    # As a simple fix, exclude /usr/bin since it's not a real path.
17734    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17736      # a path prefixed by /cygdrive for fixpath to work.
17737      new_path="$CYGWIN_ROOT_PATH$input_path"
17738    fi
17739  fi
17740
17741  # remove trailing .exe if any
17742  new_path="${new_path/%.exe/}"
17743
17744    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17745
17746  # First separate the path from the arguments. This will split at the first
17747  # space.
17748  complete="$FOUND_MAKE"
17749  path="${complete%% *}"
17750  tmp="$complete EOL"
17751  arguments="${tmp#* }"
17752
17753  # Input might be given as Windows format, start by converting to
17754  # unix format.
17755  new_path="$path"
17756
17757  windows_path="$new_path"
17758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17759    unix_path=`$CYGPATH -u "$windows_path"`
17760    new_path="$unix_path"
17761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17763    new_path="$unix_path"
17764  fi
17765
17766
17767  # Now try to locate executable using which
17768  new_path=`$WHICH "$new_path" 2> /dev/null`
17769
17770  if test "x$new_path" = x; then
17771    # Oops. Which didn't find the executable.
17772    # The splitting of arguments from the executable at a space might have been incorrect,
17773    # since paths with space are more likely in Windows. Give it another try with the whole
17774    # argument.
17775    path="$complete"
17776    arguments="EOL"
17777    new_path="$path"
17778
17779  windows_path="$new_path"
17780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17781    unix_path=`$CYGPATH -u "$windows_path"`
17782    new_path="$unix_path"
17783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17785    new_path="$unix_path"
17786  fi
17787
17788
17789    new_path=`$WHICH "$new_path" 2> /dev/null`
17790    # bat and cmd files are not always considered executable in MSYS causing which
17791    # to not find them
17792    if test "x$new_path" = x \
17793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17795      new_path="$path"
17796
17797  windows_path="$new_path"
17798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17799    unix_path=`$CYGPATH -u "$windows_path"`
17800    new_path="$unix_path"
17801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17803    new_path="$unix_path"
17804  fi
17805
17806    fi
17807
17808    if test "x$new_path" = x; then
17809      # It's still not found. Now this is an unrecoverable error.
17810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17811$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17812      has_space=`$ECHO "$complete" | $GREP " "`
17813      if test "x$has_space" != x; then
17814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17816      fi
17817      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17818    fi
17819  fi
17820
17821  # Now new_path has a complete unix path to the binary
17822  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17823    # Keep paths in /bin as-is, but remove trailing .exe if any
17824    new_path="${new_path/%.exe/}"
17825    # Do not save /bin paths to all_fixpath_prefixes!
17826  else
17827    # Not in mixed or Windows style, start by that.
17828    new_path=`cmd //c echo $new_path`
17829
17830  input_path="$new_path"
17831  # Check if we need to convert this using DOS-style short mode. If the path
17832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17833  # take no chances and rewrite it.
17834  # Note: m4 eats our [], so we need to use [ and ] instead.
17835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17836  if test "x$has_forbidden_chars" != x; then
17837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17839  fi
17840
17841    # Output is in $new_path
17842
17843  windows_path="$new_path"
17844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17845    unix_path=`$CYGPATH -u "$windows_path"`
17846    new_path="$unix_path"
17847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17849    new_path="$unix_path"
17850  fi
17851
17852    # remove trailing .exe if any
17853    new_path="${new_path/%.exe/}"
17854
17855    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17856    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17857  fi
17858
17859    else
17860      # We're on a unix platform. Hooray! :)
17861      # First separate the path from the arguments. This will split at the first
17862      # space.
17863      complete="$FOUND_MAKE"
17864      path="${complete%% *}"
17865      tmp="$complete EOL"
17866      arguments="${tmp#* }"
17867
17868      # Cannot rely on the command "which" here since it doesn't always work.
17869      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17870      if test -z "$is_absolute_path"; then
17871        # Path to executable is not absolute. Find it.
17872        IFS_save="$IFS"
17873        IFS=:
17874        for p in $PATH; do
17875          if test -f "$p/$path" && test -x "$p/$path"; then
17876            new_path="$p/$path"
17877            break
17878          fi
17879        done
17880        IFS="$IFS_save"
17881      else
17882        # This is an absolute path, we can use it without further modifications.
17883        new_path="$path"
17884      fi
17885
17886      if test "x$new_path" = x; then
17887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17888$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17889        has_space=`$ECHO "$complete" | $GREP " "`
17890        if test "x$has_space" != x; then
17891          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17892$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17893        fi
17894        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17895      fi
17896    fi
17897
17898    # Now join together the path and the arguments once again
17899    if test "x$arguments" != xEOL; then
17900      new_complete="$new_path ${arguments% *}"
17901    else
17902      new_complete="$new_path"
17903    fi
17904
17905    if test "x$complete" != "x$new_complete"; then
17906      FOUND_MAKE="$new_complete"
17907      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17908$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17909    fi
17910  fi
17911
17912        fi
17913      fi
17914    fi
17915  fi
17916
17917
17918    if test "x$FOUND_MAKE" = x; then
17919      for ac_prog in make
17920do
17921  # Extract the first word of "$ac_prog", so it can be a program name with args.
17922set dummy $ac_prog; ac_word=$2
17923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17924$as_echo_n "checking for $ac_word... " >&6; }
17925if ${ac_cv_path_CHECK_MAKE+:} false; then :
17926  $as_echo_n "(cached) " >&6
17927else
17928  case $CHECK_MAKE in
17929  [\\/]* | ?:[\\/]*)
17930  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17931  ;;
17932  *)
17933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17934for as_dir in $PATH
17935do
17936  IFS=$as_save_IFS
17937  test -z "$as_dir" && as_dir=.
17938    for ac_exec_ext in '' $ac_executable_extensions; do
17939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17940    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17942    break 2
17943  fi
17944done
17945  done
17946IFS=$as_save_IFS
17947
17948  ;;
17949esac
17950fi
17951CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17952if test -n "$CHECK_MAKE"; then
17953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17954$as_echo "$CHECK_MAKE" >&6; }
17955else
17956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17957$as_echo "no" >&6; }
17958fi
17959
17960
17961  test -n "$CHECK_MAKE" && break
17962done
17963
17964
17965  MAKE_CANDIDATE=""$CHECK_MAKE""
17966  DESCRIPTION="make in PATH"
17967
17968  # On Cygwin, we require a newer version of make than on other platforms
17969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17970    MAKE_VERSION_EXPR="-e 4\."
17971    MAKE_REQUIRED_VERSION="4.0"
17972   else
17973    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17974    MAKE_REQUIRED_VERSION="3.81"
17975  fi
17976
17977  if test "x$MAKE_CANDIDATE" != x; then
17978    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17979$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17980    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17981    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17982    if test "x$IS_GNU_MAKE" = x; then
17983      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17984$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17985    else
17986      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17987      if test "x$IS_MODERN_MAKE" = x; then
17988        { $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
17989$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;}
17990      else
17991        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17992          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17993            MAKE_EXPECTED_ENV='cygwin'
17994          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17995            MAKE_EXPECTED_ENV='msys'
17996          else
17997            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17998          fi
17999          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18000          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18001        else
18002          # Not relevant for non-Windows
18003          IS_MAKE_CORRECT_ENV=true
18004        fi
18005        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18006          { $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
18007$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;}
18008        else
18009          FOUND_MAKE=$MAKE_CANDIDATE
18010
18011  # Only process if variable expands to non-empty
18012
18013  if test "x$FOUND_MAKE" != x; then
18014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18015
18016  # First separate the path from the arguments. This will split at the first
18017  # space.
18018  complete="$FOUND_MAKE"
18019  path="${complete%% *}"
18020  tmp="$complete EOL"
18021  arguments="${tmp#* }"
18022
18023  # Input might be given as Windows format, start by converting to
18024  # unix format.
18025  new_path=`$CYGPATH -u "$path"`
18026
18027  # Now try to locate executable using which
18028  new_path=`$WHICH "$new_path" 2> /dev/null`
18029  # bat and cmd files are not always considered executable in cygwin causing which
18030  # to not find them
18031  if test "x$new_path" = x \
18032      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18033      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18034    new_path=`$CYGPATH -u "$path"`
18035  fi
18036  if test "x$new_path" = x; then
18037    # Oops. Which didn't find the executable.
18038    # The splitting of arguments from the executable at a space might have been incorrect,
18039    # since paths with space are more likely in Windows. Give it another try with the whole
18040    # argument.
18041    path="$complete"
18042    arguments="EOL"
18043    new_path=`$CYGPATH -u "$path"`
18044    new_path=`$WHICH "$new_path" 2> /dev/null`
18045    # bat and cmd files are not always considered executable in cygwin causing which
18046    # to not find them
18047    if test "x$new_path" = x \
18048        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18049        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18050      new_path=`$CYGPATH -u "$path"`
18051    fi
18052    if test "x$new_path" = x; then
18053      # It's still not found. Now this is an unrecoverable error.
18054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18055$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18056      has_space=`$ECHO "$complete" | $GREP " "`
18057      if test "x$has_space" != x; then
18058        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18060      fi
18061      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18062    fi
18063  fi
18064
18065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18068  # "foo.exe" is OK but "foo" is an error.
18069  #
18070  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18071  # It is also a way to make sure we got the proper file name for the real test later on.
18072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18073  if test "x$test_shortpath" = x; then
18074    # Short path failed, file does not exist as specified.
18075    # Try adding .exe or .cmd
18076    if test -f "${new_path}.exe"; then
18077      input_to_shortpath="${new_path}.exe"
18078    elif test -f "${new_path}.cmd"; then
18079      input_to_shortpath="${new_path}.cmd"
18080    else
18081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18082$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18083      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18084$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18085      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18086    fi
18087  else
18088    input_to_shortpath="$new_path"
18089  fi
18090
18091  # Call helper function which possibly converts this using DOS-style short mode.
18092  # If so, the updated path is stored in $new_path.
18093  new_path="$input_to_shortpath"
18094
18095  input_path="$input_to_shortpath"
18096  # Check if we need to convert this using DOS-style short mode. If the path
18097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18098  # take no chances and rewrite it.
18099  # Note: m4 eats our [], so we need to use [ and ] instead.
18100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18101  if test "x$has_forbidden_chars" != x; then
18102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18106      # Going to short mode and back again did indeed matter. Since short mode is
18107      # case insensitive, let's make it lowercase to improve readability.
18108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18109      # Now convert it back to Unix-style (cygpath)
18110      input_path=`$CYGPATH -u "$shortmode_path"`
18111      new_path="$input_path"
18112    fi
18113  fi
18114
18115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18116  if test "x$test_cygdrive_prefix" = x; then
18117    # As a simple fix, exclude /usr/bin since it's not a real path.
18118    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18120      # a path prefixed by /cygdrive for fixpath to work.
18121      new_path="$CYGWIN_ROOT_PATH$input_path"
18122    fi
18123  fi
18124
18125  # remove trailing .exe if any
18126  new_path="${new_path/%.exe/}"
18127
18128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18129
18130  # First separate the path from the arguments. This will split at the first
18131  # space.
18132  complete="$FOUND_MAKE"
18133  path="${complete%% *}"
18134  tmp="$complete EOL"
18135  arguments="${tmp#* }"
18136
18137  # Input might be given as Windows format, start by converting to
18138  # unix format.
18139  new_path="$path"
18140
18141  windows_path="$new_path"
18142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18143    unix_path=`$CYGPATH -u "$windows_path"`
18144    new_path="$unix_path"
18145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18147    new_path="$unix_path"
18148  fi
18149
18150
18151  # Now try to locate executable using which
18152  new_path=`$WHICH "$new_path" 2> /dev/null`
18153
18154  if test "x$new_path" = x; then
18155    # Oops. Which didn't find the executable.
18156    # The splitting of arguments from the executable at a space might have been incorrect,
18157    # since paths with space are more likely in Windows. Give it another try with the whole
18158    # argument.
18159    path="$complete"
18160    arguments="EOL"
18161    new_path="$path"
18162
18163  windows_path="$new_path"
18164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18165    unix_path=`$CYGPATH -u "$windows_path"`
18166    new_path="$unix_path"
18167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18169    new_path="$unix_path"
18170  fi
18171
18172
18173    new_path=`$WHICH "$new_path" 2> /dev/null`
18174    # bat and cmd files are not always considered executable in MSYS causing which
18175    # to not find them
18176    if test "x$new_path" = x \
18177        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18178        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18179      new_path="$path"
18180
18181  windows_path="$new_path"
18182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18183    unix_path=`$CYGPATH -u "$windows_path"`
18184    new_path="$unix_path"
18185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18187    new_path="$unix_path"
18188  fi
18189
18190    fi
18191
18192    if test "x$new_path" = x; then
18193      # It's still not found. Now this is an unrecoverable error.
18194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18195$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18196      has_space=`$ECHO "$complete" | $GREP " "`
18197      if test "x$has_space" != x; then
18198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18200      fi
18201      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18202    fi
18203  fi
18204
18205  # Now new_path has a complete unix path to the binary
18206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18207    # Keep paths in /bin as-is, but remove trailing .exe if any
18208    new_path="${new_path/%.exe/}"
18209    # Do not save /bin paths to all_fixpath_prefixes!
18210  else
18211    # Not in mixed or Windows style, start by that.
18212    new_path=`cmd //c echo $new_path`
18213
18214  input_path="$new_path"
18215  # Check if we need to convert this using DOS-style short mode. If the path
18216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18217  # take no chances and rewrite it.
18218  # Note: m4 eats our [], so we need to use [ and ] instead.
18219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18220  if test "x$has_forbidden_chars" != x; then
18221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18223  fi
18224
18225    # Output is in $new_path
18226
18227  windows_path="$new_path"
18228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18229    unix_path=`$CYGPATH -u "$windows_path"`
18230    new_path="$unix_path"
18231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18233    new_path="$unix_path"
18234  fi
18235
18236    # remove trailing .exe if any
18237    new_path="${new_path/%.exe/}"
18238
18239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18241  fi
18242
18243    else
18244      # We're on a unix platform. Hooray! :)
18245      # First separate the path from the arguments. This will split at the first
18246      # space.
18247      complete="$FOUND_MAKE"
18248      path="${complete%% *}"
18249      tmp="$complete EOL"
18250      arguments="${tmp#* }"
18251
18252      # Cannot rely on the command "which" here since it doesn't always work.
18253      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18254      if test -z "$is_absolute_path"; then
18255        # Path to executable is not absolute. Find it.
18256        IFS_save="$IFS"
18257        IFS=:
18258        for p in $PATH; do
18259          if test -f "$p/$path" && test -x "$p/$path"; then
18260            new_path="$p/$path"
18261            break
18262          fi
18263        done
18264        IFS="$IFS_save"
18265      else
18266        # This is an absolute path, we can use it without further modifications.
18267        new_path="$path"
18268      fi
18269
18270      if test "x$new_path" = x; then
18271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18272$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18273        has_space=`$ECHO "$complete" | $GREP " "`
18274        if test "x$has_space" != x; then
18275          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18277        fi
18278        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18279      fi
18280    fi
18281
18282    # Now join together the path and the arguments once again
18283    if test "x$arguments" != xEOL; then
18284      new_complete="$new_path ${arguments% *}"
18285    else
18286      new_complete="$new_path"
18287    fi
18288
18289    if test "x$complete" != "x$new_complete"; then
18290      FOUND_MAKE="$new_complete"
18291      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18292$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18293    fi
18294  fi
18295
18296        fi
18297      fi
18298    fi
18299  fi
18300
18301    fi
18302
18303    if test "x$FOUND_MAKE" = x; then
18304      if test "x$TOOLCHAIN_PATH" != x; then
18305        # We have a toolchain path, check that as well before giving up.
18306        OLD_PATH=$PATH
18307        PATH=$TOOLCHAIN_PATH:$PATH
18308        for ac_prog in gmake
18309do
18310  # Extract the first word of "$ac_prog", so it can be a program name with args.
18311set dummy $ac_prog; ac_word=$2
18312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18313$as_echo_n "checking for $ac_word... " >&6; }
18314if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18315  $as_echo_n "(cached) " >&6
18316else
18317  case $CHECK_TOOLSDIR_GMAKE in
18318  [\\/]* | ?:[\\/]*)
18319  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18320  ;;
18321  *)
18322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18323for as_dir in $PATH
18324do
18325  IFS=$as_save_IFS
18326  test -z "$as_dir" && as_dir=.
18327    for ac_exec_ext in '' $ac_executable_extensions; do
18328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18329    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18331    break 2
18332  fi
18333done
18334  done
18335IFS=$as_save_IFS
18336
18337  ;;
18338esac
18339fi
18340CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18341if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18343$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18344else
18345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18346$as_echo "no" >&6; }
18347fi
18348
18349
18350  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18351done
18352
18353
18354  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18355  DESCRIPTION="gmake in tools-dir"
18356
18357  # On Cygwin, we require a newer version of make than on other platforms
18358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18359    MAKE_VERSION_EXPR="-e 4\."
18360    MAKE_REQUIRED_VERSION="4.0"
18361   else
18362    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18363    MAKE_REQUIRED_VERSION="3.81"
18364  fi
18365
18366  if test "x$MAKE_CANDIDATE" != x; then
18367    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18368$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18369    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18370    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18371    if test "x$IS_GNU_MAKE" = x; then
18372      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18373$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18374    else
18375      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18376      if test "x$IS_MODERN_MAKE" = x; then
18377        { $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
18378$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;}
18379      else
18380        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18381          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18382            MAKE_EXPECTED_ENV='cygwin'
18383          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18384            MAKE_EXPECTED_ENV='msys'
18385          else
18386            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18387          fi
18388          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18389          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18390        else
18391          # Not relevant for non-Windows
18392          IS_MAKE_CORRECT_ENV=true
18393        fi
18394        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18395          { $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
18396$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;}
18397        else
18398          FOUND_MAKE=$MAKE_CANDIDATE
18399
18400  # Only process if variable expands to non-empty
18401
18402  if test "x$FOUND_MAKE" != x; then
18403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18404
18405  # First separate the path from the arguments. This will split at the first
18406  # space.
18407  complete="$FOUND_MAKE"
18408  path="${complete%% *}"
18409  tmp="$complete EOL"
18410  arguments="${tmp#* }"
18411
18412  # Input might be given as Windows format, start by converting to
18413  # unix format.
18414  new_path=`$CYGPATH -u "$path"`
18415
18416  # Now try to locate executable using which
18417  new_path=`$WHICH "$new_path" 2> /dev/null`
18418  # bat and cmd files are not always considered executable in cygwin causing which
18419  # to not find them
18420  if test "x$new_path" = x \
18421      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18422      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18423    new_path=`$CYGPATH -u "$path"`
18424  fi
18425  if test "x$new_path" = x; then
18426    # Oops. Which didn't find the executable.
18427    # The splitting of arguments from the executable at a space might have been incorrect,
18428    # since paths with space are more likely in Windows. Give it another try with the whole
18429    # argument.
18430    path="$complete"
18431    arguments="EOL"
18432    new_path=`$CYGPATH -u "$path"`
18433    new_path=`$WHICH "$new_path" 2> /dev/null`
18434    # bat and cmd files are not always considered executable in cygwin causing which
18435    # to not find them
18436    if test "x$new_path" = x \
18437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18439      new_path=`$CYGPATH -u "$path"`
18440    fi
18441    if test "x$new_path" = x; then
18442      # It's still not found. Now this is an unrecoverable error.
18443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18444$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18445      has_space=`$ECHO "$complete" | $GREP " "`
18446      if test "x$has_space" != x; then
18447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18449      fi
18450      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18451    fi
18452  fi
18453
18454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18457  # "foo.exe" is OK but "foo" is an error.
18458  #
18459  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18460  # It is also a way to make sure we got the proper file name for the real test later on.
18461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18462  if test "x$test_shortpath" = x; then
18463    # Short path failed, file does not exist as specified.
18464    # Try adding .exe or .cmd
18465    if test -f "${new_path}.exe"; then
18466      input_to_shortpath="${new_path}.exe"
18467    elif test -f "${new_path}.cmd"; then
18468      input_to_shortpath="${new_path}.cmd"
18469    else
18470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18471$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18472      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18473$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18474      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18475    fi
18476  else
18477    input_to_shortpath="$new_path"
18478  fi
18479
18480  # Call helper function which possibly converts this using DOS-style short mode.
18481  # If so, the updated path is stored in $new_path.
18482  new_path="$input_to_shortpath"
18483
18484  input_path="$input_to_shortpath"
18485  # Check if we need to convert this using DOS-style short mode. If the path
18486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18487  # take no chances and rewrite it.
18488  # Note: m4 eats our [], so we need to use [ and ] instead.
18489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18490  if test "x$has_forbidden_chars" != x; then
18491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18495      # Going to short mode and back again did indeed matter. Since short mode is
18496      # case insensitive, let's make it lowercase to improve readability.
18497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18498      # Now convert it back to Unix-style (cygpath)
18499      input_path=`$CYGPATH -u "$shortmode_path"`
18500      new_path="$input_path"
18501    fi
18502  fi
18503
18504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18505  if test "x$test_cygdrive_prefix" = x; then
18506    # As a simple fix, exclude /usr/bin since it's not a real path.
18507    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18509      # a path prefixed by /cygdrive for fixpath to work.
18510      new_path="$CYGWIN_ROOT_PATH$input_path"
18511    fi
18512  fi
18513
18514  # remove trailing .exe if any
18515  new_path="${new_path/%.exe/}"
18516
18517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18518
18519  # First separate the path from the arguments. This will split at the first
18520  # space.
18521  complete="$FOUND_MAKE"
18522  path="${complete%% *}"
18523  tmp="$complete EOL"
18524  arguments="${tmp#* }"
18525
18526  # Input might be given as Windows format, start by converting to
18527  # unix format.
18528  new_path="$path"
18529
18530  windows_path="$new_path"
18531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18532    unix_path=`$CYGPATH -u "$windows_path"`
18533    new_path="$unix_path"
18534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18536    new_path="$unix_path"
18537  fi
18538
18539
18540  # Now try to locate executable using which
18541  new_path=`$WHICH "$new_path" 2> /dev/null`
18542
18543  if test "x$new_path" = x; then
18544    # Oops. Which didn't find the executable.
18545    # The splitting of arguments from the executable at a space might have been incorrect,
18546    # since paths with space are more likely in Windows. Give it another try with the whole
18547    # argument.
18548    path="$complete"
18549    arguments="EOL"
18550    new_path="$path"
18551
18552  windows_path="$new_path"
18553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18554    unix_path=`$CYGPATH -u "$windows_path"`
18555    new_path="$unix_path"
18556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18558    new_path="$unix_path"
18559  fi
18560
18561
18562    new_path=`$WHICH "$new_path" 2> /dev/null`
18563    # bat and cmd files are not always considered executable in MSYS causing which
18564    # to not find them
18565    if test "x$new_path" = x \
18566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18568      new_path="$path"
18569
18570  windows_path="$new_path"
18571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18572    unix_path=`$CYGPATH -u "$windows_path"`
18573    new_path="$unix_path"
18574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18576    new_path="$unix_path"
18577  fi
18578
18579    fi
18580
18581    if test "x$new_path" = x; then
18582      # It's still not found. Now this is an unrecoverable error.
18583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18584$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18585      has_space=`$ECHO "$complete" | $GREP " "`
18586      if test "x$has_space" != x; then
18587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18589      fi
18590      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18591    fi
18592  fi
18593
18594  # Now new_path has a complete unix path to the binary
18595  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18596    # Keep paths in /bin as-is, but remove trailing .exe if any
18597    new_path="${new_path/%.exe/}"
18598    # Do not save /bin paths to all_fixpath_prefixes!
18599  else
18600    # Not in mixed or Windows style, start by that.
18601    new_path=`cmd //c echo $new_path`
18602
18603  input_path="$new_path"
18604  # Check if we need to convert this using DOS-style short mode. If the path
18605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18606  # take no chances and rewrite it.
18607  # Note: m4 eats our [], so we need to use [ and ] instead.
18608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18609  if test "x$has_forbidden_chars" != x; then
18610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18612  fi
18613
18614    # Output is in $new_path
18615
18616  windows_path="$new_path"
18617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18618    unix_path=`$CYGPATH -u "$windows_path"`
18619    new_path="$unix_path"
18620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18622    new_path="$unix_path"
18623  fi
18624
18625    # remove trailing .exe if any
18626    new_path="${new_path/%.exe/}"
18627
18628    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18629    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18630  fi
18631
18632    else
18633      # We're on a unix platform. Hooray! :)
18634      # First separate the path from the arguments. This will split at the first
18635      # space.
18636      complete="$FOUND_MAKE"
18637      path="${complete%% *}"
18638      tmp="$complete EOL"
18639      arguments="${tmp#* }"
18640
18641      # Cannot rely on the command "which" here since it doesn't always work.
18642      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18643      if test -z "$is_absolute_path"; then
18644        # Path to executable is not absolute. Find it.
18645        IFS_save="$IFS"
18646        IFS=:
18647        for p in $PATH; do
18648          if test -f "$p/$path" && test -x "$p/$path"; then
18649            new_path="$p/$path"
18650            break
18651          fi
18652        done
18653        IFS="$IFS_save"
18654      else
18655        # This is an absolute path, we can use it without further modifications.
18656        new_path="$path"
18657      fi
18658
18659      if test "x$new_path" = x; then
18660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18661$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18662        has_space=`$ECHO "$complete" | $GREP " "`
18663        if test "x$has_space" != x; then
18664          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18665$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18666        fi
18667        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18668      fi
18669    fi
18670
18671    # Now join together the path and the arguments once again
18672    if test "x$arguments" != xEOL; then
18673      new_complete="$new_path ${arguments% *}"
18674    else
18675      new_complete="$new_path"
18676    fi
18677
18678    if test "x$complete" != "x$new_complete"; then
18679      FOUND_MAKE="$new_complete"
18680      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18681$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18682    fi
18683  fi
18684
18685        fi
18686      fi
18687    fi
18688  fi
18689
18690        if test "x$FOUND_MAKE" = x; then
18691          for ac_prog in make
18692do
18693  # Extract the first word of "$ac_prog", so it can be a program name with args.
18694set dummy $ac_prog; ac_word=$2
18695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18696$as_echo_n "checking for $ac_word... " >&6; }
18697if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18698  $as_echo_n "(cached) " >&6
18699else
18700  case $CHECK_TOOLSDIR_MAKE in
18701  [\\/]* | ?:[\\/]*)
18702  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18703  ;;
18704  *)
18705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18706for as_dir in $PATH
18707do
18708  IFS=$as_save_IFS
18709  test -z "$as_dir" && as_dir=.
18710    for ac_exec_ext in '' $ac_executable_extensions; do
18711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18712    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18714    break 2
18715  fi
18716done
18717  done
18718IFS=$as_save_IFS
18719
18720  ;;
18721esac
18722fi
18723CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18724if test -n "$CHECK_TOOLSDIR_MAKE"; then
18725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18726$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18727else
18728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18729$as_echo "no" >&6; }
18730fi
18731
18732
18733  test -n "$CHECK_TOOLSDIR_MAKE" && break
18734done
18735
18736
18737  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18738  DESCRIPTION="make in tools-dir"
18739
18740  # On Cygwin, we require a newer version of make than on other platforms
18741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18742    MAKE_VERSION_EXPR="-e 4\."
18743    MAKE_REQUIRED_VERSION="4.0"
18744   else
18745    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18746    MAKE_REQUIRED_VERSION="3.81"
18747  fi
18748
18749  if test "x$MAKE_CANDIDATE" != x; then
18750    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18751$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18752    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18753    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18754    if test "x$IS_GNU_MAKE" = x; then
18755      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18756$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18757    else
18758      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18759      if test "x$IS_MODERN_MAKE" = x; then
18760        { $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
18761$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;}
18762      else
18763        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18764          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18765            MAKE_EXPECTED_ENV='cygwin'
18766          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18767            MAKE_EXPECTED_ENV='msys'
18768          else
18769            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18770          fi
18771          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18772          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18773        else
18774          # Not relevant for non-Windows
18775          IS_MAKE_CORRECT_ENV=true
18776        fi
18777        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18778          { $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
18779$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;}
18780        else
18781          FOUND_MAKE=$MAKE_CANDIDATE
18782
18783  # Only process if variable expands to non-empty
18784
18785  if test "x$FOUND_MAKE" != x; then
18786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18787
18788  # First separate the path from the arguments. This will split at the first
18789  # space.
18790  complete="$FOUND_MAKE"
18791  path="${complete%% *}"
18792  tmp="$complete EOL"
18793  arguments="${tmp#* }"
18794
18795  # Input might be given as Windows format, start by converting to
18796  # unix format.
18797  new_path=`$CYGPATH -u "$path"`
18798
18799  # Now try to locate executable using which
18800  new_path=`$WHICH "$new_path" 2> /dev/null`
18801  # bat and cmd files are not always considered executable in cygwin causing which
18802  # to not find them
18803  if test "x$new_path" = x \
18804      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18805      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18806    new_path=`$CYGPATH -u "$path"`
18807  fi
18808  if test "x$new_path" = x; then
18809    # Oops. Which didn't find the executable.
18810    # The splitting of arguments from the executable at a space might have been incorrect,
18811    # since paths with space are more likely in Windows. Give it another try with the whole
18812    # argument.
18813    path="$complete"
18814    arguments="EOL"
18815    new_path=`$CYGPATH -u "$path"`
18816    new_path=`$WHICH "$new_path" 2> /dev/null`
18817    # bat and cmd files are not always considered executable in cygwin causing which
18818    # to not find them
18819    if test "x$new_path" = x \
18820        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18821        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18822      new_path=`$CYGPATH -u "$path"`
18823    fi
18824    if test "x$new_path" = x; then
18825      # It's still not found. Now this is an unrecoverable error.
18826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18827$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18828      has_space=`$ECHO "$complete" | $GREP " "`
18829      if test "x$has_space" != x; then
18830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18832      fi
18833      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18834    fi
18835  fi
18836
18837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18840  # "foo.exe" is OK but "foo" is an error.
18841  #
18842  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18843  # It is also a way to make sure we got the proper file name for the real test later on.
18844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18845  if test "x$test_shortpath" = x; then
18846    # Short path failed, file does not exist as specified.
18847    # Try adding .exe or .cmd
18848    if test -f "${new_path}.exe"; then
18849      input_to_shortpath="${new_path}.exe"
18850    elif test -f "${new_path}.cmd"; then
18851      input_to_shortpath="${new_path}.cmd"
18852    else
18853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18854$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18855      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18856$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18857      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18858    fi
18859  else
18860    input_to_shortpath="$new_path"
18861  fi
18862
18863  # Call helper function which possibly converts this using DOS-style short mode.
18864  # If so, the updated path is stored in $new_path.
18865  new_path="$input_to_shortpath"
18866
18867  input_path="$input_to_shortpath"
18868  # Check if we need to convert this using DOS-style short mode. If the path
18869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18870  # take no chances and rewrite it.
18871  # Note: m4 eats our [], so we need to use [ and ] instead.
18872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18873  if test "x$has_forbidden_chars" != x; then
18874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18878      # Going to short mode and back again did indeed matter. Since short mode is
18879      # case insensitive, let's make it lowercase to improve readability.
18880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18881      # Now convert it back to Unix-style (cygpath)
18882      input_path=`$CYGPATH -u "$shortmode_path"`
18883      new_path="$input_path"
18884    fi
18885  fi
18886
18887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18888  if test "x$test_cygdrive_prefix" = x; then
18889    # As a simple fix, exclude /usr/bin since it's not a real path.
18890    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18892      # a path prefixed by /cygdrive for fixpath to work.
18893      new_path="$CYGWIN_ROOT_PATH$input_path"
18894    fi
18895  fi
18896
18897  # remove trailing .exe if any
18898  new_path="${new_path/%.exe/}"
18899
18900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18901
18902  # First separate the path from the arguments. This will split at the first
18903  # space.
18904  complete="$FOUND_MAKE"
18905  path="${complete%% *}"
18906  tmp="$complete EOL"
18907  arguments="${tmp#* }"
18908
18909  # Input might be given as Windows format, start by converting to
18910  # unix format.
18911  new_path="$path"
18912
18913  windows_path="$new_path"
18914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18915    unix_path=`$CYGPATH -u "$windows_path"`
18916    new_path="$unix_path"
18917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18919    new_path="$unix_path"
18920  fi
18921
18922
18923  # Now try to locate executable using which
18924  new_path=`$WHICH "$new_path" 2> /dev/null`
18925
18926  if test "x$new_path" = x; then
18927    # Oops. Which didn't find the executable.
18928    # The splitting of arguments from the executable at a space might have been incorrect,
18929    # since paths with space are more likely in Windows. Give it another try with the whole
18930    # argument.
18931    path="$complete"
18932    arguments="EOL"
18933    new_path="$path"
18934
18935  windows_path="$new_path"
18936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18937    unix_path=`$CYGPATH -u "$windows_path"`
18938    new_path="$unix_path"
18939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18941    new_path="$unix_path"
18942  fi
18943
18944
18945    new_path=`$WHICH "$new_path" 2> /dev/null`
18946    # bat and cmd files are not always considered executable in MSYS causing which
18947    # to not find them
18948    if test "x$new_path" = x \
18949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18951      new_path="$path"
18952
18953  windows_path="$new_path"
18954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18955    unix_path=`$CYGPATH -u "$windows_path"`
18956    new_path="$unix_path"
18957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18959    new_path="$unix_path"
18960  fi
18961
18962    fi
18963
18964    if test "x$new_path" = x; then
18965      # It's still not found. Now this is an unrecoverable error.
18966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18967$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18968      has_space=`$ECHO "$complete" | $GREP " "`
18969      if test "x$has_space" != x; then
18970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18972      fi
18973      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18974    fi
18975  fi
18976
18977  # Now new_path has a complete unix path to the binary
18978  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18979    # Keep paths in /bin as-is, but remove trailing .exe if any
18980    new_path="${new_path/%.exe/}"
18981    # Do not save /bin paths to all_fixpath_prefixes!
18982  else
18983    # Not in mixed or Windows style, start by that.
18984    new_path=`cmd //c echo $new_path`
18985
18986  input_path="$new_path"
18987  # Check if we need to convert this using DOS-style short mode. If the path
18988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18989  # take no chances and rewrite it.
18990  # Note: m4 eats our [], so we need to use [ and ] instead.
18991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18992  if test "x$has_forbidden_chars" != x; then
18993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18995  fi
18996
18997    # Output is in $new_path
18998
18999  windows_path="$new_path"
19000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19001    unix_path=`$CYGPATH -u "$windows_path"`
19002    new_path="$unix_path"
19003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19005    new_path="$unix_path"
19006  fi
19007
19008    # remove trailing .exe if any
19009    new_path="${new_path/%.exe/}"
19010
19011    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19012    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19013  fi
19014
19015    else
19016      # We're on a unix platform. Hooray! :)
19017      # First separate the path from the arguments. This will split at the first
19018      # space.
19019      complete="$FOUND_MAKE"
19020      path="${complete%% *}"
19021      tmp="$complete EOL"
19022      arguments="${tmp#* }"
19023
19024      # Cannot rely on the command "which" here since it doesn't always work.
19025      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19026      if test -z "$is_absolute_path"; then
19027        # Path to executable is not absolute. Find it.
19028        IFS_save="$IFS"
19029        IFS=:
19030        for p in $PATH; do
19031          if test -f "$p/$path" && test -x "$p/$path"; then
19032            new_path="$p/$path"
19033            break
19034          fi
19035        done
19036        IFS="$IFS_save"
19037      else
19038        # This is an absolute path, we can use it without further modifications.
19039        new_path="$path"
19040      fi
19041
19042      if test "x$new_path" = x; then
19043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19044$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19045        has_space=`$ECHO "$complete" | $GREP " "`
19046        if test "x$has_space" != x; then
19047          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19049        fi
19050        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19051      fi
19052    fi
19053
19054    # Now join together the path and the arguments once again
19055    if test "x$arguments" != xEOL; then
19056      new_complete="$new_path ${arguments% *}"
19057    else
19058      new_complete="$new_path"
19059    fi
19060
19061    if test "x$complete" != "x$new_complete"; then
19062      FOUND_MAKE="$new_complete"
19063      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19064$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19065    fi
19066  fi
19067
19068        fi
19069      fi
19070    fi
19071  fi
19072
19073        fi
19074        PATH=$OLD_PATH
19075      fi
19076    fi
19077
19078    if test "x$FOUND_MAKE" = x; then
19079      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
19080    fi
19081
19082  else
19083    # The variable is set, but is it from the command line or the environment?
19084
19085    # Try to remove the string !MAKE! from our list.
19086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19088      # If it failed, the variable was not from the command line. Ignore it,
19089      # but warn the user (except for BASH, which is always set by the calling BASH).
19090      if test "xMAKE" != xBASH; then
19091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19092$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19093      fi
19094      # Try to locate tool using the code snippet
19095
19096    # Try our hardest to locate a correct version of GNU make
19097    for ac_prog in gmake
19098do
19099  # Extract the first word of "$ac_prog", so it can be a program name with args.
19100set dummy $ac_prog; ac_word=$2
19101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19102$as_echo_n "checking for $ac_word... " >&6; }
19103if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19104  $as_echo_n "(cached) " >&6
19105else
19106  case $CHECK_GMAKE in
19107  [\\/]* | ?:[\\/]*)
19108  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19109  ;;
19110  *)
19111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19112for as_dir in $PATH
19113do
19114  IFS=$as_save_IFS
19115  test -z "$as_dir" && as_dir=.
19116    for ac_exec_ext in '' $ac_executable_extensions; do
19117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19118    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19120    break 2
19121  fi
19122done
19123  done
19124IFS=$as_save_IFS
19125
19126  ;;
19127esac
19128fi
19129CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19130if test -n "$CHECK_GMAKE"; then
19131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19132$as_echo "$CHECK_GMAKE" >&6; }
19133else
19134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19135$as_echo "no" >&6; }
19136fi
19137
19138
19139  test -n "$CHECK_GMAKE" && break
19140done
19141
19142
19143  MAKE_CANDIDATE=""$CHECK_GMAKE""
19144  DESCRIPTION="gmake in PATH"
19145
19146  # On Cygwin, we require a newer version of make than on other platforms
19147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19148    MAKE_VERSION_EXPR="-e 4\."
19149    MAKE_REQUIRED_VERSION="4.0"
19150   else
19151    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19152    MAKE_REQUIRED_VERSION="3.81"
19153  fi
19154
19155  if test "x$MAKE_CANDIDATE" != x; then
19156    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19157$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19158    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19159    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19160    if test "x$IS_GNU_MAKE" = x; then
19161      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19162$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19163    else
19164      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19165      if test "x$IS_MODERN_MAKE" = x; then
19166        { $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
19167$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;}
19168      else
19169        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19170          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19171            MAKE_EXPECTED_ENV='cygwin'
19172          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19173            MAKE_EXPECTED_ENV='msys'
19174          else
19175            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19176          fi
19177          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19178          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19179        else
19180          # Not relevant for non-Windows
19181          IS_MAKE_CORRECT_ENV=true
19182        fi
19183        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19184          { $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
19185$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;}
19186        else
19187          FOUND_MAKE=$MAKE_CANDIDATE
19188
19189  # Only process if variable expands to non-empty
19190
19191  if test "x$FOUND_MAKE" != x; then
19192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19193
19194  # First separate the path from the arguments. This will split at the first
19195  # space.
19196  complete="$FOUND_MAKE"
19197  path="${complete%% *}"
19198  tmp="$complete EOL"
19199  arguments="${tmp#* }"
19200
19201  # Input might be given as Windows format, start by converting to
19202  # unix format.
19203  new_path=`$CYGPATH -u "$path"`
19204
19205  # Now try to locate executable using which
19206  new_path=`$WHICH "$new_path" 2> /dev/null`
19207  # bat and cmd files are not always considered executable in cygwin causing which
19208  # to not find them
19209  if test "x$new_path" = x \
19210      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19211      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19212    new_path=`$CYGPATH -u "$path"`
19213  fi
19214  if test "x$new_path" = x; then
19215    # Oops. Which didn't find the executable.
19216    # The splitting of arguments from the executable at a space might have been incorrect,
19217    # since paths with space are more likely in Windows. Give it another try with the whole
19218    # argument.
19219    path="$complete"
19220    arguments="EOL"
19221    new_path=`$CYGPATH -u "$path"`
19222    new_path=`$WHICH "$new_path" 2> /dev/null`
19223    # bat and cmd files are not always considered executable in cygwin causing which
19224    # to not find them
19225    if test "x$new_path" = x \
19226        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19227        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19228      new_path=`$CYGPATH -u "$path"`
19229    fi
19230    if test "x$new_path" = x; then
19231      # It's still not found. Now this is an unrecoverable error.
19232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19233$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19234      has_space=`$ECHO "$complete" | $GREP " "`
19235      if test "x$has_space" != x; then
19236        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19237$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19238      fi
19239      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19240    fi
19241  fi
19242
19243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19246  # "foo.exe" is OK but "foo" is an error.
19247  #
19248  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19249  # It is also a way to make sure we got the proper file name for the real test later on.
19250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19251  if test "x$test_shortpath" = x; then
19252    # Short path failed, file does not exist as specified.
19253    # Try adding .exe or .cmd
19254    if test -f "${new_path}.exe"; then
19255      input_to_shortpath="${new_path}.exe"
19256    elif test -f "${new_path}.cmd"; then
19257      input_to_shortpath="${new_path}.cmd"
19258    else
19259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19260$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19261      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19262$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19263      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19264    fi
19265  else
19266    input_to_shortpath="$new_path"
19267  fi
19268
19269  # Call helper function which possibly converts this using DOS-style short mode.
19270  # If so, the updated path is stored in $new_path.
19271  new_path="$input_to_shortpath"
19272
19273  input_path="$input_to_shortpath"
19274  # Check if we need to convert this using DOS-style short mode. If the path
19275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19276  # take no chances and rewrite it.
19277  # Note: m4 eats our [], so we need to use [ and ] instead.
19278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19279  if test "x$has_forbidden_chars" != x; then
19280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19284      # Going to short mode and back again did indeed matter. Since short mode is
19285      # case insensitive, let's make it lowercase to improve readability.
19286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19287      # Now convert it back to Unix-style (cygpath)
19288      input_path=`$CYGPATH -u "$shortmode_path"`
19289      new_path="$input_path"
19290    fi
19291  fi
19292
19293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19294  if test "x$test_cygdrive_prefix" = x; then
19295    # As a simple fix, exclude /usr/bin since it's not a real path.
19296    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19298      # a path prefixed by /cygdrive for fixpath to work.
19299      new_path="$CYGWIN_ROOT_PATH$input_path"
19300    fi
19301  fi
19302
19303  # remove trailing .exe if any
19304  new_path="${new_path/%.exe/}"
19305
19306    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19307
19308  # First separate the path from the arguments. This will split at the first
19309  # space.
19310  complete="$FOUND_MAKE"
19311  path="${complete%% *}"
19312  tmp="$complete EOL"
19313  arguments="${tmp#* }"
19314
19315  # Input might be given as Windows format, start by converting to
19316  # unix format.
19317  new_path="$path"
19318
19319  windows_path="$new_path"
19320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19321    unix_path=`$CYGPATH -u "$windows_path"`
19322    new_path="$unix_path"
19323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19325    new_path="$unix_path"
19326  fi
19327
19328
19329  # Now try to locate executable using which
19330  new_path=`$WHICH "$new_path" 2> /dev/null`
19331
19332  if test "x$new_path" = x; then
19333    # Oops. Which didn't find the executable.
19334    # The splitting of arguments from the executable at a space might have been incorrect,
19335    # since paths with space are more likely in Windows. Give it another try with the whole
19336    # argument.
19337    path="$complete"
19338    arguments="EOL"
19339    new_path="$path"
19340
19341  windows_path="$new_path"
19342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19343    unix_path=`$CYGPATH -u "$windows_path"`
19344    new_path="$unix_path"
19345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19347    new_path="$unix_path"
19348  fi
19349
19350
19351    new_path=`$WHICH "$new_path" 2> /dev/null`
19352    # bat and cmd files are not always considered executable in MSYS causing which
19353    # to not find them
19354    if test "x$new_path" = x \
19355        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19356        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19357      new_path="$path"
19358
19359  windows_path="$new_path"
19360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19361    unix_path=`$CYGPATH -u "$windows_path"`
19362    new_path="$unix_path"
19363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19365    new_path="$unix_path"
19366  fi
19367
19368    fi
19369
19370    if test "x$new_path" = x; then
19371      # It's still not found. Now this is an unrecoverable error.
19372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19373$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19374      has_space=`$ECHO "$complete" | $GREP " "`
19375      if test "x$has_space" != x; then
19376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19378      fi
19379      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19380    fi
19381  fi
19382
19383  # Now new_path has a complete unix path to the binary
19384  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19385    # Keep paths in /bin as-is, but remove trailing .exe if any
19386    new_path="${new_path/%.exe/}"
19387    # Do not save /bin paths to all_fixpath_prefixes!
19388  else
19389    # Not in mixed or Windows style, start by that.
19390    new_path=`cmd //c echo $new_path`
19391
19392  input_path="$new_path"
19393  # Check if we need to convert this using DOS-style short mode. If the path
19394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19395  # take no chances and rewrite it.
19396  # Note: m4 eats our [], so we need to use [ and ] instead.
19397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19398  if test "x$has_forbidden_chars" != x; then
19399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19401  fi
19402
19403    # Output is in $new_path
19404
19405  windows_path="$new_path"
19406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19407    unix_path=`$CYGPATH -u "$windows_path"`
19408    new_path="$unix_path"
19409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19411    new_path="$unix_path"
19412  fi
19413
19414    # remove trailing .exe if any
19415    new_path="${new_path/%.exe/}"
19416
19417    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19418    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19419  fi
19420
19421    else
19422      # We're on a unix platform. Hooray! :)
19423      # First separate the path from the arguments. This will split at the first
19424      # space.
19425      complete="$FOUND_MAKE"
19426      path="${complete%% *}"
19427      tmp="$complete EOL"
19428      arguments="${tmp#* }"
19429
19430      # Cannot rely on the command "which" here since it doesn't always work.
19431      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19432      if test -z "$is_absolute_path"; then
19433        # Path to executable is not absolute. Find it.
19434        IFS_save="$IFS"
19435        IFS=:
19436        for p in $PATH; do
19437          if test -f "$p/$path" && test -x "$p/$path"; then
19438            new_path="$p/$path"
19439            break
19440          fi
19441        done
19442        IFS="$IFS_save"
19443      else
19444        # This is an absolute path, we can use it without further modifications.
19445        new_path="$path"
19446      fi
19447
19448      if test "x$new_path" = x; then
19449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19450$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19451        has_space=`$ECHO "$complete" | $GREP " "`
19452        if test "x$has_space" != x; then
19453          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19454$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19455        fi
19456        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19457      fi
19458    fi
19459
19460    # Now join together the path and the arguments once again
19461    if test "x$arguments" != xEOL; then
19462      new_complete="$new_path ${arguments% *}"
19463    else
19464      new_complete="$new_path"
19465    fi
19466
19467    if test "x$complete" != "x$new_complete"; then
19468      FOUND_MAKE="$new_complete"
19469      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19470$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19471    fi
19472  fi
19473
19474        fi
19475      fi
19476    fi
19477  fi
19478
19479
19480    if test "x$FOUND_MAKE" = x; then
19481      for ac_prog in make
19482do
19483  # Extract the first word of "$ac_prog", so it can be a program name with args.
19484set dummy $ac_prog; ac_word=$2
19485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19486$as_echo_n "checking for $ac_word... " >&6; }
19487if ${ac_cv_path_CHECK_MAKE+:} false; then :
19488  $as_echo_n "(cached) " >&6
19489else
19490  case $CHECK_MAKE in
19491  [\\/]* | ?:[\\/]*)
19492  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19493  ;;
19494  *)
19495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19496for as_dir in $PATH
19497do
19498  IFS=$as_save_IFS
19499  test -z "$as_dir" && as_dir=.
19500    for ac_exec_ext in '' $ac_executable_extensions; do
19501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19502    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19504    break 2
19505  fi
19506done
19507  done
19508IFS=$as_save_IFS
19509
19510  ;;
19511esac
19512fi
19513CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19514if test -n "$CHECK_MAKE"; then
19515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19516$as_echo "$CHECK_MAKE" >&6; }
19517else
19518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19519$as_echo "no" >&6; }
19520fi
19521
19522
19523  test -n "$CHECK_MAKE" && break
19524done
19525
19526
19527  MAKE_CANDIDATE=""$CHECK_MAKE""
19528  DESCRIPTION="make in PATH"
19529
19530  # On Cygwin, we require a newer version of make than on other platforms
19531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19532    MAKE_VERSION_EXPR="-e 4\."
19533    MAKE_REQUIRED_VERSION="4.0"
19534   else
19535    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19536    MAKE_REQUIRED_VERSION="3.81"
19537  fi
19538
19539  if test "x$MAKE_CANDIDATE" != x; then
19540    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19541$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19542    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19543    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19544    if test "x$IS_GNU_MAKE" = x; then
19545      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19546$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19547    else
19548      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19549      if test "x$IS_MODERN_MAKE" = x; then
19550        { $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
19551$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;}
19552      else
19553        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19554          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19555            MAKE_EXPECTED_ENV='cygwin'
19556          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19557            MAKE_EXPECTED_ENV='msys'
19558          else
19559            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19560          fi
19561          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19562          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19563        else
19564          # Not relevant for non-Windows
19565          IS_MAKE_CORRECT_ENV=true
19566        fi
19567        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19568          { $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
19569$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;}
19570        else
19571          FOUND_MAKE=$MAKE_CANDIDATE
19572
19573  # Only process if variable expands to non-empty
19574
19575  if test "x$FOUND_MAKE" != x; then
19576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19577
19578  # First separate the path from the arguments. This will split at the first
19579  # space.
19580  complete="$FOUND_MAKE"
19581  path="${complete%% *}"
19582  tmp="$complete EOL"
19583  arguments="${tmp#* }"
19584
19585  # Input might be given as Windows format, start by converting to
19586  # unix format.
19587  new_path=`$CYGPATH -u "$path"`
19588
19589  # Now try to locate executable using which
19590  new_path=`$WHICH "$new_path" 2> /dev/null`
19591  # bat and cmd files are not always considered executable in cygwin causing which
19592  # to not find them
19593  if test "x$new_path" = x \
19594      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19595      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19596    new_path=`$CYGPATH -u "$path"`
19597  fi
19598  if test "x$new_path" = x; then
19599    # Oops. Which didn't find the executable.
19600    # The splitting of arguments from the executable at a space might have been incorrect,
19601    # since paths with space are more likely in Windows. Give it another try with the whole
19602    # argument.
19603    path="$complete"
19604    arguments="EOL"
19605    new_path=`$CYGPATH -u "$path"`
19606    new_path=`$WHICH "$new_path" 2> /dev/null`
19607    # bat and cmd files are not always considered executable in cygwin causing which
19608    # to not find them
19609    if test "x$new_path" = x \
19610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19612      new_path=`$CYGPATH -u "$path"`
19613    fi
19614    if test "x$new_path" = x; then
19615      # It's still not found. Now this is an unrecoverable error.
19616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19617$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19618      has_space=`$ECHO "$complete" | $GREP " "`
19619      if test "x$has_space" != x; then
19620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19622      fi
19623      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19624    fi
19625  fi
19626
19627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19630  # "foo.exe" is OK but "foo" is an error.
19631  #
19632  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19633  # It is also a way to make sure we got the proper file name for the real test later on.
19634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19635  if test "x$test_shortpath" = x; then
19636    # Short path failed, file does not exist as specified.
19637    # Try adding .exe or .cmd
19638    if test -f "${new_path}.exe"; then
19639      input_to_shortpath="${new_path}.exe"
19640    elif test -f "${new_path}.cmd"; then
19641      input_to_shortpath="${new_path}.cmd"
19642    else
19643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19644$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19645      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19646$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19647      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19648    fi
19649  else
19650    input_to_shortpath="$new_path"
19651  fi
19652
19653  # Call helper function which possibly converts this using DOS-style short mode.
19654  # If so, the updated path is stored in $new_path.
19655  new_path="$input_to_shortpath"
19656
19657  input_path="$input_to_shortpath"
19658  # Check if we need to convert this using DOS-style short mode. If the path
19659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19660  # take no chances and rewrite it.
19661  # Note: m4 eats our [], so we need to use [ and ] instead.
19662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19663  if test "x$has_forbidden_chars" != x; then
19664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19668      # Going to short mode and back again did indeed matter. Since short mode is
19669      # case insensitive, let's make it lowercase to improve readability.
19670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19671      # Now convert it back to Unix-style (cygpath)
19672      input_path=`$CYGPATH -u "$shortmode_path"`
19673      new_path="$input_path"
19674    fi
19675  fi
19676
19677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19678  if test "x$test_cygdrive_prefix" = x; then
19679    # As a simple fix, exclude /usr/bin since it's not a real path.
19680    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19682      # a path prefixed by /cygdrive for fixpath to work.
19683      new_path="$CYGWIN_ROOT_PATH$input_path"
19684    fi
19685  fi
19686
19687  # remove trailing .exe if any
19688  new_path="${new_path/%.exe/}"
19689
19690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19691
19692  # First separate the path from the arguments. This will split at the first
19693  # space.
19694  complete="$FOUND_MAKE"
19695  path="${complete%% *}"
19696  tmp="$complete EOL"
19697  arguments="${tmp#* }"
19698
19699  # Input might be given as Windows format, start by converting to
19700  # unix format.
19701  new_path="$path"
19702
19703  windows_path="$new_path"
19704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19705    unix_path=`$CYGPATH -u "$windows_path"`
19706    new_path="$unix_path"
19707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19709    new_path="$unix_path"
19710  fi
19711
19712
19713  # Now try to locate executable using which
19714  new_path=`$WHICH "$new_path" 2> /dev/null`
19715
19716  if test "x$new_path" = x; then
19717    # Oops. Which didn't find the executable.
19718    # The splitting of arguments from the executable at a space might have been incorrect,
19719    # since paths with space are more likely in Windows. Give it another try with the whole
19720    # argument.
19721    path="$complete"
19722    arguments="EOL"
19723    new_path="$path"
19724
19725  windows_path="$new_path"
19726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19727    unix_path=`$CYGPATH -u "$windows_path"`
19728    new_path="$unix_path"
19729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19731    new_path="$unix_path"
19732  fi
19733
19734
19735    new_path=`$WHICH "$new_path" 2> /dev/null`
19736    # bat and cmd files are not always considered executable in MSYS causing which
19737    # to not find them
19738    if test "x$new_path" = x \
19739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19741      new_path="$path"
19742
19743  windows_path="$new_path"
19744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19745    unix_path=`$CYGPATH -u "$windows_path"`
19746    new_path="$unix_path"
19747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19749    new_path="$unix_path"
19750  fi
19751
19752    fi
19753
19754    if test "x$new_path" = x; then
19755      # It's still not found. Now this is an unrecoverable error.
19756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19757$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19758      has_space=`$ECHO "$complete" | $GREP " "`
19759      if test "x$has_space" != x; then
19760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19762      fi
19763      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19764    fi
19765  fi
19766
19767  # Now new_path has a complete unix path to the binary
19768  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19769    # Keep paths in /bin as-is, but remove trailing .exe if any
19770    new_path="${new_path/%.exe/}"
19771    # Do not save /bin paths to all_fixpath_prefixes!
19772  else
19773    # Not in mixed or Windows style, start by that.
19774    new_path=`cmd //c echo $new_path`
19775
19776  input_path="$new_path"
19777  # Check if we need to convert this using DOS-style short mode. If the path
19778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19779  # take no chances and rewrite it.
19780  # Note: m4 eats our [], so we need to use [ and ] instead.
19781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19782  if test "x$has_forbidden_chars" != x; then
19783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19785  fi
19786
19787    # Output is in $new_path
19788
19789  windows_path="$new_path"
19790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19791    unix_path=`$CYGPATH -u "$windows_path"`
19792    new_path="$unix_path"
19793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19795    new_path="$unix_path"
19796  fi
19797
19798    # remove trailing .exe if any
19799    new_path="${new_path/%.exe/}"
19800
19801    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19802    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19803  fi
19804
19805    else
19806      # We're on a unix platform. Hooray! :)
19807      # First separate the path from the arguments. This will split at the first
19808      # space.
19809      complete="$FOUND_MAKE"
19810      path="${complete%% *}"
19811      tmp="$complete EOL"
19812      arguments="${tmp#* }"
19813
19814      # Cannot rely on the command "which" here since it doesn't always work.
19815      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19816      if test -z "$is_absolute_path"; then
19817        # Path to executable is not absolute. Find it.
19818        IFS_save="$IFS"
19819        IFS=:
19820        for p in $PATH; do
19821          if test -f "$p/$path" && test -x "$p/$path"; then
19822            new_path="$p/$path"
19823            break
19824          fi
19825        done
19826        IFS="$IFS_save"
19827      else
19828        # This is an absolute path, we can use it without further modifications.
19829        new_path="$path"
19830      fi
19831
19832      if test "x$new_path" = x; then
19833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19834$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19835        has_space=`$ECHO "$complete" | $GREP " "`
19836        if test "x$has_space" != x; then
19837          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19838$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19839        fi
19840        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19841      fi
19842    fi
19843
19844    # Now join together the path and the arguments once again
19845    if test "x$arguments" != xEOL; then
19846      new_complete="$new_path ${arguments% *}"
19847    else
19848      new_complete="$new_path"
19849    fi
19850
19851    if test "x$complete" != "x$new_complete"; then
19852      FOUND_MAKE="$new_complete"
19853      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19854$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19855    fi
19856  fi
19857
19858        fi
19859      fi
19860    fi
19861  fi
19862
19863    fi
19864
19865    if test "x$FOUND_MAKE" = x; then
19866      if test "x$TOOLCHAIN_PATH" != x; then
19867        # We have a toolchain path, check that as well before giving up.
19868        OLD_PATH=$PATH
19869        PATH=$TOOLCHAIN_PATH:$PATH
19870        for ac_prog in gmake
19871do
19872  # Extract the first word of "$ac_prog", so it can be a program name with args.
19873set dummy $ac_prog; ac_word=$2
19874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19875$as_echo_n "checking for $ac_word... " >&6; }
19876if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19877  $as_echo_n "(cached) " >&6
19878else
19879  case $CHECK_TOOLSDIR_GMAKE in
19880  [\\/]* | ?:[\\/]*)
19881  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19882  ;;
19883  *)
19884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19885for as_dir in $PATH
19886do
19887  IFS=$as_save_IFS
19888  test -z "$as_dir" && as_dir=.
19889    for ac_exec_ext in '' $ac_executable_extensions; do
19890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19891    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19893    break 2
19894  fi
19895done
19896  done
19897IFS=$as_save_IFS
19898
19899  ;;
19900esac
19901fi
19902CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19903if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19905$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19906else
19907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19908$as_echo "no" >&6; }
19909fi
19910
19911
19912  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19913done
19914
19915
19916  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19917  DESCRIPTION="gmake in tools-dir"
19918
19919  # On Cygwin, we require a newer version of make than on other platforms
19920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19921    MAKE_VERSION_EXPR="-e 4\."
19922    MAKE_REQUIRED_VERSION="4.0"
19923   else
19924    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19925    MAKE_REQUIRED_VERSION="3.81"
19926  fi
19927
19928  if test "x$MAKE_CANDIDATE" != x; then
19929    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19930$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19931    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19932    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19933    if test "x$IS_GNU_MAKE" = x; then
19934      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19935$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19936    else
19937      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19938      if test "x$IS_MODERN_MAKE" = x; then
19939        { $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
19940$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;}
19941      else
19942        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19943          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19944            MAKE_EXPECTED_ENV='cygwin'
19945          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19946            MAKE_EXPECTED_ENV='msys'
19947          else
19948            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19949          fi
19950          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19951          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19952        else
19953          # Not relevant for non-Windows
19954          IS_MAKE_CORRECT_ENV=true
19955        fi
19956        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19957          { $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
19958$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;}
19959        else
19960          FOUND_MAKE=$MAKE_CANDIDATE
19961
19962  # Only process if variable expands to non-empty
19963
19964  if test "x$FOUND_MAKE" != x; then
19965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19966
19967  # First separate the path from the arguments. This will split at the first
19968  # space.
19969  complete="$FOUND_MAKE"
19970  path="${complete%% *}"
19971  tmp="$complete EOL"
19972  arguments="${tmp#* }"
19973
19974  # Input might be given as Windows format, start by converting to
19975  # unix format.
19976  new_path=`$CYGPATH -u "$path"`
19977
19978  # Now try to locate executable using which
19979  new_path=`$WHICH "$new_path" 2> /dev/null`
19980  # bat and cmd files are not always considered executable in cygwin causing which
19981  # to not find them
19982  if test "x$new_path" = x \
19983      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19984      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19985    new_path=`$CYGPATH -u "$path"`
19986  fi
19987  if test "x$new_path" = x; then
19988    # Oops. Which didn't find the executable.
19989    # The splitting of arguments from the executable at a space might have been incorrect,
19990    # since paths with space are more likely in Windows. Give it another try with the whole
19991    # argument.
19992    path="$complete"
19993    arguments="EOL"
19994    new_path=`$CYGPATH -u "$path"`
19995    new_path=`$WHICH "$new_path" 2> /dev/null`
19996    # bat and cmd files are not always considered executable in cygwin causing which
19997    # to not find them
19998    if test "x$new_path" = x \
19999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20001      new_path=`$CYGPATH -u "$path"`
20002    fi
20003    if test "x$new_path" = x; then
20004      # It's still not found. Now this is an unrecoverable error.
20005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20006$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20007      has_space=`$ECHO "$complete" | $GREP " "`
20008      if test "x$has_space" != x; then
20009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20011      fi
20012      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20013    fi
20014  fi
20015
20016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20019  # "foo.exe" is OK but "foo" is an error.
20020  #
20021  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20022  # It is also a way to make sure we got the proper file name for the real test later on.
20023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20024  if test "x$test_shortpath" = x; then
20025    # Short path failed, file does not exist as specified.
20026    # Try adding .exe or .cmd
20027    if test -f "${new_path}.exe"; then
20028      input_to_shortpath="${new_path}.exe"
20029    elif test -f "${new_path}.cmd"; then
20030      input_to_shortpath="${new_path}.cmd"
20031    else
20032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20033$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20036      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20037    fi
20038  else
20039    input_to_shortpath="$new_path"
20040  fi
20041
20042  # Call helper function which possibly converts this using DOS-style short mode.
20043  # If so, the updated path is stored in $new_path.
20044  new_path="$input_to_shortpath"
20045
20046  input_path="$input_to_shortpath"
20047  # Check if we need to convert this using DOS-style short mode. If the path
20048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20049  # take no chances and rewrite it.
20050  # Note: m4 eats our [], so we need to use [ and ] instead.
20051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20052  if test "x$has_forbidden_chars" != x; then
20053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20057      # Going to short mode and back again did indeed matter. Since short mode is
20058      # case insensitive, let's make it lowercase to improve readability.
20059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20060      # Now convert it back to Unix-style (cygpath)
20061      input_path=`$CYGPATH -u "$shortmode_path"`
20062      new_path="$input_path"
20063    fi
20064  fi
20065
20066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20067  if test "x$test_cygdrive_prefix" = x; then
20068    # As a simple fix, exclude /usr/bin since it's not a real path.
20069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20071      # a path prefixed by /cygdrive for fixpath to work.
20072      new_path="$CYGWIN_ROOT_PATH$input_path"
20073    fi
20074  fi
20075
20076  # remove trailing .exe if any
20077  new_path="${new_path/%.exe/}"
20078
20079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20080
20081  # First separate the path from the arguments. This will split at the first
20082  # space.
20083  complete="$FOUND_MAKE"
20084  path="${complete%% *}"
20085  tmp="$complete EOL"
20086  arguments="${tmp#* }"
20087
20088  # Input might be given as Windows format, start by converting to
20089  # unix format.
20090  new_path="$path"
20091
20092  windows_path="$new_path"
20093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20094    unix_path=`$CYGPATH -u "$windows_path"`
20095    new_path="$unix_path"
20096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20098    new_path="$unix_path"
20099  fi
20100
20101
20102  # Now try to locate executable using which
20103  new_path=`$WHICH "$new_path" 2> /dev/null`
20104
20105  if test "x$new_path" = x; then
20106    # Oops. Which didn't find the executable.
20107    # The splitting of arguments from the executable at a space might have been incorrect,
20108    # since paths with space are more likely in Windows. Give it another try with the whole
20109    # argument.
20110    path="$complete"
20111    arguments="EOL"
20112    new_path="$path"
20113
20114  windows_path="$new_path"
20115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20116    unix_path=`$CYGPATH -u "$windows_path"`
20117    new_path="$unix_path"
20118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20120    new_path="$unix_path"
20121  fi
20122
20123
20124    new_path=`$WHICH "$new_path" 2> /dev/null`
20125    # bat and cmd files are not always considered executable in MSYS causing which
20126    # to not find them
20127    if test "x$new_path" = x \
20128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20130      new_path="$path"
20131
20132  windows_path="$new_path"
20133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20134    unix_path=`$CYGPATH -u "$windows_path"`
20135    new_path="$unix_path"
20136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20138    new_path="$unix_path"
20139  fi
20140
20141    fi
20142
20143    if test "x$new_path" = x; then
20144      # It's still not found. Now this is an unrecoverable error.
20145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20146$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20147      has_space=`$ECHO "$complete" | $GREP " "`
20148      if test "x$has_space" != x; then
20149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20151      fi
20152      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20153    fi
20154  fi
20155
20156  # Now new_path has a complete unix path to the binary
20157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20158    # Keep paths in /bin as-is, but remove trailing .exe if any
20159    new_path="${new_path/%.exe/}"
20160    # Do not save /bin paths to all_fixpath_prefixes!
20161  else
20162    # Not in mixed or Windows style, start by that.
20163    new_path=`cmd //c echo $new_path`
20164
20165  input_path="$new_path"
20166  # Check if we need to convert this using DOS-style short mode. If the path
20167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20168  # take no chances and rewrite it.
20169  # Note: m4 eats our [], so we need to use [ and ] instead.
20170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20171  if test "x$has_forbidden_chars" != x; then
20172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20174  fi
20175
20176    # Output is in $new_path
20177
20178  windows_path="$new_path"
20179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20180    unix_path=`$CYGPATH -u "$windows_path"`
20181    new_path="$unix_path"
20182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20184    new_path="$unix_path"
20185  fi
20186
20187    # remove trailing .exe if any
20188    new_path="${new_path/%.exe/}"
20189
20190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20192  fi
20193
20194    else
20195      # We're on a unix platform. Hooray! :)
20196      # First separate the path from the arguments. This will split at the first
20197      # space.
20198      complete="$FOUND_MAKE"
20199      path="${complete%% *}"
20200      tmp="$complete EOL"
20201      arguments="${tmp#* }"
20202
20203      # Cannot rely on the command "which" here since it doesn't always work.
20204      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20205      if test -z "$is_absolute_path"; then
20206        # Path to executable is not absolute. Find it.
20207        IFS_save="$IFS"
20208        IFS=:
20209        for p in $PATH; do
20210          if test -f "$p/$path" && test -x "$p/$path"; then
20211            new_path="$p/$path"
20212            break
20213          fi
20214        done
20215        IFS="$IFS_save"
20216      else
20217        # This is an absolute path, we can use it without further modifications.
20218        new_path="$path"
20219      fi
20220
20221      if test "x$new_path" = x; then
20222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20223$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20224        has_space=`$ECHO "$complete" | $GREP " "`
20225        if test "x$has_space" != x; then
20226          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20228        fi
20229        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20230      fi
20231    fi
20232
20233    # Now join together the path and the arguments once again
20234    if test "x$arguments" != xEOL; then
20235      new_complete="$new_path ${arguments% *}"
20236    else
20237      new_complete="$new_path"
20238    fi
20239
20240    if test "x$complete" != "x$new_complete"; then
20241      FOUND_MAKE="$new_complete"
20242      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20243$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20244    fi
20245  fi
20246
20247        fi
20248      fi
20249    fi
20250  fi
20251
20252        if test "x$FOUND_MAKE" = x; then
20253          for ac_prog in make
20254do
20255  # Extract the first word of "$ac_prog", so it can be a program name with args.
20256set dummy $ac_prog; ac_word=$2
20257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20258$as_echo_n "checking for $ac_word... " >&6; }
20259if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20260  $as_echo_n "(cached) " >&6
20261else
20262  case $CHECK_TOOLSDIR_MAKE in
20263  [\\/]* | ?:[\\/]*)
20264  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20265  ;;
20266  *)
20267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20268for as_dir in $PATH
20269do
20270  IFS=$as_save_IFS
20271  test -z "$as_dir" && as_dir=.
20272    for ac_exec_ext in '' $ac_executable_extensions; do
20273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20274    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20276    break 2
20277  fi
20278done
20279  done
20280IFS=$as_save_IFS
20281
20282  ;;
20283esac
20284fi
20285CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20286if test -n "$CHECK_TOOLSDIR_MAKE"; then
20287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20288$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20289else
20290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20291$as_echo "no" >&6; }
20292fi
20293
20294
20295  test -n "$CHECK_TOOLSDIR_MAKE" && break
20296done
20297
20298
20299  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20300  DESCRIPTION="make in tools-dir"
20301
20302  # On Cygwin, we require a newer version of make than on other platforms
20303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20304    MAKE_VERSION_EXPR="-e 4\."
20305    MAKE_REQUIRED_VERSION="4.0"
20306   else
20307    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20308    MAKE_REQUIRED_VERSION="3.81"
20309  fi
20310
20311  if test "x$MAKE_CANDIDATE" != x; then
20312    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20313$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20314    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20315    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20316    if test "x$IS_GNU_MAKE" = x; then
20317      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20318$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20319    else
20320      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20321      if test "x$IS_MODERN_MAKE" = x; then
20322        { $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
20323$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;}
20324      else
20325        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20326          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20327            MAKE_EXPECTED_ENV='cygwin'
20328          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20329            MAKE_EXPECTED_ENV='msys'
20330          else
20331            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20332          fi
20333          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20334          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20335        else
20336          # Not relevant for non-Windows
20337          IS_MAKE_CORRECT_ENV=true
20338        fi
20339        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20340          { $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
20341$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;}
20342        else
20343          FOUND_MAKE=$MAKE_CANDIDATE
20344
20345  # Only process if variable expands to non-empty
20346
20347  if test "x$FOUND_MAKE" != x; then
20348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20349
20350  # First separate the path from the arguments. This will split at the first
20351  # space.
20352  complete="$FOUND_MAKE"
20353  path="${complete%% *}"
20354  tmp="$complete EOL"
20355  arguments="${tmp#* }"
20356
20357  # Input might be given as Windows format, start by converting to
20358  # unix format.
20359  new_path=`$CYGPATH -u "$path"`
20360
20361  # Now try to locate executable using which
20362  new_path=`$WHICH "$new_path" 2> /dev/null`
20363  # bat and cmd files are not always considered executable in cygwin causing which
20364  # to not find them
20365  if test "x$new_path" = x \
20366      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20367      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20368    new_path=`$CYGPATH -u "$path"`
20369  fi
20370  if test "x$new_path" = x; then
20371    # Oops. Which didn't find the executable.
20372    # The splitting of arguments from the executable at a space might have been incorrect,
20373    # since paths with space are more likely in Windows. Give it another try with the whole
20374    # argument.
20375    path="$complete"
20376    arguments="EOL"
20377    new_path=`$CYGPATH -u "$path"`
20378    new_path=`$WHICH "$new_path" 2> /dev/null`
20379    # bat and cmd files are not always considered executable in cygwin causing which
20380    # to not find them
20381    if test "x$new_path" = x \
20382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20384      new_path=`$CYGPATH -u "$path"`
20385    fi
20386    if test "x$new_path" = x; then
20387      # It's still not found. Now this is an unrecoverable error.
20388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20389$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20390      has_space=`$ECHO "$complete" | $GREP " "`
20391      if test "x$has_space" != x; then
20392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20394      fi
20395      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20396    fi
20397  fi
20398
20399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20402  # "foo.exe" is OK but "foo" is an error.
20403  #
20404  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20405  # It is also a way to make sure we got the proper file name for the real test later on.
20406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20407  if test "x$test_shortpath" = x; then
20408    # Short path failed, file does not exist as specified.
20409    # Try adding .exe or .cmd
20410    if test -f "${new_path}.exe"; then
20411      input_to_shortpath="${new_path}.exe"
20412    elif test -f "${new_path}.cmd"; then
20413      input_to_shortpath="${new_path}.cmd"
20414    else
20415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20416$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20417      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20418$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20419      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20420    fi
20421  else
20422    input_to_shortpath="$new_path"
20423  fi
20424
20425  # Call helper function which possibly converts this using DOS-style short mode.
20426  # If so, the updated path is stored in $new_path.
20427  new_path="$input_to_shortpath"
20428
20429  input_path="$input_to_shortpath"
20430  # Check if we need to convert this using DOS-style short mode. If the path
20431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20432  # take no chances and rewrite it.
20433  # Note: m4 eats our [], so we need to use [ and ] instead.
20434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20435  if test "x$has_forbidden_chars" != x; then
20436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20440      # Going to short mode and back again did indeed matter. Since short mode is
20441      # case insensitive, let's make it lowercase to improve readability.
20442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20443      # Now convert it back to Unix-style (cygpath)
20444      input_path=`$CYGPATH -u "$shortmode_path"`
20445      new_path="$input_path"
20446    fi
20447  fi
20448
20449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20450  if test "x$test_cygdrive_prefix" = x; then
20451    # As a simple fix, exclude /usr/bin since it's not a real path.
20452    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20454      # a path prefixed by /cygdrive for fixpath to work.
20455      new_path="$CYGWIN_ROOT_PATH$input_path"
20456    fi
20457  fi
20458
20459  # remove trailing .exe if any
20460  new_path="${new_path/%.exe/}"
20461
20462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20463
20464  # First separate the path from the arguments. This will split at the first
20465  # space.
20466  complete="$FOUND_MAKE"
20467  path="${complete%% *}"
20468  tmp="$complete EOL"
20469  arguments="${tmp#* }"
20470
20471  # Input might be given as Windows format, start by converting to
20472  # unix format.
20473  new_path="$path"
20474
20475  windows_path="$new_path"
20476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20477    unix_path=`$CYGPATH -u "$windows_path"`
20478    new_path="$unix_path"
20479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20481    new_path="$unix_path"
20482  fi
20483
20484
20485  # Now try to locate executable using which
20486  new_path=`$WHICH "$new_path" 2> /dev/null`
20487
20488  if test "x$new_path" = x; then
20489    # Oops. Which didn't find the executable.
20490    # The splitting of arguments from the executable at a space might have been incorrect,
20491    # since paths with space are more likely in Windows. Give it another try with the whole
20492    # argument.
20493    path="$complete"
20494    arguments="EOL"
20495    new_path="$path"
20496
20497  windows_path="$new_path"
20498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20499    unix_path=`$CYGPATH -u "$windows_path"`
20500    new_path="$unix_path"
20501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20503    new_path="$unix_path"
20504  fi
20505
20506
20507    new_path=`$WHICH "$new_path" 2> /dev/null`
20508    # bat and cmd files are not always considered executable in MSYS causing which
20509    # to not find them
20510    if test "x$new_path" = x \
20511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20513      new_path="$path"
20514
20515  windows_path="$new_path"
20516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20517    unix_path=`$CYGPATH -u "$windows_path"`
20518    new_path="$unix_path"
20519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20521    new_path="$unix_path"
20522  fi
20523
20524    fi
20525
20526    if test "x$new_path" = x; then
20527      # It's still not found. Now this is an unrecoverable error.
20528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20529$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20530      has_space=`$ECHO "$complete" | $GREP " "`
20531      if test "x$has_space" != x; then
20532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20534      fi
20535      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20536    fi
20537  fi
20538
20539  # Now new_path has a complete unix path to the binary
20540  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20541    # Keep paths in /bin as-is, but remove trailing .exe if any
20542    new_path="${new_path/%.exe/}"
20543    # Do not save /bin paths to all_fixpath_prefixes!
20544  else
20545    # Not in mixed or Windows style, start by that.
20546    new_path=`cmd //c echo $new_path`
20547
20548  input_path="$new_path"
20549  # Check if we need to convert this using DOS-style short mode. If the path
20550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20551  # take no chances and rewrite it.
20552  # Note: m4 eats our [], so we need to use [ and ] instead.
20553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20554  if test "x$has_forbidden_chars" != x; then
20555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20557  fi
20558
20559    # Output is in $new_path
20560
20561  windows_path="$new_path"
20562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20563    unix_path=`$CYGPATH -u "$windows_path"`
20564    new_path="$unix_path"
20565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20567    new_path="$unix_path"
20568  fi
20569
20570    # remove trailing .exe if any
20571    new_path="${new_path/%.exe/}"
20572
20573    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20574    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20575  fi
20576
20577    else
20578      # We're on a unix platform. Hooray! :)
20579      # First separate the path from the arguments. This will split at the first
20580      # space.
20581      complete="$FOUND_MAKE"
20582      path="${complete%% *}"
20583      tmp="$complete EOL"
20584      arguments="${tmp#* }"
20585
20586      # Cannot rely on the command "which" here since it doesn't always work.
20587      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20588      if test -z "$is_absolute_path"; then
20589        # Path to executable is not absolute. Find it.
20590        IFS_save="$IFS"
20591        IFS=:
20592        for p in $PATH; do
20593          if test -f "$p/$path" && test -x "$p/$path"; then
20594            new_path="$p/$path"
20595            break
20596          fi
20597        done
20598        IFS="$IFS_save"
20599      else
20600        # This is an absolute path, we can use it without further modifications.
20601        new_path="$path"
20602      fi
20603
20604      if test "x$new_path" = x; then
20605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20606$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20607        has_space=`$ECHO "$complete" | $GREP " "`
20608        if test "x$has_space" != x; then
20609          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20610$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20611        fi
20612        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20613      fi
20614    fi
20615
20616    # Now join together the path and the arguments once again
20617    if test "x$arguments" != xEOL; then
20618      new_complete="$new_path ${arguments% *}"
20619    else
20620      new_complete="$new_path"
20621    fi
20622
20623    if test "x$complete" != "x$new_complete"; then
20624      FOUND_MAKE="$new_complete"
20625      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20626$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20627    fi
20628  fi
20629
20630        fi
20631      fi
20632    fi
20633  fi
20634
20635        fi
20636        PATH=$OLD_PATH
20637      fi
20638    fi
20639
20640    if test "x$FOUND_MAKE" = x; then
20641      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
20642    fi
20643
20644    else
20645      # If it succeeded, then it was overridden by the user. We will use it
20646      # for the tool.
20647
20648      # First remove it from the list of overridden variables, so we can test
20649      # for unknown variables in the end.
20650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20651
20652      # Check if we try to supply an empty value
20653      if test "x$MAKE" = x; then
20654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20655$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20657$as_echo_n "checking for MAKE... " >&6; }
20658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20659$as_echo "disabled" >&6; }
20660      else
20661        # Check if the provided tool contains a complete path.
20662        tool_specified="$MAKE"
20663        tool_basename="${tool_specified##*/}"
20664        if test "x$tool_basename" = "x$tool_specified"; then
20665          # A command without a complete path is provided, search $PATH.
20666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20667$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20668          # Extract the first word of "$tool_basename", so it can be a program name with args.
20669set dummy $tool_basename; ac_word=$2
20670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20671$as_echo_n "checking for $ac_word... " >&6; }
20672if ${ac_cv_path_MAKE+:} false; then :
20673  $as_echo_n "(cached) " >&6
20674else
20675  case $MAKE in
20676  [\\/]* | ?:[\\/]*)
20677  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20678  ;;
20679  *)
20680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20681for as_dir in $PATH
20682do
20683  IFS=$as_save_IFS
20684  test -z "$as_dir" && as_dir=.
20685    for ac_exec_ext in '' $ac_executable_extensions; do
20686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20687    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20689    break 2
20690  fi
20691done
20692  done
20693IFS=$as_save_IFS
20694
20695  ;;
20696esac
20697fi
20698MAKE=$ac_cv_path_MAKE
20699if test -n "$MAKE"; then
20700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20701$as_echo "$MAKE" >&6; }
20702else
20703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20704$as_echo "no" >&6; }
20705fi
20706
20707
20708          if test "x$MAKE" = x; then
20709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20710          fi
20711        else
20712          # Otherwise we believe it is a complete path. Use it as it is.
20713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20714$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20716$as_echo_n "checking for MAKE... " >&6; }
20717          if test ! -x "$tool_specified"; then
20718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20719$as_echo "not found" >&6; }
20720            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20721          fi
20722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20723$as_echo "$tool_specified" >&6; }
20724        fi
20725      fi
20726    fi
20727
20728    # If MAKE was set by user, verify the version
20729
20730  MAKE_CANDIDATE=""$MAKE""
20731  DESCRIPTION="user supplied MAKE=$MAKE"
20732
20733  # On Cygwin, we require a newer version of make than on other platforms
20734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20735    MAKE_VERSION_EXPR="-e 4\."
20736    MAKE_REQUIRED_VERSION="4.0"
20737   else
20738    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20739    MAKE_REQUIRED_VERSION="3.81"
20740  fi
20741
20742  if test "x$MAKE_CANDIDATE" != x; then
20743    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20744$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20745    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20746    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20747    if test "x$IS_GNU_MAKE" = x; then
20748      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20749$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20750    else
20751      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20752      if test "x$IS_MODERN_MAKE" = x; then
20753        { $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
20754$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;}
20755      else
20756        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20757          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20758            MAKE_EXPECTED_ENV='cygwin'
20759          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20760            MAKE_EXPECTED_ENV='msys'
20761          else
20762            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20763          fi
20764          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20765          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20766        else
20767          # Not relevant for non-Windows
20768          IS_MAKE_CORRECT_ENV=true
20769        fi
20770        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20771          { $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
20772$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;}
20773        else
20774          FOUND_MAKE=$MAKE_CANDIDATE
20775
20776  # Only process if variable expands to non-empty
20777
20778  if test "x$FOUND_MAKE" != x; then
20779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20780
20781  # First separate the path from the arguments. This will split at the first
20782  # space.
20783  complete="$FOUND_MAKE"
20784  path="${complete%% *}"
20785  tmp="$complete EOL"
20786  arguments="${tmp#* }"
20787
20788  # Input might be given as Windows format, start by converting to
20789  # unix format.
20790  new_path=`$CYGPATH -u "$path"`
20791
20792  # Now try to locate executable using which
20793  new_path=`$WHICH "$new_path" 2> /dev/null`
20794  # bat and cmd files are not always considered executable in cygwin causing which
20795  # to not find them
20796  if test "x$new_path" = x \
20797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20799    new_path=`$CYGPATH -u "$path"`
20800  fi
20801  if test "x$new_path" = x; then
20802    # Oops. Which didn't find the executable.
20803    # The splitting of arguments from the executable at a space might have been incorrect,
20804    # since paths with space are more likely in Windows. Give it another try with the whole
20805    # argument.
20806    path="$complete"
20807    arguments="EOL"
20808    new_path=`$CYGPATH -u "$path"`
20809    new_path=`$WHICH "$new_path" 2> /dev/null`
20810    # bat and cmd files are not always considered executable in cygwin causing which
20811    # to not find them
20812    if test "x$new_path" = x \
20813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20815      new_path=`$CYGPATH -u "$path"`
20816    fi
20817    if test "x$new_path" = x; then
20818      # It's still not found. Now this is an unrecoverable error.
20819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20820$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20821      has_space=`$ECHO "$complete" | $GREP " "`
20822      if test "x$has_space" != x; then
20823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20825      fi
20826      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20827    fi
20828  fi
20829
20830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20833  # "foo.exe" is OK but "foo" is an error.
20834  #
20835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20836  # It is also a way to make sure we got the proper file name for the real test later on.
20837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20838  if test "x$test_shortpath" = x; then
20839    # Short path failed, file does not exist as specified.
20840    # Try adding .exe or .cmd
20841    if test -f "${new_path}.exe"; then
20842      input_to_shortpath="${new_path}.exe"
20843    elif test -f "${new_path}.cmd"; then
20844      input_to_shortpath="${new_path}.cmd"
20845    else
20846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20847$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20850      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20851    fi
20852  else
20853    input_to_shortpath="$new_path"
20854  fi
20855
20856  # Call helper function which possibly converts this using DOS-style short mode.
20857  # If so, the updated path is stored in $new_path.
20858  new_path="$input_to_shortpath"
20859
20860  input_path="$input_to_shortpath"
20861  # Check if we need to convert this using DOS-style short mode. If the path
20862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20863  # take no chances and rewrite it.
20864  # Note: m4 eats our [], so we need to use [ and ] instead.
20865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20866  if test "x$has_forbidden_chars" != x; then
20867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20871      # Going to short mode and back again did indeed matter. Since short mode is
20872      # case insensitive, let's make it lowercase to improve readability.
20873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20874      # Now convert it back to Unix-style (cygpath)
20875      input_path=`$CYGPATH -u "$shortmode_path"`
20876      new_path="$input_path"
20877    fi
20878  fi
20879
20880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20881  if test "x$test_cygdrive_prefix" = x; then
20882    # As a simple fix, exclude /usr/bin since it's not a real path.
20883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20885      # a path prefixed by /cygdrive for fixpath to work.
20886      new_path="$CYGWIN_ROOT_PATH$input_path"
20887    fi
20888  fi
20889
20890  # remove trailing .exe if any
20891  new_path="${new_path/%.exe/}"
20892
20893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20894
20895  # First separate the path from the arguments. This will split at the first
20896  # space.
20897  complete="$FOUND_MAKE"
20898  path="${complete%% *}"
20899  tmp="$complete EOL"
20900  arguments="${tmp#* }"
20901
20902  # Input might be given as Windows format, start by converting to
20903  # unix format.
20904  new_path="$path"
20905
20906  windows_path="$new_path"
20907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20908    unix_path=`$CYGPATH -u "$windows_path"`
20909    new_path="$unix_path"
20910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20912    new_path="$unix_path"
20913  fi
20914
20915
20916  # Now try to locate executable using which
20917  new_path=`$WHICH "$new_path" 2> /dev/null`
20918
20919  if test "x$new_path" = x; then
20920    # Oops. Which didn't find the executable.
20921    # The splitting of arguments from the executable at a space might have been incorrect,
20922    # since paths with space are more likely in Windows. Give it another try with the whole
20923    # argument.
20924    path="$complete"
20925    arguments="EOL"
20926    new_path="$path"
20927
20928  windows_path="$new_path"
20929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20930    unix_path=`$CYGPATH -u "$windows_path"`
20931    new_path="$unix_path"
20932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20934    new_path="$unix_path"
20935  fi
20936
20937
20938    new_path=`$WHICH "$new_path" 2> /dev/null`
20939    # bat and cmd files are not always considered executable in MSYS causing which
20940    # to not find them
20941    if test "x$new_path" = x \
20942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20944      new_path="$path"
20945
20946  windows_path="$new_path"
20947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20948    unix_path=`$CYGPATH -u "$windows_path"`
20949    new_path="$unix_path"
20950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20952    new_path="$unix_path"
20953  fi
20954
20955    fi
20956
20957    if test "x$new_path" = x; then
20958      # It's still not found. Now this is an unrecoverable error.
20959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20960$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20961      has_space=`$ECHO "$complete" | $GREP " "`
20962      if test "x$has_space" != x; then
20963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20965      fi
20966      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20967    fi
20968  fi
20969
20970  # Now new_path has a complete unix path to the binary
20971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20972    # Keep paths in /bin as-is, but remove trailing .exe if any
20973    new_path="${new_path/%.exe/}"
20974    # Do not save /bin paths to all_fixpath_prefixes!
20975  else
20976    # Not in mixed or Windows style, start by that.
20977    new_path=`cmd //c echo $new_path`
20978
20979  input_path="$new_path"
20980  # Check if we need to convert this using DOS-style short mode. If the path
20981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20982  # take no chances and rewrite it.
20983  # Note: m4 eats our [], so we need to use [ and ] instead.
20984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20985  if test "x$has_forbidden_chars" != x; then
20986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20988  fi
20989
20990    # Output is in $new_path
20991
20992  windows_path="$new_path"
20993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20994    unix_path=`$CYGPATH -u "$windows_path"`
20995    new_path="$unix_path"
20996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20998    new_path="$unix_path"
20999  fi
21000
21001    # remove trailing .exe if any
21002    new_path="${new_path/%.exe/}"
21003
21004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21006  fi
21007
21008    else
21009      # We're on a unix platform. Hooray! :)
21010      # First separate the path from the arguments. This will split at the first
21011      # space.
21012      complete="$FOUND_MAKE"
21013      path="${complete%% *}"
21014      tmp="$complete EOL"
21015      arguments="${tmp#* }"
21016
21017      # Cannot rely on the command "which" here since it doesn't always work.
21018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21019      if test -z "$is_absolute_path"; then
21020        # Path to executable is not absolute. Find it.
21021        IFS_save="$IFS"
21022        IFS=:
21023        for p in $PATH; do
21024          if test -f "$p/$path" && test -x "$p/$path"; then
21025            new_path="$p/$path"
21026            break
21027          fi
21028        done
21029        IFS="$IFS_save"
21030      else
21031        # This is an absolute path, we can use it without further modifications.
21032        new_path="$path"
21033      fi
21034
21035      if test "x$new_path" = x; then
21036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21038        has_space=`$ECHO "$complete" | $GREP " "`
21039        if test "x$has_space" != x; then
21040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21042        fi
21043        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21044      fi
21045    fi
21046
21047    # Now join together the path and the arguments once again
21048    if test "x$arguments" != xEOL; then
21049      new_complete="$new_path ${arguments% *}"
21050    else
21051      new_complete="$new_path"
21052    fi
21053
21054    if test "x$complete" != "x$new_complete"; then
21055      FOUND_MAKE="$new_complete"
21056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21057$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21058    fi
21059  fi
21060
21061        fi
21062      fi
21063    fi
21064  fi
21065
21066    if test "x$FOUND_MAKE" = x; then
21067      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21068    fi
21069
21070  fi
21071
21072
21073  MAKE=$FOUND_MAKE
21074
21075  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21076$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21077
21078
21079  # Check if make supports the output sync option and if so, setup using it.
21080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21081$as_echo_n "checking if make --output-sync is supported... " >&6; }
21082  if $MAKE --version -O > /dev/null 2>&1; then
21083    OUTPUT_SYNC_SUPPORTED=true
21084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21085$as_echo "yes" >&6; }
21086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21087$as_echo_n "checking for output-sync value... " >&6; }
21088
21089# Check whether --with-output-sync was given.
21090if test "${with_output_sync+set}" = set; then :
21091  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21092fi
21093
21094    if test "x$OUTPUT_SYNC" = "x"; then
21095      OUTPUT_SYNC=none
21096    fi
21097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21098$as_echo "$OUTPUT_SYNC" >&6; }
21099    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21100      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21101    fi
21102  else
21103    OUTPUT_SYNC_SUPPORTED=false
21104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21105$as_echo "no" >&6; }
21106  fi
21107
21108
21109
21110
21111
21112
21113  # Test if find supports -delete
21114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21115$as_echo_n "checking if find supports -delete... " >&6; }
21116  FIND_DELETE="-delete"
21117
21118  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21119
21120  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21121
21122  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21123  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21124    # No, it does not.
21125    rm $DELETEDIR/TestIfFindSupportsDelete
21126    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21127      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21128      FIND_DELETE="-print | xargs rm"
21129    else
21130      FIND_DELETE="-exec rm \{\} \+"
21131    fi
21132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21133$as_echo "no" >&6; }
21134  else
21135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21136$as_echo "yes" >&6; }
21137  fi
21138  rmdir $DELETEDIR
21139
21140
21141
21142  # Test which kind of tar was found
21143  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21144    TAR_TYPE="gnu"
21145  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21146    TAR_TYPE="bsd"
21147  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21148    TAR_TYPE="solaris"
21149  fi
21150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21151$as_echo_n "checking what type of tar was found... " >&6; }
21152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21153$as_echo "$TAR_TYPE" >&6; }
21154
21155  if test "x$TAR_TYPE" = "xgnu"; then
21156    TAR_INCLUDE_PARAM="T"
21157    TAR_SUPPORTS_TRANSFORM="true"
21158  else
21159    TAR_INCLUDE_PARAM="I"
21160    TAR_SUPPORTS_TRANSFORM="false"
21161  fi
21162
21163
21164
21165
21166  # These tools might not be installed by default,
21167  # need hint on how to install them.
21168
21169
21170
21171  # Publish this variable in the help.
21172
21173
21174  if [ -z "${UNZIP+x}" ]; then
21175    # The variable is not set by user, try to locate tool using the code snippet
21176    for ac_prog in unzip
21177do
21178  # Extract the first word of "$ac_prog", so it can be a program name with args.
21179set dummy $ac_prog; ac_word=$2
21180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21181$as_echo_n "checking for $ac_word... " >&6; }
21182if ${ac_cv_path_UNZIP+:} false; then :
21183  $as_echo_n "(cached) " >&6
21184else
21185  case $UNZIP in
21186  [\\/]* | ?:[\\/]*)
21187  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21188  ;;
21189  *)
21190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21191for as_dir in $PATH
21192do
21193  IFS=$as_save_IFS
21194  test -z "$as_dir" && as_dir=.
21195    for ac_exec_ext in '' $ac_executable_extensions; do
21196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21197    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21199    break 2
21200  fi
21201done
21202  done
21203IFS=$as_save_IFS
21204
21205  ;;
21206esac
21207fi
21208UNZIP=$ac_cv_path_UNZIP
21209if test -n "$UNZIP"; then
21210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21211$as_echo "$UNZIP" >&6; }
21212else
21213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21214$as_echo "no" >&6; }
21215fi
21216
21217
21218  test -n "$UNZIP" && break
21219done
21220
21221  else
21222    # The variable is set, but is it from the command line or the environment?
21223
21224    # Try to remove the string !UNZIP! from our list.
21225    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21226    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21227      # If it failed, the variable was not from the command line. Ignore it,
21228      # but warn the user (except for BASH, which is always set by the calling BASH).
21229      if test "xUNZIP" != xBASH; then
21230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21231$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21232      fi
21233      # Try to locate tool using the code snippet
21234      for ac_prog in unzip
21235do
21236  # Extract the first word of "$ac_prog", so it can be a program name with args.
21237set dummy $ac_prog; ac_word=$2
21238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21239$as_echo_n "checking for $ac_word... " >&6; }
21240if ${ac_cv_path_UNZIP+:} false; then :
21241  $as_echo_n "(cached) " >&6
21242else
21243  case $UNZIP in
21244  [\\/]* | ?:[\\/]*)
21245  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21246  ;;
21247  *)
21248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21249for as_dir in $PATH
21250do
21251  IFS=$as_save_IFS
21252  test -z "$as_dir" && as_dir=.
21253    for ac_exec_ext in '' $ac_executable_extensions; do
21254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21255    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21257    break 2
21258  fi
21259done
21260  done
21261IFS=$as_save_IFS
21262
21263  ;;
21264esac
21265fi
21266UNZIP=$ac_cv_path_UNZIP
21267if test -n "$UNZIP"; then
21268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21269$as_echo "$UNZIP" >&6; }
21270else
21271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21272$as_echo "no" >&6; }
21273fi
21274
21275
21276  test -n "$UNZIP" && break
21277done
21278
21279    else
21280      # If it succeeded, then it was overridden by the user. We will use it
21281      # for the tool.
21282
21283      # First remove it from the list of overridden variables, so we can test
21284      # for unknown variables in the end.
21285      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21286
21287      # Check if we try to supply an empty value
21288      if test "x$UNZIP" = x; then
21289        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21290$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21292$as_echo_n "checking for UNZIP... " >&6; }
21293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21294$as_echo "disabled" >&6; }
21295      else
21296        # Check if the provided tool contains a complete path.
21297        tool_specified="$UNZIP"
21298        tool_basename="${tool_specified##*/}"
21299        if test "x$tool_basename" = "x$tool_specified"; then
21300          # A command without a complete path is provided, search $PATH.
21301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21302$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21303          # Extract the first word of "$tool_basename", so it can be a program name with args.
21304set dummy $tool_basename; ac_word=$2
21305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21306$as_echo_n "checking for $ac_word... " >&6; }
21307if ${ac_cv_path_UNZIP+:} false; then :
21308  $as_echo_n "(cached) " >&6
21309else
21310  case $UNZIP in
21311  [\\/]* | ?:[\\/]*)
21312  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21313  ;;
21314  *)
21315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21316for as_dir in $PATH
21317do
21318  IFS=$as_save_IFS
21319  test -z "$as_dir" && as_dir=.
21320    for ac_exec_ext in '' $ac_executable_extensions; do
21321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21322    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21324    break 2
21325  fi
21326done
21327  done
21328IFS=$as_save_IFS
21329
21330  ;;
21331esac
21332fi
21333UNZIP=$ac_cv_path_UNZIP
21334if test -n "$UNZIP"; then
21335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21336$as_echo "$UNZIP" >&6; }
21337else
21338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21339$as_echo "no" >&6; }
21340fi
21341
21342
21343          if test "x$UNZIP" = x; then
21344            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21345          fi
21346        else
21347          # Otherwise we believe it is a complete path. Use it as it is.
21348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21349$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21350          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21351$as_echo_n "checking for UNZIP... " >&6; }
21352          if test ! -x "$tool_specified"; then
21353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21354$as_echo "not found" >&6; }
21355            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21356          fi
21357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21358$as_echo "$tool_specified" >&6; }
21359        fi
21360      fi
21361    fi
21362
21363  fi
21364
21365
21366
21367  if test "x$UNZIP" = x; then
21368    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21369  fi
21370
21371
21372
21373
21374
21375  # Publish this variable in the help.
21376
21377
21378  if [ -z "${ZIP+x}" ]; then
21379    # The variable is not set by user, try to locate tool using the code snippet
21380    for ac_prog in zip
21381do
21382  # Extract the first word of "$ac_prog", so it can be a program name with args.
21383set dummy $ac_prog; ac_word=$2
21384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21385$as_echo_n "checking for $ac_word... " >&6; }
21386if ${ac_cv_path_ZIP+:} false; then :
21387  $as_echo_n "(cached) " >&6
21388else
21389  case $ZIP in
21390  [\\/]* | ?:[\\/]*)
21391  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21392  ;;
21393  *)
21394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21395for as_dir in $PATH
21396do
21397  IFS=$as_save_IFS
21398  test -z "$as_dir" && as_dir=.
21399    for ac_exec_ext in '' $ac_executable_extensions; do
21400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21401    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21403    break 2
21404  fi
21405done
21406  done
21407IFS=$as_save_IFS
21408
21409  ;;
21410esac
21411fi
21412ZIP=$ac_cv_path_ZIP
21413if test -n "$ZIP"; then
21414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21415$as_echo "$ZIP" >&6; }
21416else
21417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21418$as_echo "no" >&6; }
21419fi
21420
21421
21422  test -n "$ZIP" && break
21423done
21424
21425  else
21426    # The variable is set, but is it from the command line or the environment?
21427
21428    # Try to remove the string !ZIP! from our list.
21429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21431      # If it failed, the variable was not from the command line. Ignore it,
21432      # but warn the user (except for BASH, which is always set by the calling BASH).
21433      if test "xZIP" != xBASH; then
21434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21435$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21436      fi
21437      # Try to locate tool using the code snippet
21438      for ac_prog in zip
21439do
21440  # Extract the first word of "$ac_prog", so it can be a program name with args.
21441set dummy $ac_prog; ac_word=$2
21442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21443$as_echo_n "checking for $ac_word... " >&6; }
21444if ${ac_cv_path_ZIP+:} false; then :
21445  $as_echo_n "(cached) " >&6
21446else
21447  case $ZIP in
21448  [\\/]* | ?:[\\/]*)
21449  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21450  ;;
21451  *)
21452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21453for as_dir in $PATH
21454do
21455  IFS=$as_save_IFS
21456  test -z "$as_dir" && as_dir=.
21457    for ac_exec_ext in '' $ac_executable_extensions; do
21458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21459    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21461    break 2
21462  fi
21463done
21464  done
21465IFS=$as_save_IFS
21466
21467  ;;
21468esac
21469fi
21470ZIP=$ac_cv_path_ZIP
21471if test -n "$ZIP"; then
21472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21473$as_echo "$ZIP" >&6; }
21474else
21475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21476$as_echo "no" >&6; }
21477fi
21478
21479
21480  test -n "$ZIP" && break
21481done
21482
21483    else
21484      # If it succeeded, then it was overridden by the user. We will use it
21485      # for the tool.
21486
21487      # First remove it from the list of overridden variables, so we can test
21488      # for unknown variables in the end.
21489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21490
21491      # Check if we try to supply an empty value
21492      if test "x$ZIP" = x; then
21493        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21494$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21496$as_echo_n "checking for ZIP... " >&6; }
21497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21498$as_echo "disabled" >&6; }
21499      else
21500        # Check if the provided tool contains a complete path.
21501        tool_specified="$ZIP"
21502        tool_basename="${tool_specified##*/}"
21503        if test "x$tool_basename" = "x$tool_specified"; then
21504          # A command without a complete path is provided, search $PATH.
21505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21506$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21507          # Extract the first word of "$tool_basename", so it can be a program name with args.
21508set dummy $tool_basename; ac_word=$2
21509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21510$as_echo_n "checking for $ac_word... " >&6; }
21511if ${ac_cv_path_ZIP+:} false; then :
21512  $as_echo_n "(cached) " >&6
21513else
21514  case $ZIP in
21515  [\\/]* | ?:[\\/]*)
21516  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21517  ;;
21518  *)
21519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21520for as_dir in $PATH
21521do
21522  IFS=$as_save_IFS
21523  test -z "$as_dir" && as_dir=.
21524    for ac_exec_ext in '' $ac_executable_extensions; do
21525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21526    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21528    break 2
21529  fi
21530done
21531  done
21532IFS=$as_save_IFS
21533
21534  ;;
21535esac
21536fi
21537ZIP=$ac_cv_path_ZIP
21538if test -n "$ZIP"; then
21539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21540$as_echo "$ZIP" >&6; }
21541else
21542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21543$as_echo "no" >&6; }
21544fi
21545
21546
21547          if test "x$ZIP" = x; then
21548            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21549          fi
21550        else
21551          # Otherwise we believe it is a complete path. Use it as it is.
21552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21553$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21554          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21555$as_echo_n "checking for ZIP... " >&6; }
21556          if test ! -x "$tool_specified"; then
21557            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21558$as_echo "not found" >&6; }
21559            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21560          fi
21561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21562$as_echo "$tool_specified" >&6; }
21563        fi
21564      fi
21565    fi
21566
21567  fi
21568
21569
21570
21571  if test "x$ZIP" = x; then
21572    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21573  fi
21574
21575
21576
21577  # Non-required basic tools
21578
21579
21580
21581  # Publish this variable in the help.
21582
21583
21584  if [ -z "${LDD+x}" ]; then
21585    # The variable is not set by user, try to locate tool using the code snippet
21586    for ac_prog in ldd
21587do
21588  # Extract the first word of "$ac_prog", so it can be a program name with args.
21589set dummy $ac_prog; ac_word=$2
21590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21591$as_echo_n "checking for $ac_word... " >&6; }
21592if ${ac_cv_path_LDD+:} false; then :
21593  $as_echo_n "(cached) " >&6
21594else
21595  case $LDD in
21596  [\\/]* | ?:[\\/]*)
21597  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21598  ;;
21599  *)
21600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21601for as_dir in $PATH
21602do
21603  IFS=$as_save_IFS
21604  test -z "$as_dir" && as_dir=.
21605    for ac_exec_ext in '' $ac_executable_extensions; do
21606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21607    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21609    break 2
21610  fi
21611done
21612  done
21613IFS=$as_save_IFS
21614
21615  ;;
21616esac
21617fi
21618LDD=$ac_cv_path_LDD
21619if test -n "$LDD"; then
21620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21621$as_echo "$LDD" >&6; }
21622else
21623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21624$as_echo "no" >&6; }
21625fi
21626
21627
21628  test -n "$LDD" && break
21629done
21630
21631  else
21632    # The variable is set, but is it from the command line or the environment?
21633
21634    # Try to remove the string !LDD! from our list.
21635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21637      # If it failed, the variable was not from the command line. Ignore it,
21638      # but warn the user (except for BASH, which is always set by the calling BASH).
21639      if test "xLDD" != xBASH; then
21640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21641$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21642      fi
21643      # Try to locate tool using the code snippet
21644      for ac_prog in ldd
21645do
21646  # Extract the first word of "$ac_prog", so it can be a program name with args.
21647set dummy $ac_prog; ac_word=$2
21648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21649$as_echo_n "checking for $ac_word... " >&6; }
21650if ${ac_cv_path_LDD+:} false; then :
21651  $as_echo_n "(cached) " >&6
21652else
21653  case $LDD in
21654  [\\/]* | ?:[\\/]*)
21655  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21656  ;;
21657  *)
21658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21659for as_dir in $PATH
21660do
21661  IFS=$as_save_IFS
21662  test -z "$as_dir" && as_dir=.
21663    for ac_exec_ext in '' $ac_executable_extensions; do
21664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21665    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21667    break 2
21668  fi
21669done
21670  done
21671IFS=$as_save_IFS
21672
21673  ;;
21674esac
21675fi
21676LDD=$ac_cv_path_LDD
21677if test -n "$LDD"; then
21678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21679$as_echo "$LDD" >&6; }
21680else
21681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21682$as_echo "no" >&6; }
21683fi
21684
21685
21686  test -n "$LDD" && break
21687done
21688
21689    else
21690      # If it succeeded, then it was overridden by the user. We will use it
21691      # for the tool.
21692
21693      # First remove it from the list of overridden variables, so we can test
21694      # for unknown variables in the end.
21695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21696
21697      # Check if we try to supply an empty value
21698      if test "x$LDD" = x; then
21699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21700$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21702$as_echo_n "checking for LDD... " >&6; }
21703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21704$as_echo "disabled" >&6; }
21705      else
21706        # Check if the provided tool contains a complete path.
21707        tool_specified="$LDD"
21708        tool_basename="${tool_specified##*/}"
21709        if test "x$tool_basename" = "x$tool_specified"; then
21710          # A command without a complete path is provided, search $PATH.
21711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21712$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21713          # Extract the first word of "$tool_basename", so it can be a program name with args.
21714set dummy $tool_basename; ac_word=$2
21715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21716$as_echo_n "checking for $ac_word... " >&6; }
21717if ${ac_cv_path_LDD+:} false; then :
21718  $as_echo_n "(cached) " >&6
21719else
21720  case $LDD in
21721  [\\/]* | ?:[\\/]*)
21722  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21723  ;;
21724  *)
21725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21726for as_dir in $PATH
21727do
21728  IFS=$as_save_IFS
21729  test -z "$as_dir" && as_dir=.
21730    for ac_exec_ext in '' $ac_executable_extensions; do
21731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21732    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21734    break 2
21735  fi
21736done
21737  done
21738IFS=$as_save_IFS
21739
21740  ;;
21741esac
21742fi
21743LDD=$ac_cv_path_LDD
21744if test -n "$LDD"; then
21745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21746$as_echo "$LDD" >&6; }
21747else
21748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21749$as_echo "no" >&6; }
21750fi
21751
21752
21753          if test "x$LDD" = x; then
21754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21755          fi
21756        else
21757          # Otherwise we believe it is a complete path. Use it as it is.
21758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21759$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21761$as_echo_n "checking for LDD... " >&6; }
21762          if test ! -x "$tool_specified"; then
21763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21764$as_echo "not found" >&6; }
21765            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21766          fi
21767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21768$as_echo "$tool_specified" >&6; }
21769        fi
21770      fi
21771    fi
21772
21773  fi
21774
21775
21776  if test "x$LDD" = "x"; then
21777    # List shared lib dependencies is used for
21778    # debug output and checking for forbidden dependencies.
21779    # We can build without it.
21780    LDD="true"
21781  fi
21782
21783
21784  # Publish this variable in the help.
21785
21786
21787  if [ -z "${OTOOL+x}" ]; then
21788    # The variable is not set by user, try to locate tool using the code snippet
21789    for ac_prog in otool
21790do
21791  # Extract the first word of "$ac_prog", so it can be a program name with args.
21792set dummy $ac_prog; ac_word=$2
21793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21794$as_echo_n "checking for $ac_word... " >&6; }
21795if ${ac_cv_path_OTOOL+:} false; then :
21796  $as_echo_n "(cached) " >&6
21797else
21798  case $OTOOL in
21799  [\\/]* | ?:[\\/]*)
21800  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21801  ;;
21802  *)
21803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21804for as_dir in $PATH
21805do
21806  IFS=$as_save_IFS
21807  test -z "$as_dir" && as_dir=.
21808    for ac_exec_ext in '' $ac_executable_extensions; do
21809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21810    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21812    break 2
21813  fi
21814done
21815  done
21816IFS=$as_save_IFS
21817
21818  ;;
21819esac
21820fi
21821OTOOL=$ac_cv_path_OTOOL
21822if test -n "$OTOOL"; then
21823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21824$as_echo "$OTOOL" >&6; }
21825else
21826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21827$as_echo "no" >&6; }
21828fi
21829
21830
21831  test -n "$OTOOL" && break
21832done
21833
21834  else
21835    # The variable is set, but is it from the command line or the environment?
21836
21837    # Try to remove the string !OTOOL! from our list.
21838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21840      # If it failed, the variable was not from the command line. Ignore it,
21841      # but warn the user (except for BASH, which is always set by the calling BASH).
21842      if test "xOTOOL" != xBASH; then
21843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21844$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21845      fi
21846      # Try to locate tool using the code snippet
21847      for ac_prog in otool
21848do
21849  # Extract the first word of "$ac_prog", so it can be a program name with args.
21850set dummy $ac_prog; ac_word=$2
21851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21852$as_echo_n "checking for $ac_word... " >&6; }
21853if ${ac_cv_path_OTOOL+:} false; then :
21854  $as_echo_n "(cached) " >&6
21855else
21856  case $OTOOL in
21857  [\\/]* | ?:[\\/]*)
21858  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21859  ;;
21860  *)
21861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21862for as_dir in $PATH
21863do
21864  IFS=$as_save_IFS
21865  test -z "$as_dir" && as_dir=.
21866    for ac_exec_ext in '' $ac_executable_extensions; do
21867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21868    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21870    break 2
21871  fi
21872done
21873  done
21874IFS=$as_save_IFS
21875
21876  ;;
21877esac
21878fi
21879OTOOL=$ac_cv_path_OTOOL
21880if test -n "$OTOOL"; then
21881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21882$as_echo "$OTOOL" >&6; }
21883else
21884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21885$as_echo "no" >&6; }
21886fi
21887
21888
21889  test -n "$OTOOL" && break
21890done
21891
21892    else
21893      # If it succeeded, then it was overridden by the user. We will use it
21894      # for the tool.
21895
21896      # First remove it from the list of overridden variables, so we can test
21897      # for unknown variables in the end.
21898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21899
21900      # Check if we try to supply an empty value
21901      if test "x$OTOOL" = x; then
21902        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21903$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21905$as_echo_n "checking for OTOOL... " >&6; }
21906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21907$as_echo "disabled" >&6; }
21908      else
21909        # Check if the provided tool contains a complete path.
21910        tool_specified="$OTOOL"
21911        tool_basename="${tool_specified##*/}"
21912        if test "x$tool_basename" = "x$tool_specified"; then
21913          # A command without a complete path is provided, search $PATH.
21914          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21915$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21916          # Extract the first word of "$tool_basename", so it can be a program name with args.
21917set dummy $tool_basename; ac_word=$2
21918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21919$as_echo_n "checking for $ac_word... " >&6; }
21920if ${ac_cv_path_OTOOL+:} false; then :
21921  $as_echo_n "(cached) " >&6
21922else
21923  case $OTOOL in
21924  [\\/]* | ?:[\\/]*)
21925  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21926  ;;
21927  *)
21928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21929for as_dir in $PATH
21930do
21931  IFS=$as_save_IFS
21932  test -z "$as_dir" && as_dir=.
21933    for ac_exec_ext in '' $ac_executable_extensions; do
21934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21935    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21937    break 2
21938  fi
21939done
21940  done
21941IFS=$as_save_IFS
21942
21943  ;;
21944esac
21945fi
21946OTOOL=$ac_cv_path_OTOOL
21947if test -n "$OTOOL"; then
21948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21949$as_echo "$OTOOL" >&6; }
21950else
21951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21952$as_echo "no" >&6; }
21953fi
21954
21955
21956          if test "x$OTOOL" = x; then
21957            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21958          fi
21959        else
21960          # Otherwise we believe it is a complete path. Use it as it is.
21961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21962$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21963          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21964$as_echo_n "checking for OTOOL... " >&6; }
21965          if test ! -x "$tool_specified"; then
21966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21967$as_echo "not found" >&6; }
21968            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21969          fi
21970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21971$as_echo "$tool_specified" >&6; }
21972        fi
21973      fi
21974    fi
21975
21976  fi
21977
21978
21979  if test "x$OTOOL" = "x"; then
21980    OTOOL="true"
21981  fi
21982
21983
21984  # Publish this variable in the help.
21985
21986
21987  if [ -z "${READELF+x}" ]; then
21988    # The variable is not set by user, try to locate tool using the code snippet
21989    for ac_prog in greadelf readelf
21990do
21991  # Extract the first word of "$ac_prog", so it can be a program name with args.
21992set dummy $ac_prog; ac_word=$2
21993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21994$as_echo_n "checking for $ac_word... " >&6; }
21995if ${ac_cv_path_READELF+:} false; then :
21996  $as_echo_n "(cached) " >&6
21997else
21998  case $READELF in
21999  [\\/]* | ?:[\\/]*)
22000  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22001  ;;
22002  *)
22003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22004for as_dir in $PATH
22005do
22006  IFS=$as_save_IFS
22007  test -z "$as_dir" && as_dir=.
22008    for ac_exec_ext in '' $ac_executable_extensions; do
22009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22010    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22012    break 2
22013  fi
22014done
22015  done
22016IFS=$as_save_IFS
22017
22018  ;;
22019esac
22020fi
22021READELF=$ac_cv_path_READELF
22022if test -n "$READELF"; then
22023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22024$as_echo "$READELF" >&6; }
22025else
22026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22027$as_echo "no" >&6; }
22028fi
22029
22030
22031  test -n "$READELF" && break
22032done
22033
22034  else
22035    # The variable is set, but is it from the command line or the environment?
22036
22037    # Try to remove the string !READELF! from our list.
22038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22040      # If it failed, the variable was not from the command line. Ignore it,
22041      # but warn the user (except for BASH, which is always set by the calling BASH).
22042      if test "xREADELF" != xBASH; then
22043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22044$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22045      fi
22046      # Try to locate tool using the code snippet
22047      for ac_prog in greadelf readelf
22048do
22049  # Extract the first word of "$ac_prog", so it can be a program name with args.
22050set dummy $ac_prog; ac_word=$2
22051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22052$as_echo_n "checking for $ac_word... " >&6; }
22053if ${ac_cv_path_READELF+:} false; then :
22054  $as_echo_n "(cached) " >&6
22055else
22056  case $READELF in
22057  [\\/]* | ?:[\\/]*)
22058  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22059  ;;
22060  *)
22061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22062for as_dir in $PATH
22063do
22064  IFS=$as_save_IFS
22065  test -z "$as_dir" && as_dir=.
22066    for ac_exec_ext in '' $ac_executable_extensions; do
22067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22068    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22070    break 2
22071  fi
22072done
22073  done
22074IFS=$as_save_IFS
22075
22076  ;;
22077esac
22078fi
22079READELF=$ac_cv_path_READELF
22080if test -n "$READELF"; then
22081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22082$as_echo "$READELF" >&6; }
22083else
22084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22085$as_echo "no" >&6; }
22086fi
22087
22088
22089  test -n "$READELF" && break
22090done
22091
22092    else
22093      # If it succeeded, then it was overridden by the user. We will use it
22094      # for the tool.
22095
22096      # First remove it from the list of overridden variables, so we can test
22097      # for unknown variables in the end.
22098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22099
22100      # Check if we try to supply an empty value
22101      if test "x$READELF" = x; then
22102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22103$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22105$as_echo_n "checking for READELF... " >&6; }
22106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22107$as_echo "disabled" >&6; }
22108      else
22109        # Check if the provided tool contains a complete path.
22110        tool_specified="$READELF"
22111        tool_basename="${tool_specified##*/}"
22112        if test "x$tool_basename" = "x$tool_specified"; then
22113          # A command without a complete path is provided, search $PATH.
22114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22115$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22116          # Extract the first word of "$tool_basename", so it can be a program name with args.
22117set dummy $tool_basename; ac_word=$2
22118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22119$as_echo_n "checking for $ac_word... " >&6; }
22120if ${ac_cv_path_READELF+:} false; then :
22121  $as_echo_n "(cached) " >&6
22122else
22123  case $READELF in
22124  [\\/]* | ?:[\\/]*)
22125  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22126  ;;
22127  *)
22128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22129for as_dir in $PATH
22130do
22131  IFS=$as_save_IFS
22132  test -z "$as_dir" && as_dir=.
22133    for ac_exec_ext in '' $ac_executable_extensions; do
22134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22135    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22137    break 2
22138  fi
22139done
22140  done
22141IFS=$as_save_IFS
22142
22143  ;;
22144esac
22145fi
22146READELF=$ac_cv_path_READELF
22147if test -n "$READELF"; then
22148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22149$as_echo "$READELF" >&6; }
22150else
22151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22152$as_echo "no" >&6; }
22153fi
22154
22155
22156          if test "x$READELF" = x; then
22157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22158          fi
22159        else
22160          # Otherwise we believe it is a complete path. Use it as it is.
22161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22162$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22164$as_echo_n "checking for READELF... " >&6; }
22165          if test ! -x "$tool_specified"; then
22166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22167$as_echo "not found" >&6; }
22168            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22169          fi
22170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22171$as_echo "$tool_specified" >&6; }
22172        fi
22173      fi
22174    fi
22175
22176  fi
22177
22178
22179
22180
22181  # Publish this variable in the help.
22182
22183
22184  if [ -z "${HG+x}" ]; then
22185    # The variable is not set by user, try to locate tool using the code snippet
22186    for ac_prog in hg
22187do
22188  # Extract the first word of "$ac_prog", so it can be a program name with args.
22189set dummy $ac_prog; ac_word=$2
22190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22191$as_echo_n "checking for $ac_word... " >&6; }
22192if ${ac_cv_path_HG+:} false; then :
22193  $as_echo_n "(cached) " >&6
22194else
22195  case $HG in
22196  [\\/]* | ?:[\\/]*)
22197  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22198  ;;
22199  *)
22200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22201for as_dir in $PATH
22202do
22203  IFS=$as_save_IFS
22204  test -z "$as_dir" && as_dir=.
22205    for ac_exec_ext in '' $ac_executable_extensions; do
22206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22207    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22209    break 2
22210  fi
22211done
22212  done
22213IFS=$as_save_IFS
22214
22215  ;;
22216esac
22217fi
22218HG=$ac_cv_path_HG
22219if test -n "$HG"; then
22220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22221$as_echo "$HG" >&6; }
22222else
22223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22224$as_echo "no" >&6; }
22225fi
22226
22227
22228  test -n "$HG" && break
22229done
22230
22231  else
22232    # The variable is set, but is it from the command line or the environment?
22233
22234    # Try to remove the string !HG! from our list.
22235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22237      # If it failed, the variable was not from the command line. Ignore it,
22238      # but warn the user (except for BASH, which is always set by the calling BASH).
22239      if test "xHG" != xBASH; then
22240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22241$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22242      fi
22243      # Try to locate tool using the code snippet
22244      for ac_prog in hg
22245do
22246  # Extract the first word of "$ac_prog", so it can be a program name with args.
22247set dummy $ac_prog; ac_word=$2
22248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22249$as_echo_n "checking for $ac_word... " >&6; }
22250if ${ac_cv_path_HG+:} false; then :
22251  $as_echo_n "(cached) " >&6
22252else
22253  case $HG in
22254  [\\/]* | ?:[\\/]*)
22255  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22256  ;;
22257  *)
22258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22259for as_dir in $PATH
22260do
22261  IFS=$as_save_IFS
22262  test -z "$as_dir" && as_dir=.
22263    for ac_exec_ext in '' $ac_executable_extensions; do
22264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22265    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22267    break 2
22268  fi
22269done
22270  done
22271IFS=$as_save_IFS
22272
22273  ;;
22274esac
22275fi
22276HG=$ac_cv_path_HG
22277if test -n "$HG"; then
22278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22279$as_echo "$HG" >&6; }
22280else
22281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22282$as_echo "no" >&6; }
22283fi
22284
22285
22286  test -n "$HG" && break
22287done
22288
22289    else
22290      # If it succeeded, then it was overridden by the user. We will use it
22291      # for the tool.
22292
22293      # First remove it from the list of overridden variables, so we can test
22294      # for unknown variables in the end.
22295      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22296
22297      # Check if we try to supply an empty value
22298      if test "x$HG" = x; then
22299        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22300$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22302$as_echo_n "checking for HG... " >&6; }
22303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22304$as_echo "disabled" >&6; }
22305      else
22306        # Check if the provided tool contains a complete path.
22307        tool_specified="$HG"
22308        tool_basename="${tool_specified##*/}"
22309        if test "x$tool_basename" = "x$tool_specified"; then
22310          # A command without a complete path is provided, search $PATH.
22311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22312$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22313          # Extract the first word of "$tool_basename", so it can be a program name with args.
22314set dummy $tool_basename; ac_word=$2
22315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22316$as_echo_n "checking for $ac_word... " >&6; }
22317if ${ac_cv_path_HG+:} false; then :
22318  $as_echo_n "(cached) " >&6
22319else
22320  case $HG in
22321  [\\/]* | ?:[\\/]*)
22322  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22323  ;;
22324  *)
22325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22326for as_dir in $PATH
22327do
22328  IFS=$as_save_IFS
22329  test -z "$as_dir" && as_dir=.
22330    for ac_exec_ext in '' $ac_executable_extensions; do
22331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22332    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22334    break 2
22335  fi
22336done
22337  done
22338IFS=$as_save_IFS
22339
22340  ;;
22341esac
22342fi
22343HG=$ac_cv_path_HG
22344if test -n "$HG"; then
22345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22346$as_echo "$HG" >&6; }
22347else
22348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22349$as_echo "no" >&6; }
22350fi
22351
22352
22353          if test "x$HG" = x; then
22354            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22355          fi
22356        else
22357          # Otherwise we believe it is a complete path. Use it as it is.
22358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22359$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22360          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22361$as_echo_n "checking for HG... " >&6; }
22362          if test ! -x "$tool_specified"; then
22363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22364$as_echo "not found" >&6; }
22365            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22366          fi
22367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22368$as_echo "$tool_specified" >&6; }
22369        fi
22370      fi
22371    fi
22372
22373  fi
22374
22375
22376
22377
22378  # Publish this variable in the help.
22379
22380
22381  if [ -z "${STAT+x}" ]; then
22382    # The variable is not set by user, try to locate tool using the code snippet
22383    for ac_prog in stat
22384do
22385  # Extract the first word of "$ac_prog", so it can be a program name with args.
22386set dummy $ac_prog; ac_word=$2
22387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22388$as_echo_n "checking for $ac_word... " >&6; }
22389if ${ac_cv_path_STAT+:} false; then :
22390  $as_echo_n "(cached) " >&6
22391else
22392  case $STAT in
22393  [\\/]* | ?:[\\/]*)
22394  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22395  ;;
22396  *)
22397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22398for as_dir in $PATH
22399do
22400  IFS=$as_save_IFS
22401  test -z "$as_dir" && as_dir=.
22402    for ac_exec_ext in '' $ac_executable_extensions; do
22403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22404    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22406    break 2
22407  fi
22408done
22409  done
22410IFS=$as_save_IFS
22411
22412  ;;
22413esac
22414fi
22415STAT=$ac_cv_path_STAT
22416if test -n "$STAT"; then
22417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22418$as_echo "$STAT" >&6; }
22419else
22420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22421$as_echo "no" >&6; }
22422fi
22423
22424
22425  test -n "$STAT" && break
22426done
22427
22428  else
22429    # The variable is set, but is it from the command line or the environment?
22430
22431    # Try to remove the string !STAT! from our list.
22432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22434      # If it failed, the variable was not from the command line. Ignore it,
22435      # but warn the user (except for BASH, which is always set by the calling BASH).
22436      if test "xSTAT" != xBASH; then
22437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22438$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22439      fi
22440      # Try to locate tool using the code snippet
22441      for ac_prog in stat
22442do
22443  # Extract the first word of "$ac_prog", so it can be a program name with args.
22444set dummy $ac_prog; ac_word=$2
22445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22446$as_echo_n "checking for $ac_word... " >&6; }
22447if ${ac_cv_path_STAT+:} false; then :
22448  $as_echo_n "(cached) " >&6
22449else
22450  case $STAT in
22451  [\\/]* | ?:[\\/]*)
22452  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22453  ;;
22454  *)
22455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22456for as_dir in $PATH
22457do
22458  IFS=$as_save_IFS
22459  test -z "$as_dir" && as_dir=.
22460    for ac_exec_ext in '' $ac_executable_extensions; do
22461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22462    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22464    break 2
22465  fi
22466done
22467  done
22468IFS=$as_save_IFS
22469
22470  ;;
22471esac
22472fi
22473STAT=$ac_cv_path_STAT
22474if test -n "$STAT"; then
22475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22476$as_echo "$STAT" >&6; }
22477else
22478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22479$as_echo "no" >&6; }
22480fi
22481
22482
22483  test -n "$STAT" && break
22484done
22485
22486    else
22487      # If it succeeded, then it was overridden by the user. We will use it
22488      # for the tool.
22489
22490      # First remove it from the list of overridden variables, so we can test
22491      # for unknown variables in the end.
22492      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22493
22494      # Check if we try to supply an empty value
22495      if test "x$STAT" = x; then
22496        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22497$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22499$as_echo_n "checking for STAT... " >&6; }
22500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22501$as_echo "disabled" >&6; }
22502      else
22503        # Check if the provided tool contains a complete path.
22504        tool_specified="$STAT"
22505        tool_basename="${tool_specified##*/}"
22506        if test "x$tool_basename" = "x$tool_specified"; then
22507          # A command without a complete path is provided, search $PATH.
22508          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22509$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22510          # Extract the first word of "$tool_basename", so it can be a program name with args.
22511set dummy $tool_basename; ac_word=$2
22512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22513$as_echo_n "checking for $ac_word... " >&6; }
22514if ${ac_cv_path_STAT+:} false; then :
22515  $as_echo_n "(cached) " >&6
22516else
22517  case $STAT in
22518  [\\/]* | ?:[\\/]*)
22519  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22520  ;;
22521  *)
22522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22523for as_dir in $PATH
22524do
22525  IFS=$as_save_IFS
22526  test -z "$as_dir" && as_dir=.
22527    for ac_exec_ext in '' $ac_executable_extensions; do
22528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22529    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22531    break 2
22532  fi
22533done
22534  done
22535IFS=$as_save_IFS
22536
22537  ;;
22538esac
22539fi
22540STAT=$ac_cv_path_STAT
22541if test -n "$STAT"; then
22542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22543$as_echo "$STAT" >&6; }
22544else
22545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22546$as_echo "no" >&6; }
22547fi
22548
22549
22550          if test "x$STAT" = x; then
22551            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22552          fi
22553        else
22554          # Otherwise we believe it is a complete path. Use it as it is.
22555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22556$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22557          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22558$as_echo_n "checking for STAT... " >&6; }
22559          if test ! -x "$tool_specified"; then
22560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22561$as_echo "not found" >&6; }
22562            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22563          fi
22564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22565$as_echo "$tool_specified" >&6; }
22566        fi
22567      fi
22568    fi
22569
22570  fi
22571
22572
22573
22574
22575  # Publish this variable in the help.
22576
22577
22578  if [ -z "${TIME+x}" ]; then
22579    # The variable is not set by user, try to locate tool using the code snippet
22580    for ac_prog in time
22581do
22582  # Extract the first word of "$ac_prog", so it can be a program name with args.
22583set dummy $ac_prog; ac_word=$2
22584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22585$as_echo_n "checking for $ac_word... " >&6; }
22586if ${ac_cv_path_TIME+:} false; then :
22587  $as_echo_n "(cached) " >&6
22588else
22589  case $TIME in
22590  [\\/]* | ?:[\\/]*)
22591  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22592  ;;
22593  *)
22594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22595for as_dir in $PATH
22596do
22597  IFS=$as_save_IFS
22598  test -z "$as_dir" && as_dir=.
22599    for ac_exec_ext in '' $ac_executable_extensions; do
22600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22601    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22603    break 2
22604  fi
22605done
22606  done
22607IFS=$as_save_IFS
22608
22609  ;;
22610esac
22611fi
22612TIME=$ac_cv_path_TIME
22613if test -n "$TIME"; then
22614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22615$as_echo "$TIME" >&6; }
22616else
22617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22618$as_echo "no" >&6; }
22619fi
22620
22621
22622  test -n "$TIME" && break
22623done
22624
22625  else
22626    # The variable is set, but is it from the command line or the environment?
22627
22628    # Try to remove the string !TIME! from our list.
22629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22631      # If it failed, the variable was not from the command line. Ignore it,
22632      # but warn the user (except for BASH, which is always set by the calling BASH).
22633      if test "xTIME" != xBASH; then
22634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22635$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22636      fi
22637      # Try to locate tool using the code snippet
22638      for ac_prog in time
22639do
22640  # Extract the first word of "$ac_prog", so it can be a program name with args.
22641set dummy $ac_prog; ac_word=$2
22642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22643$as_echo_n "checking for $ac_word... " >&6; }
22644if ${ac_cv_path_TIME+:} false; then :
22645  $as_echo_n "(cached) " >&6
22646else
22647  case $TIME in
22648  [\\/]* | ?:[\\/]*)
22649  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22650  ;;
22651  *)
22652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22653for as_dir in $PATH
22654do
22655  IFS=$as_save_IFS
22656  test -z "$as_dir" && as_dir=.
22657    for ac_exec_ext in '' $ac_executable_extensions; do
22658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22659    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22661    break 2
22662  fi
22663done
22664  done
22665IFS=$as_save_IFS
22666
22667  ;;
22668esac
22669fi
22670TIME=$ac_cv_path_TIME
22671if test -n "$TIME"; then
22672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22673$as_echo "$TIME" >&6; }
22674else
22675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22676$as_echo "no" >&6; }
22677fi
22678
22679
22680  test -n "$TIME" && break
22681done
22682
22683    else
22684      # If it succeeded, then it was overridden by the user. We will use it
22685      # for the tool.
22686
22687      # First remove it from the list of overridden variables, so we can test
22688      # for unknown variables in the end.
22689      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22690
22691      # Check if we try to supply an empty value
22692      if test "x$TIME" = x; then
22693        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22694$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22695        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22696$as_echo_n "checking for TIME... " >&6; }
22697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22698$as_echo "disabled" >&6; }
22699      else
22700        # Check if the provided tool contains a complete path.
22701        tool_specified="$TIME"
22702        tool_basename="${tool_specified##*/}"
22703        if test "x$tool_basename" = "x$tool_specified"; then
22704          # A command without a complete path is provided, search $PATH.
22705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22706$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22707          # Extract the first word of "$tool_basename", so it can be a program name with args.
22708set dummy $tool_basename; ac_word=$2
22709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22710$as_echo_n "checking for $ac_word... " >&6; }
22711if ${ac_cv_path_TIME+:} false; then :
22712  $as_echo_n "(cached) " >&6
22713else
22714  case $TIME in
22715  [\\/]* | ?:[\\/]*)
22716  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22717  ;;
22718  *)
22719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22720for as_dir in $PATH
22721do
22722  IFS=$as_save_IFS
22723  test -z "$as_dir" && as_dir=.
22724    for ac_exec_ext in '' $ac_executable_extensions; do
22725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22726    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22728    break 2
22729  fi
22730done
22731  done
22732IFS=$as_save_IFS
22733
22734  ;;
22735esac
22736fi
22737TIME=$ac_cv_path_TIME
22738if test -n "$TIME"; then
22739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22740$as_echo "$TIME" >&6; }
22741else
22742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22743$as_echo "no" >&6; }
22744fi
22745
22746
22747          if test "x$TIME" = x; then
22748            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22749          fi
22750        else
22751          # Otherwise we believe it is a complete path. Use it as it is.
22752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22753$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22754          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22755$as_echo_n "checking for TIME... " >&6; }
22756          if test ! -x "$tool_specified"; then
22757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22758$as_echo "not found" >&6; }
22759            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22760          fi
22761          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22762$as_echo "$tool_specified" >&6; }
22763        fi
22764      fi
22765    fi
22766
22767  fi
22768
22769
22770
22771
22772  # Publish this variable in the help.
22773
22774
22775  if [ -z "${DTRACE+x}" ]; then
22776    # The variable is not set by user, try to locate tool using the code snippet
22777    for ac_prog in dtrace
22778do
22779  # Extract the first word of "$ac_prog", so it can be a program name with args.
22780set dummy $ac_prog; ac_word=$2
22781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22782$as_echo_n "checking for $ac_word... " >&6; }
22783if ${ac_cv_path_DTRACE+:} false; then :
22784  $as_echo_n "(cached) " >&6
22785else
22786  case $DTRACE in
22787  [\\/]* | ?:[\\/]*)
22788  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22789  ;;
22790  *)
22791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22792for as_dir in $PATH
22793do
22794  IFS=$as_save_IFS
22795  test -z "$as_dir" && as_dir=.
22796    for ac_exec_ext in '' $ac_executable_extensions; do
22797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22798    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22800    break 2
22801  fi
22802done
22803  done
22804IFS=$as_save_IFS
22805
22806  ;;
22807esac
22808fi
22809DTRACE=$ac_cv_path_DTRACE
22810if test -n "$DTRACE"; then
22811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22812$as_echo "$DTRACE" >&6; }
22813else
22814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22815$as_echo "no" >&6; }
22816fi
22817
22818
22819  test -n "$DTRACE" && break
22820done
22821
22822  else
22823    # The variable is set, but is it from the command line or the environment?
22824
22825    # Try to remove the string !DTRACE! from our list.
22826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22828      # If it failed, the variable was not from the command line. Ignore it,
22829      # but warn the user (except for BASH, which is always set by the calling BASH).
22830      if test "xDTRACE" != xBASH; then
22831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22832$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22833      fi
22834      # Try to locate tool using the code snippet
22835      for ac_prog in dtrace
22836do
22837  # Extract the first word of "$ac_prog", so it can be a program name with args.
22838set dummy $ac_prog; ac_word=$2
22839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22840$as_echo_n "checking for $ac_word... " >&6; }
22841if ${ac_cv_path_DTRACE+:} false; then :
22842  $as_echo_n "(cached) " >&6
22843else
22844  case $DTRACE in
22845  [\\/]* | ?:[\\/]*)
22846  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22847  ;;
22848  *)
22849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22850for as_dir in $PATH
22851do
22852  IFS=$as_save_IFS
22853  test -z "$as_dir" && as_dir=.
22854    for ac_exec_ext in '' $ac_executable_extensions; do
22855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22856    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22858    break 2
22859  fi
22860done
22861  done
22862IFS=$as_save_IFS
22863
22864  ;;
22865esac
22866fi
22867DTRACE=$ac_cv_path_DTRACE
22868if test -n "$DTRACE"; then
22869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22870$as_echo "$DTRACE" >&6; }
22871else
22872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22873$as_echo "no" >&6; }
22874fi
22875
22876
22877  test -n "$DTRACE" && break
22878done
22879
22880    else
22881      # If it succeeded, then it was overridden by the user. We will use it
22882      # for the tool.
22883
22884      # First remove it from the list of overridden variables, so we can test
22885      # for unknown variables in the end.
22886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22887
22888      # Check if we try to supply an empty value
22889      if test "x$DTRACE" = x; then
22890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22891$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22893$as_echo_n "checking for DTRACE... " >&6; }
22894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22895$as_echo "disabled" >&6; }
22896      else
22897        # Check if the provided tool contains a complete path.
22898        tool_specified="$DTRACE"
22899        tool_basename="${tool_specified##*/}"
22900        if test "x$tool_basename" = "x$tool_specified"; then
22901          # A command without a complete path is provided, search $PATH.
22902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22903$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22904          # Extract the first word of "$tool_basename", so it can be a program name with args.
22905set dummy $tool_basename; ac_word=$2
22906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22907$as_echo_n "checking for $ac_word... " >&6; }
22908if ${ac_cv_path_DTRACE+:} false; then :
22909  $as_echo_n "(cached) " >&6
22910else
22911  case $DTRACE in
22912  [\\/]* | ?:[\\/]*)
22913  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22914  ;;
22915  *)
22916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22917for as_dir in $PATH
22918do
22919  IFS=$as_save_IFS
22920  test -z "$as_dir" && as_dir=.
22921    for ac_exec_ext in '' $ac_executable_extensions; do
22922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22923    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22925    break 2
22926  fi
22927done
22928  done
22929IFS=$as_save_IFS
22930
22931  ;;
22932esac
22933fi
22934DTRACE=$ac_cv_path_DTRACE
22935if test -n "$DTRACE"; then
22936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22937$as_echo "$DTRACE" >&6; }
22938else
22939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22940$as_echo "no" >&6; }
22941fi
22942
22943
22944          if test "x$DTRACE" = x; then
22945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22946          fi
22947        else
22948          # Otherwise we believe it is a complete path. Use it as it is.
22949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22950$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22952$as_echo_n "checking for DTRACE... " >&6; }
22953          if test ! -x "$tool_specified"; then
22954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22955$as_echo "not found" >&6; }
22956            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22957          fi
22958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22959$as_echo "$tool_specified" >&6; }
22960        fi
22961      fi
22962    fi
22963
22964  fi
22965
22966
22967
22968
22969  # Publish this variable in the help.
22970
22971
22972  if [ -z "${PATCH+x}" ]; then
22973    # The variable is not set by user, try to locate tool using the code snippet
22974    for ac_prog in gpatch patch
22975do
22976  # Extract the first word of "$ac_prog", so it can be a program name with args.
22977set dummy $ac_prog; ac_word=$2
22978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22979$as_echo_n "checking for $ac_word... " >&6; }
22980if ${ac_cv_path_PATCH+:} false; then :
22981  $as_echo_n "(cached) " >&6
22982else
22983  case $PATCH in
22984  [\\/]* | ?:[\\/]*)
22985  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22986  ;;
22987  *)
22988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22989for as_dir in $PATH
22990do
22991  IFS=$as_save_IFS
22992  test -z "$as_dir" && as_dir=.
22993    for ac_exec_ext in '' $ac_executable_extensions; do
22994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22995    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22997    break 2
22998  fi
22999done
23000  done
23001IFS=$as_save_IFS
23002
23003  ;;
23004esac
23005fi
23006PATCH=$ac_cv_path_PATCH
23007if test -n "$PATCH"; then
23008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23009$as_echo "$PATCH" >&6; }
23010else
23011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23012$as_echo "no" >&6; }
23013fi
23014
23015
23016  test -n "$PATCH" && break
23017done
23018
23019  else
23020    # The variable is set, but is it from the command line or the environment?
23021
23022    # Try to remove the string !PATCH! from our list.
23023    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23024    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23025      # If it failed, the variable was not from the command line. Ignore it,
23026      # but warn the user (except for BASH, which is always set by the calling BASH).
23027      if test "xPATCH" != xBASH; then
23028        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23029$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23030      fi
23031      # Try to locate tool using the code snippet
23032      for ac_prog in gpatch patch
23033do
23034  # Extract the first word of "$ac_prog", so it can be a program name with args.
23035set dummy $ac_prog; ac_word=$2
23036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23037$as_echo_n "checking for $ac_word... " >&6; }
23038if ${ac_cv_path_PATCH+:} false; then :
23039  $as_echo_n "(cached) " >&6
23040else
23041  case $PATCH in
23042  [\\/]* | ?:[\\/]*)
23043  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23044  ;;
23045  *)
23046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23047for as_dir in $PATH
23048do
23049  IFS=$as_save_IFS
23050  test -z "$as_dir" && as_dir=.
23051    for ac_exec_ext in '' $ac_executable_extensions; do
23052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23053    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23055    break 2
23056  fi
23057done
23058  done
23059IFS=$as_save_IFS
23060
23061  ;;
23062esac
23063fi
23064PATCH=$ac_cv_path_PATCH
23065if test -n "$PATCH"; then
23066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23067$as_echo "$PATCH" >&6; }
23068else
23069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23070$as_echo "no" >&6; }
23071fi
23072
23073
23074  test -n "$PATCH" && break
23075done
23076
23077    else
23078      # If it succeeded, then it was overridden by the user. We will use it
23079      # for the tool.
23080
23081      # First remove it from the list of overridden variables, so we can test
23082      # for unknown variables in the end.
23083      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23084
23085      # Check if we try to supply an empty value
23086      if test "x$PATCH" = x; then
23087        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23088$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23090$as_echo_n "checking for PATCH... " >&6; }
23091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23092$as_echo "disabled" >&6; }
23093      else
23094        # Check if the provided tool contains a complete path.
23095        tool_specified="$PATCH"
23096        tool_basename="${tool_specified##*/}"
23097        if test "x$tool_basename" = "x$tool_specified"; then
23098          # A command without a complete path is provided, search $PATH.
23099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23100$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23101          # Extract the first word of "$tool_basename", so it can be a program name with args.
23102set dummy $tool_basename; ac_word=$2
23103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23104$as_echo_n "checking for $ac_word... " >&6; }
23105if ${ac_cv_path_PATCH+:} false; then :
23106  $as_echo_n "(cached) " >&6
23107else
23108  case $PATCH in
23109  [\\/]* | ?:[\\/]*)
23110  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23111  ;;
23112  *)
23113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23114for as_dir in $PATH
23115do
23116  IFS=$as_save_IFS
23117  test -z "$as_dir" && as_dir=.
23118    for ac_exec_ext in '' $ac_executable_extensions; do
23119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23120    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23122    break 2
23123  fi
23124done
23125  done
23126IFS=$as_save_IFS
23127
23128  ;;
23129esac
23130fi
23131PATCH=$ac_cv_path_PATCH
23132if test -n "$PATCH"; then
23133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23134$as_echo "$PATCH" >&6; }
23135else
23136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23137$as_echo "no" >&6; }
23138fi
23139
23140
23141          if test "x$PATCH" = x; then
23142            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23143          fi
23144        else
23145          # Otherwise we believe it is a complete path. Use it as it is.
23146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23147$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23148          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23149$as_echo_n "checking for PATCH... " >&6; }
23150          if test ! -x "$tool_specified"; then
23151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23152$as_echo "not found" >&6; }
23153            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23154          fi
23155          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23156$as_echo "$tool_specified" >&6; }
23157        fi
23158      fi
23159    fi
23160
23161  fi
23162
23163
23164  # Check if it's GNU time
23165  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23166  if test "x$IS_GNU_TIME" != x; then
23167    IS_GNU_TIME=yes
23168  else
23169    IS_GNU_TIME=no
23170  fi
23171
23172
23173  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23174
23175
23176
23177  # Publish this variable in the help.
23178
23179
23180  if [ -z "${DSYMUTIL+x}" ]; then
23181    # The variable is not set by user, try to locate tool using the code snippet
23182    for ac_prog in dsymutil
23183do
23184  # Extract the first word of "$ac_prog", so it can be a program name with args.
23185set dummy $ac_prog; ac_word=$2
23186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23187$as_echo_n "checking for $ac_word... " >&6; }
23188if ${ac_cv_path_DSYMUTIL+:} false; then :
23189  $as_echo_n "(cached) " >&6
23190else
23191  case $DSYMUTIL in
23192  [\\/]* | ?:[\\/]*)
23193  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23194  ;;
23195  *)
23196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23197for as_dir in $PATH
23198do
23199  IFS=$as_save_IFS
23200  test -z "$as_dir" && as_dir=.
23201    for ac_exec_ext in '' $ac_executable_extensions; do
23202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23203    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23205    break 2
23206  fi
23207done
23208  done
23209IFS=$as_save_IFS
23210
23211  ;;
23212esac
23213fi
23214DSYMUTIL=$ac_cv_path_DSYMUTIL
23215if test -n "$DSYMUTIL"; then
23216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23217$as_echo "$DSYMUTIL" >&6; }
23218else
23219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23220$as_echo "no" >&6; }
23221fi
23222
23223
23224  test -n "$DSYMUTIL" && break
23225done
23226
23227  else
23228    # The variable is set, but is it from the command line or the environment?
23229
23230    # Try to remove the string !DSYMUTIL! from our list.
23231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23233      # If it failed, the variable was not from the command line. Ignore it,
23234      # but warn the user (except for BASH, which is always set by the calling BASH).
23235      if test "xDSYMUTIL" != xBASH; then
23236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23237$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23238      fi
23239      # Try to locate tool using the code snippet
23240      for ac_prog in dsymutil
23241do
23242  # Extract the first word of "$ac_prog", so it can be a program name with args.
23243set dummy $ac_prog; ac_word=$2
23244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23245$as_echo_n "checking for $ac_word... " >&6; }
23246if ${ac_cv_path_DSYMUTIL+:} false; then :
23247  $as_echo_n "(cached) " >&6
23248else
23249  case $DSYMUTIL in
23250  [\\/]* | ?:[\\/]*)
23251  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23252  ;;
23253  *)
23254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23255for as_dir in $PATH
23256do
23257  IFS=$as_save_IFS
23258  test -z "$as_dir" && as_dir=.
23259    for ac_exec_ext in '' $ac_executable_extensions; do
23260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23261    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23263    break 2
23264  fi
23265done
23266  done
23267IFS=$as_save_IFS
23268
23269  ;;
23270esac
23271fi
23272DSYMUTIL=$ac_cv_path_DSYMUTIL
23273if test -n "$DSYMUTIL"; then
23274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23275$as_echo "$DSYMUTIL" >&6; }
23276else
23277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23278$as_echo "no" >&6; }
23279fi
23280
23281
23282  test -n "$DSYMUTIL" && break
23283done
23284
23285    else
23286      # If it succeeded, then it was overridden by the user. We will use it
23287      # for the tool.
23288
23289      # First remove it from the list of overridden variables, so we can test
23290      # for unknown variables in the end.
23291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23292
23293      # Check if we try to supply an empty value
23294      if test "x$DSYMUTIL" = x; then
23295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23296$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23298$as_echo_n "checking for DSYMUTIL... " >&6; }
23299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23300$as_echo "disabled" >&6; }
23301      else
23302        # Check if the provided tool contains a complete path.
23303        tool_specified="$DSYMUTIL"
23304        tool_basename="${tool_specified##*/}"
23305        if test "x$tool_basename" = "x$tool_specified"; then
23306          # A command without a complete path is provided, search $PATH.
23307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23308$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23309          # Extract the first word of "$tool_basename", so it can be a program name with args.
23310set dummy $tool_basename; ac_word=$2
23311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23312$as_echo_n "checking for $ac_word... " >&6; }
23313if ${ac_cv_path_DSYMUTIL+:} false; then :
23314  $as_echo_n "(cached) " >&6
23315else
23316  case $DSYMUTIL in
23317  [\\/]* | ?:[\\/]*)
23318  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23319  ;;
23320  *)
23321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23322for as_dir in $PATH
23323do
23324  IFS=$as_save_IFS
23325  test -z "$as_dir" && as_dir=.
23326    for ac_exec_ext in '' $ac_executable_extensions; do
23327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23328    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23330    break 2
23331  fi
23332done
23333  done
23334IFS=$as_save_IFS
23335
23336  ;;
23337esac
23338fi
23339DSYMUTIL=$ac_cv_path_DSYMUTIL
23340if test -n "$DSYMUTIL"; then
23341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23342$as_echo "$DSYMUTIL" >&6; }
23343else
23344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23345$as_echo "no" >&6; }
23346fi
23347
23348
23349          if test "x$DSYMUTIL" = x; then
23350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23351          fi
23352        else
23353          # Otherwise we believe it is a complete path. Use it as it is.
23354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23355$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23357$as_echo_n "checking for DSYMUTIL... " >&6; }
23358          if test ! -x "$tool_specified"; then
23359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23360$as_echo "not found" >&6; }
23361            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23362          fi
23363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23364$as_echo "$tool_specified" >&6; }
23365        fi
23366      fi
23367    fi
23368
23369  fi
23370
23371
23372
23373  if test "x$DSYMUTIL" = x; then
23374    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23375  fi
23376
23377
23378
23379
23380
23381  # Publish this variable in the help.
23382
23383
23384  if [ -z "${XATTR+x}" ]; then
23385    # The variable is not set by user, try to locate tool using the code snippet
23386    for ac_prog in xattr
23387do
23388  # Extract the first word of "$ac_prog", so it can be a program name with args.
23389set dummy $ac_prog; ac_word=$2
23390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23391$as_echo_n "checking for $ac_word... " >&6; }
23392if ${ac_cv_path_XATTR+:} false; then :
23393  $as_echo_n "(cached) " >&6
23394else
23395  case $XATTR in
23396  [\\/]* | ?:[\\/]*)
23397  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23398  ;;
23399  *)
23400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23401for as_dir in $PATH
23402do
23403  IFS=$as_save_IFS
23404  test -z "$as_dir" && as_dir=.
23405    for ac_exec_ext in '' $ac_executable_extensions; do
23406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23407    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23409    break 2
23410  fi
23411done
23412  done
23413IFS=$as_save_IFS
23414
23415  ;;
23416esac
23417fi
23418XATTR=$ac_cv_path_XATTR
23419if test -n "$XATTR"; then
23420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23421$as_echo "$XATTR" >&6; }
23422else
23423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23424$as_echo "no" >&6; }
23425fi
23426
23427
23428  test -n "$XATTR" && break
23429done
23430
23431  else
23432    # The variable is set, but is it from the command line or the environment?
23433
23434    # Try to remove the string !XATTR! from our list.
23435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23437      # If it failed, the variable was not from the command line. Ignore it,
23438      # but warn the user (except for BASH, which is always set by the calling BASH).
23439      if test "xXATTR" != xBASH; then
23440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23441$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23442      fi
23443      # Try to locate tool using the code snippet
23444      for ac_prog in xattr
23445do
23446  # Extract the first word of "$ac_prog", so it can be a program name with args.
23447set dummy $ac_prog; ac_word=$2
23448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23449$as_echo_n "checking for $ac_word... " >&6; }
23450if ${ac_cv_path_XATTR+:} false; then :
23451  $as_echo_n "(cached) " >&6
23452else
23453  case $XATTR in
23454  [\\/]* | ?:[\\/]*)
23455  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23456  ;;
23457  *)
23458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23459for as_dir in $PATH
23460do
23461  IFS=$as_save_IFS
23462  test -z "$as_dir" && as_dir=.
23463    for ac_exec_ext in '' $ac_executable_extensions; do
23464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23465    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23467    break 2
23468  fi
23469done
23470  done
23471IFS=$as_save_IFS
23472
23473  ;;
23474esac
23475fi
23476XATTR=$ac_cv_path_XATTR
23477if test -n "$XATTR"; then
23478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23479$as_echo "$XATTR" >&6; }
23480else
23481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23482$as_echo "no" >&6; }
23483fi
23484
23485
23486  test -n "$XATTR" && break
23487done
23488
23489    else
23490      # If it succeeded, then it was overridden by the user. We will use it
23491      # for the tool.
23492
23493      # First remove it from the list of overridden variables, so we can test
23494      # for unknown variables in the end.
23495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23496
23497      # Check if we try to supply an empty value
23498      if test "x$XATTR" = x; then
23499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23500$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23502$as_echo_n "checking for XATTR... " >&6; }
23503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23504$as_echo "disabled" >&6; }
23505      else
23506        # Check if the provided tool contains a complete path.
23507        tool_specified="$XATTR"
23508        tool_basename="${tool_specified##*/}"
23509        if test "x$tool_basename" = "x$tool_specified"; then
23510          # A command without a complete path is provided, search $PATH.
23511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23512$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23513          # Extract the first word of "$tool_basename", so it can be a program name with args.
23514set dummy $tool_basename; ac_word=$2
23515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23516$as_echo_n "checking for $ac_word... " >&6; }
23517if ${ac_cv_path_XATTR+:} false; then :
23518  $as_echo_n "(cached) " >&6
23519else
23520  case $XATTR in
23521  [\\/]* | ?:[\\/]*)
23522  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23523  ;;
23524  *)
23525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23526for as_dir in $PATH
23527do
23528  IFS=$as_save_IFS
23529  test -z "$as_dir" && as_dir=.
23530    for ac_exec_ext in '' $ac_executable_extensions; do
23531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23532    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23534    break 2
23535  fi
23536done
23537  done
23538IFS=$as_save_IFS
23539
23540  ;;
23541esac
23542fi
23543XATTR=$ac_cv_path_XATTR
23544if test -n "$XATTR"; then
23545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23546$as_echo "$XATTR" >&6; }
23547else
23548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23549$as_echo "no" >&6; }
23550fi
23551
23552
23553          if test "x$XATTR" = x; then
23554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23555          fi
23556        else
23557          # Otherwise we believe it is a complete path. Use it as it is.
23558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23559$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23561$as_echo_n "checking for XATTR... " >&6; }
23562          if test ! -x "$tool_specified"; then
23563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23564$as_echo "not found" >&6; }
23565            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23566          fi
23567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23568$as_echo "$tool_specified" >&6; }
23569        fi
23570      fi
23571    fi
23572
23573  fi
23574
23575
23576
23577  if test "x$XATTR" = x; then
23578    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23579  fi
23580
23581
23582
23583
23584  # Publish this variable in the help.
23585
23586
23587  if [ -z "${CODESIGN+x}" ]; then
23588    # The variable is not set by user, try to locate tool using the code snippet
23589    for ac_prog in codesign
23590do
23591  # Extract the first word of "$ac_prog", so it can be a program name with args.
23592set dummy $ac_prog; ac_word=$2
23593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23594$as_echo_n "checking for $ac_word... " >&6; }
23595if ${ac_cv_path_CODESIGN+:} false; then :
23596  $as_echo_n "(cached) " >&6
23597else
23598  case $CODESIGN in
23599  [\\/]* | ?:[\\/]*)
23600  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23601  ;;
23602  *)
23603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23604for as_dir in $PATH
23605do
23606  IFS=$as_save_IFS
23607  test -z "$as_dir" && as_dir=.
23608    for ac_exec_ext in '' $ac_executable_extensions; do
23609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23610    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23612    break 2
23613  fi
23614done
23615  done
23616IFS=$as_save_IFS
23617
23618  ;;
23619esac
23620fi
23621CODESIGN=$ac_cv_path_CODESIGN
23622if test -n "$CODESIGN"; then
23623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23624$as_echo "$CODESIGN" >&6; }
23625else
23626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23627$as_echo "no" >&6; }
23628fi
23629
23630
23631  test -n "$CODESIGN" && break
23632done
23633
23634  else
23635    # The variable is set, but is it from the command line or the environment?
23636
23637    # Try to remove the string !CODESIGN! from our list.
23638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23640      # If it failed, the variable was not from the command line. Ignore it,
23641      # but warn the user (except for BASH, which is always set by the calling BASH).
23642      if test "xCODESIGN" != xBASH; then
23643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23644$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23645      fi
23646      # Try to locate tool using the code snippet
23647      for ac_prog in codesign
23648do
23649  # Extract the first word of "$ac_prog", so it can be a program name with args.
23650set dummy $ac_prog; ac_word=$2
23651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23652$as_echo_n "checking for $ac_word... " >&6; }
23653if ${ac_cv_path_CODESIGN+:} false; then :
23654  $as_echo_n "(cached) " >&6
23655else
23656  case $CODESIGN in
23657  [\\/]* | ?:[\\/]*)
23658  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23659  ;;
23660  *)
23661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23662for as_dir in $PATH
23663do
23664  IFS=$as_save_IFS
23665  test -z "$as_dir" && as_dir=.
23666    for ac_exec_ext in '' $ac_executable_extensions; do
23667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23668    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23670    break 2
23671  fi
23672done
23673  done
23674IFS=$as_save_IFS
23675
23676  ;;
23677esac
23678fi
23679CODESIGN=$ac_cv_path_CODESIGN
23680if test -n "$CODESIGN"; then
23681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23682$as_echo "$CODESIGN" >&6; }
23683else
23684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23685$as_echo "no" >&6; }
23686fi
23687
23688
23689  test -n "$CODESIGN" && break
23690done
23691
23692    else
23693      # If it succeeded, then it was overridden by the user. We will use it
23694      # for the tool.
23695
23696      # First remove it from the list of overridden variables, so we can test
23697      # for unknown variables in the end.
23698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23699
23700      # Check if we try to supply an empty value
23701      if test "x$CODESIGN" = x; then
23702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23703$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23705$as_echo_n "checking for CODESIGN... " >&6; }
23706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23707$as_echo "disabled" >&6; }
23708      else
23709        # Check if the provided tool contains a complete path.
23710        tool_specified="$CODESIGN"
23711        tool_basename="${tool_specified##*/}"
23712        if test "x$tool_basename" = "x$tool_specified"; then
23713          # A command without a complete path is provided, search $PATH.
23714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23715$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23716          # Extract the first word of "$tool_basename", so it can be a program name with args.
23717set dummy $tool_basename; ac_word=$2
23718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23719$as_echo_n "checking for $ac_word... " >&6; }
23720if ${ac_cv_path_CODESIGN+:} false; then :
23721  $as_echo_n "(cached) " >&6
23722else
23723  case $CODESIGN in
23724  [\\/]* | ?:[\\/]*)
23725  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23726  ;;
23727  *)
23728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23729for as_dir in $PATH
23730do
23731  IFS=$as_save_IFS
23732  test -z "$as_dir" && as_dir=.
23733    for ac_exec_ext in '' $ac_executable_extensions; do
23734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23735    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23737    break 2
23738  fi
23739done
23740  done
23741IFS=$as_save_IFS
23742
23743  ;;
23744esac
23745fi
23746CODESIGN=$ac_cv_path_CODESIGN
23747if test -n "$CODESIGN"; then
23748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23749$as_echo "$CODESIGN" >&6; }
23750else
23751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23752$as_echo "no" >&6; }
23753fi
23754
23755
23756          if test "x$CODESIGN" = x; then
23757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23758          fi
23759        else
23760          # Otherwise we believe it is a complete path. Use it as it is.
23761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23762$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23764$as_echo_n "checking for CODESIGN... " >&6; }
23765          if test ! -x "$tool_specified"; then
23766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23767$as_echo "not found" >&6; }
23768            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23769          fi
23770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23771$as_echo "$tool_specified" >&6; }
23772        fi
23773      fi
23774    fi
23775
23776  fi
23777
23778
23779    if test "x$CODESIGN" != "x"; then
23780      # Verify that the openjdk_codesign certificate is present
23781      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23782$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23783      rm -f codesign-testfile
23784      touch codesign-testfile
23785      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23786      rm -f codesign-testfile
23787      if test "x$CODESIGN" = x; then
23788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23789$as_echo "no" >&6; }
23790      else
23791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23792$as_echo "yes" >&6; }
23793      fi
23794    fi
23795
23796
23797
23798  # Publish this variable in the help.
23799
23800
23801  if [ -z "${SETFILE+x}" ]; then
23802    # The variable is not set by user, try to locate tool using the code snippet
23803    for ac_prog in SetFile
23804do
23805  # Extract the first word of "$ac_prog", so it can be a program name with args.
23806set dummy $ac_prog; ac_word=$2
23807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23808$as_echo_n "checking for $ac_word... " >&6; }
23809if ${ac_cv_path_SETFILE+:} false; then :
23810  $as_echo_n "(cached) " >&6
23811else
23812  case $SETFILE in
23813  [\\/]* | ?:[\\/]*)
23814  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23815  ;;
23816  *)
23817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23818for as_dir in $PATH
23819do
23820  IFS=$as_save_IFS
23821  test -z "$as_dir" && as_dir=.
23822    for ac_exec_ext in '' $ac_executable_extensions; do
23823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23824    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23826    break 2
23827  fi
23828done
23829  done
23830IFS=$as_save_IFS
23831
23832  ;;
23833esac
23834fi
23835SETFILE=$ac_cv_path_SETFILE
23836if test -n "$SETFILE"; then
23837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23838$as_echo "$SETFILE" >&6; }
23839else
23840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23841$as_echo "no" >&6; }
23842fi
23843
23844
23845  test -n "$SETFILE" && break
23846done
23847
23848  else
23849    # The variable is set, but is it from the command line or the environment?
23850
23851    # Try to remove the string !SETFILE! from our list.
23852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23854      # If it failed, the variable was not from the command line. Ignore it,
23855      # but warn the user (except for BASH, which is always set by the calling BASH).
23856      if test "xSETFILE" != xBASH; then
23857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23858$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23859      fi
23860      # Try to locate tool using the code snippet
23861      for ac_prog in SetFile
23862do
23863  # Extract the first word of "$ac_prog", so it can be a program name with args.
23864set dummy $ac_prog; ac_word=$2
23865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23866$as_echo_n "checking for $ac_word... " >&6; }
23867if ${ac_cv_path_SETFILE+:} false; then :
23868  $as_echo_n "(cached) " >&6
23869else
23870  case $SETFILE in
23871  [\\/]* | ?:[\\/]*)
23872  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23873  ;;
23874  *)
23875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23876for as_dir in $PATH
23877do
23878  IFS=$as_save_IFS
23879  test -z "$as_dir" && as_dir=.
23880    for ac_exec_ext in '' $ac_executable_extensions; do
23881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23882    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23884    break 2
23885  fi
23886done
23887  done
23888IFS=$as_save_IFS
23889
23890  ;;
23891esac
23892fi
23893SETFILE=$ac_cv_path_SETFILE
23894if test -n "$SETFILE"; then
23895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23896$as_echo "$SETFILE" >&6; }
23897else
23898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23899$as_echo "no" >&6; }
23900fi
23901
23902
23903  test -n "$SETFILE" && break
23904done
23905
23906    else
23907      # If it succeeded, then it was overridden by the user. We will use it
23908      # for the tool.
23909
23910      # First remove it from the list of overridden variables, so we can test
23911      # for unknown variables in the end.
23912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23913
23914      # Check if we try to supply an empty value
23915      if test "x$SETFILE" = x; then
23916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23917$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23919$as_echo_n "checking for SETFILE... " >&6; }
23920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23921$as_echo "disabled" >&6; }
23922      else
23923        # Check if the provided tool contains a complete path.
23924        tool_specified="$SETFILE"
23925        tool_basename="${tool_specified##*/}"
23926        if test "x$tool_basename" = "x$tool_specified"; then
23927          # A command without a complete path is provided, search $PATH.
23928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23929$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23930          # Extract the first word of "$tool_basename", so it can be a program name with args.
23931set dummy $tool_basename; ac_word=$2
23932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23933$as_echo_n "checking for $ac_word... " >&6; }
23934if ${ac_cv_path_SETFILE+:} false; then :
23935  $as_echo_n "(cached) " >&6
23936else
23937  case $SETFILE in
23938  [\\/]* | ?:[\\/]*)
23939  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23940  ;;
23941  *)
23942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23943for as_dir in $PATH
23944do
23945  IFS=$as_save_IFS
23946  test -z "$as_dir" && as_dir=.
23947    for ac_exec_ext in '' $ac_executable_extensions; do
23948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23949    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23951    break 2
23952  fi
23953done
23954  done
23955IFS=$as_save_IFS
23956
23957  ;;
23958esac
23959fi
23960SETFILE=$ac_cv_path_SETFILE
23961if test -n "$SETFILE"; then
23962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23963$as_echo "$SETFILE" >&6; }
23964else
23965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23966$as_echo "no" >&6; }
23967fi
23968
23969
23970          if test "x$SETFILE" = x; then
23971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23972          fi
23973        else
23974          # Otherwise we believe it is a complete path. Use it as it is.
23975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23976$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23978$as_echo_n "checking for SETFILE... " >&6; }
23979          if test ! -x "$tool_specified"; then
23980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23981$as_echo "not found" >&6; }
23982            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23983          fi
23984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23985$as_echo "$tool_specified" >&6; }
23986        fi
23987      fi
23988    fi
23989
23990  fi
23991
23992
23993
23994  if test "x$SETFILE" = x; then
23995    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23996  fi
23997
23998
23999  fi
24000
24001
24002  # Test if bash supports pipefail.
24003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24004$as_echo_n "checking if bash supports pipefail... " >&6; }
24005  if ${BASH} -c 'set -o pipefail'; then
24006    BASH_ARGS="$BASH_ARGS -o pipefail"
24007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24008$as_echo "yes" >&6; }
24009  else
24010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24011$as_echo "no" >&6; }
24012  fi
24013
24014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24015$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24016  if ${BASH} -e -c 'true'; then
24017    BASH_ARGS="$BASH_ARGS -e"
24018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24019$as_echo "yes" >&6; }
24020  else
24021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24022$as_echo "no" >&6; }
24023  fi
24024
24025
24026
24027
24028# Check if pkg-config is available.
24029
24030
24031if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24032	if test -n "$ac_tool_prefix"; then
24033  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24034set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24036$as_echo_n "checking for $ac_word... " >&6; }
24037if ${ac_cv_path_PKG_CONFIG+:} false; then :
24038  $as_echo_n "(cached) " >&6
24039else
24040  case $PKG_CONFIG in
24041  [\\/]* | ?:[\\/]*)
24042  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24043  ;;
24044  *)
24045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24046for as_dir in $PATH
24047do
24048  IFS=$as_save_IFS
24049  test -z "$as_dir" && as_dir=.
24050    for ac_exec_ext in '' $ac_executable_extensions; do
24051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24052    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24054    break 2
24055  fi
24056done
24057  done
24058IFS=$as_save_IFS
24059
24060  ;;
24061esac
24062fi
24063PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24064if test -n "$PKG_CONFIG"; then
24065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24066$as_echo "$PKG_CONFIG" >&6; }
24067else
24068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24069$as_echo "no" >&6; }
24070fi
24071
24072
24073fi
24074if test -z "$ac_cv_path_PKG_CONFIG"; then
24075  ac_pt_PKG_CONFIG=$PKG_CONFIG
24076  # Extract the first word of "pkg-config", so it can be a program name with args.
24077set dummy pkg-config; ac_word=$2
24078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24079$as_echo_n "checking for $ac_word... " >&6; }
24080if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24081  $as_echo_n "(cached) " >&6
24082else
24083  case $ac_pt_PKG_CONFIG in
24084  [\\/]* | ?:[\\/]*)
24085  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24086  ;;
24087  *)
24088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24089for as_dir in $PATH
24090do
24091  IFS=$as_save_IFS
24092  test -z "$as_dir" && as_dir=.
24093    for ac_exec_ext in '' $ac_executable_extensions; do
24094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24095    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24097    break 2
24098  fi
24099done
24100  done
24101IFS=$as_save_IFS
24102
24103  ;;
24104esac
24105fi
24106ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24107if test -n "$ac_pt_PKG_CONFIG"; then
24108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24109$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24110else
24111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24112$as_echo "no" >&6; }
24113fi
24114
24115  if test "x$ac_pt_PKG_CONFIG" = x; then
24116    PKG_CONFIG=""
24117  else
24118    case $cross_compiling:$ac_tool_warned in
24119yes:)
24120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24122ac_tool_warned=yes ;;
24123esac
24124    PKG_CONFIG=$ac_pt_PKG_CONFIG
24125  fi
24126else
24127  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24128fi
24129
24130fi
24131if test -n "$PKG_CONFIG"; then
24132	_pkg_min_version=0.9.0
24133	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24134$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24135	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24136		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24137$as_echo "yes" >&6; }
24138	else
24139		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24140$as_echo "no" >&6; }
24141		PKG_CONFIG=""
24142	fi
24143
24144fi
24145
24146# After basic tools have been setup, we can check build os specific details.
24147
24148  ###############################################################################
24149
24150  # Note that this is the build platform OS version!
24151
24152  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24153  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24154  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24155  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24156
24157
24158
24159
24160
24161# Misc basic settings
24162
24163
24164# Check whether --with-default-make-target was given.
24165if test "${with_default_make_target+set}" = set; then :
24166  withval=$with_default_make_target;
24167fi
24168
24169  if test "x$with_default_make_target" = "x" \
24170      || test "x$with_default_make_target" = "xyes"; then
24171    DEFAULT_MAKE_TARGET="exploded-image"
24172  elif test "x$with_default_make_target" = "xno"; then
24173    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24174  else
24175    DEFAULT_MAKE_TARGET="$with_default_make_target"
24176  fi
24177
24178
24179
24180
24181###############################################################################
24182#
24183# Determine OpenJDK variants, options and version numbers.
24184#
24185###############################################################################
24186
24187# We need build & target for this.
24188
24189  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24190  # We always build headless support.
24191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24192$as_echo_n "checking headful support... " >&6; }
24193  # Check whether --enable-headful was given.
24194if test "${enable_headful+set}" = set; then :
24195  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24196else
24197  SUPPORT_HEADFUL=yes
24198fi
24199
24200
24201  SUPPORT_HEADLESS=yes
24202  BUILD_HEADLESS="BUILD_HEADLESS:=true"
24203
24204  if test "x$SUPPORT_HEADFUL" = xyes; then
24205    # We are building both headful and headless.
24206    headful_msg="include support for both headful and headless"
24207  fi
24208
24209  if test "x$SUPPORT_HEADFUL" = xno; then
24210    # Thus we are building headless only.
24211    BUILD_HEADLESS="BUILD_HEADLESS:=true"
24212    headful_msg="headless only"
24213  fi
24214
24215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24216$as_echo "$headful_msg" >&6; }
24217
24218
24219
24220
24221
24222  # Choose cacerts source file
24223
24224# Check whether --with-cacerts-file was given.
24225if test "${with_cacerts_file+set}" = set; then :
24226  withval=$with_cacerts_file;
24227fi
24228
24229  if test "x$with_cacerts_file" != x; then
24230    CACERTS_FILE=$with_cacerts_file
24231  fi
24232
24233
24234  # Enable or disable unlimited crypto
24235  # Check whether --enable-unlimited-crypto was given.
24236if test "${enable_unlimited_crypto+set}" = set; then :
24237  enableval=$enable_unlimited_crypto;
24238else
24239  enable_unlimited_crypto=no
24240fi
24241
24242  if test "x$enable_unlimited_crypto" = "xyes"; then
24243    UNLIMITED_CRYPTO=true
24244  else
24245    UNLIMITED_CRYPTO=false
24246  fi
24247
24248
24249  # Should we build the serviceability agent (SA)?
24250  INCLUDE_SA=true
24251  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24252    INCLUDE_SA=false
24253  fi
24254  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24255    INCLUDE_SA=false
24256  fi
24257
24258
24259  # Compress jars
24260  COMPRESS_JARS=false
24261
24262
24263
24264  # Setup default copyright year. Mostly overridden when building close to a new year.
24265
24266# Check whether --with-copyright-year was given.
24267if test "${with_copyright_year+set}" = set; then :
24268  withval=$with_copyright_year;
24269fi
24270
24271  if test "x$with_copyright_year" = xyes; then
24272    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24273  elif test "x$with_copyright_year" != x; then
24274    COPYRIGHT_YEAR="$with_copyright_year"
24275  else
24276    COPYRIGHT_YEAR=`date +'%Y'`
24277  fi
24278
24279
24280
24281  # Check whether --enable-keep-packaged-modules was given.
24282if test "${enable_keep_packaged_modules+set}" = set; then :
24283  enableval=$enable_keep_packaged_modules;
24284fi
24285
24286
24287  if test "x$enable_keep_packaged_modules" = "xyes"; then
24288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24289$as_echo_n "checking if packaged modules are kept... " >&6; }
24290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24291$as_echo "yes" >&6; }
24292    JLINK_KEEP_PACKAGED_MODULES=true
24293  elif test "x$enable_keep_packaged_modules" = "xno"; 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: no" >&5
24297$as_echo "no" >&6; }
24298    JLINK_KEEP_PACKAGED_MODULES=false
24299  elif test "x$enable_keep_packaged_modules" = "x"; then
24300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24301$as_echo "yes (default)" >&6; }
24302    JLINK_KEEP_PACKAGED_MODULES=true
24303  else
24304    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24305  fi
24306
24307
24308
24309
24310  # Warn user that old version arguments are deprecated.
24311
24312
24313# Check whether --with-milestone was given.
24314if test "${with_milestone+set}" = set; then :
24315  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24316$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24317fi
24318
24319
24320
24321
24322# Check whether --with-update-version was given.
24323if test "${with_update_version+set}" = set; then :
24324  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24325$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24326fi
24327
24328
24329
24330
24331# Check whether --with-user-release-suffix was given.
24332if test "${with_user_release_suffix+set}" = set; then :
24333  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
24334$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24335fi
24336
24337
24338
24339
24340# Check whether --with-build-number was given.
24341if test "${with_build_number+set}" = set; then :
24342  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24343$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24344fi
24345
24346
24347
24348  # Source the version numbers file
24349  . $AUTOCONF_DIR/version-numbers
24350
24351  # Some non-version number information is set in that file
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361  # Override version from arguments
24362
24363  # If --with-version-string is set, process it first. It is possible to
24364  # override parts with more specific flags, since these are processed later.
24365
24366# Check whether --with-version-string was given.
24367if test "${with_version_string+set}" = set; then :
24368  withval=$with_version_string;
24369fi
24370
24371  if test "x$with_version_string" = xyes; then
24372    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24373  elif test "x$with_version_string" != x; then
24374    # Additional [] needed to keep m4 from mangling shell constructs.
24375    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24376      VERSION_MAJOR=${BASH_REMATCH[1]}
24377      VERSION_MINOR=${BASH_REMATCH[3]}
24378      VERSION_SECURITY=${BASH_REMATCH[5]}
24379      VERSION_PATCH=${BASH_REMATCH[7]}
24380      VERSION_PRE=${BASH_REMATCH[9]}
24381      version_plus_separator=${BASH_REMATCH[11]}
24382      VERSION_BUILD=${BASH_REMATCH[12]}
24383      VERSION_OPT=${BASH_REMATCH[14]}
24384      # Unspecified numerical fields are interpreted as 0.
24385      if test "x$VERSION_MINOR" = x; then
24386        VERSION_MINOR=0
24387      fi
24388      if test "x$VERSION_SECURITY" = x; then
24389        VERSION_SECURITY=0
24390      fi
24391      if test "x$VERSION_PATCH" = x; then
24392        VERSION_PATCH=0
24393      fi
24394      if test "x$version_plus_separator" != x \
24395          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24396        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24397      fi
24398      # Stop the version part process from setting default values.
24399      # We still allow them to explicitely override though.
24400      NO_DEFAULT_VERSION_PARTS=true
24401    else
24402      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24403    fi
24404  fi
24405
24406
24407# Check whether --with-version-pre was given.
24408if test "${with_version_pre+set}" = set; then :
24409  withval=$with_version_pre; with_version_pre_present=true
24410else
24411  with_version_pre_present=false
24412fi
24413
24414
24415  if test "x$with_version_pre_present" = xtrue; then
24416    if test "x$with_version_pre" = xyes; then
24417      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24418    elif test "x$with_version_pre" = xno; then
24419      # Interpret --without-* as empty string instead of the literal "no"
24420      VERSION_PRE=
24421    else
24422      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24423       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24424      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24426$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24427      fi
24428    fi
24429  else
24430    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24431      # Default is to use "internal" as pre
24432      VERSION_PRE="internal"
24433    fi
24434  fi
24435
24436
24437# Check whether --with-version-opt was given.
24438if test "${with_version_opt+set}" = set; then :
24439  withval=$with_version_opt; with_version_opt_present=true
24440else
24441  with_version_opt_present=false
24442fi
24443
24444
24445  if test "x$with_version_opt_present" = xtrue; then
24446    if test "x$with_version_opt" = xyes; then
24447      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24448    elif test "x$with_version_opt" = xno; then
24449      # Interpret --without-* as empty string instead of the literal "no"
24450      VERSION_OPT=
24451    else
24452      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24453       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24454      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24456$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24457      fi
24458    fi
24459  else
24460    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24461      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24462      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24463      # Outer [ ] to quote m4.
24464       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24465      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24466    fi
24467  fi
24468
24469
24470# Check whether --with-version-build was given.
24471if test "${with_version_build+set}" = set; then :
24472  withval=$with_version_build; with_version_build_present=true
24473else
24474  with_version_build_present=false
24475fi
24476
24477
24478  if test "x$with_version_build_present" = xtrue; then
24479    if test "x$with_version_build" = xyes; then
24480      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24481    elif test "x$with_version_build" = xno; then
24482      # Interpret --without-* as empty string instead of the literal "no"
24483      VERSION_BUILD=
24484    elif test "x$with_version_build" = x; then
24485      VERSION_BUILD=
24486    else
24487
24488  # Additional [] needed to keep m4 from mangling shell constructs.
24489  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24490    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24491  fi
24492  # Extract the version number without leading zeros.
24493  cleaned_value=${BASH_REMATCH[1]}
24494  if test "x$cleaned_value" = x; then
24495    # Special case for zero
24496    cleaned_value=${BASH_REMATCH[2]}
24497  fi
24498
24499  if test $cleaned_value -gt 255; then
24500    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24501  fi
24502  if test "x$cleaned_value" != "x$with_version_build"; then
24503    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24504$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24505  fi
24506  VERSION_BUILD=$cleaned_value
24507
24508    fi
24509  else
24510    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24511      # Default is to not have a build number.
24512      VERSION_BUILD=""
24513      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24514      VERSION_BUILD=0
24515    fi
24516  fi
24517
24518
24519# Check whether --with-version-major was given.
24520if test "${with_version_major+set}" = set; then :
24521  withval=$with_version_major; with_version_major_present=true
24522else
24523  with_version_major_present=false
24524fi
24525
24526
24527  if test "x$with_version_major_present" = xtrue; then
24528    if test "x$with_version_major" = xyes; then
24529      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24530    else
24531
24532  # Additional [] needed to keep m4 from mangling shell constructs.
24533  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24534    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24535  fi
24536  # Extract the version number without leading zeros.
24537  cleaned_value=${BASH_REMATCH[1]}
24538  if test "x$cleaned_value" = x; then
24539    # Special case for zero
24540    cleaned_value=${BASH_REMATCH[2]}
24541  fi
24542
24543  if test $cleaned_value -gt 255; then
24544    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24545  fi
24546  if test "x$cleaned_value" != "x$with_version_major"; then
24547    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24548$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24549  fi
24550  VERSION_MAJOR=$cleaned_value
24551
24552    fi
24553  else
24554    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24555      # Default is to get value from version-numbers
24556      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24557    fi
24558  fi
24559
24560
24561# Check whether --with-version-minor was given.
24562if test "${with_version_minor+set}" = set; then :
24563  withval=$with_version_minor; with_version_minor_present=true
24564else
24565  with_version_minor_present=false
24566fi
24567
24568
24569  if test "x$with_version_minor_present" = xtrue; then
24570    if test "x$with_version_minor" = xyes; then
24571      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24572    elif test "x$with_version_minor" = xno; then
24573      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24574      VERSION_MINOR=0
24575    elif test "x$with_version_minor" = x; then
24576      VERSION_MINOR=0
24577    else
24578
24579  # Additional [] needed to keep m4 from mangling shell constructs.
24580  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24581    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24582  fi
24583  # Extract the version number without leading zeros.
24584  cleaned_value=${BASH_REMATCH[1]}
24585  if test "x$cleaned_value" = x; then
24586    # Special case for zero
24587    cleaned_value=${BASH_REMATCH[2]}
24588  fi
24589
24590  if test $cleaned_value -gt 255; then
24591    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24592  fi
24593  if test "x$cleaned_value" != "x$with_version_minor"; then
24594    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24595$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24596  fi
24597  VERSION_MINOR=$cleaned_value
24598
24599    fi
24600  else
24601    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24602      # Default is 0, if unspecified
24603      VERSION_MINOR=0
24604    fi
24605  fi
24606
24607
24608# Check whether --with-version-security was given.
24609if test "${with_version_security+set}" = set; then :
24610  withval=$with_version_security; with_version_security_present=true
24611else
24612  with_version_security_present=false
24613fi
24614
24615
24616  if test "x$with_version_security_present" = xtrue; then
24617    if test "x$with_version_security" = xyes; then
24618      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24619    elif test "x$with_version_security" = xno; then
24620      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24621      VERSION_SECURITY=0
24622    elif test "x$with_version_security" = x; then
24623      VERSION_SECURITY=0
24624    else
24625
24626  # Additional [] needed to keep m4 from mangling shell constructs.
24627  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24628    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24629  fi
24630  # Extract the version number without leading zeros.
24631  cleaned_value=${BASH_REMATCH[1]}
24632  if test "x$cleaned_value" = x; then
24633    # Special case for zero
24634    cleaned_value=${BASH_REMATCH[2]}
24635  fi
24636
24637  if test $cleaned_value -gt 255; then
24638    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24639  fi
24640  if test "x$cleaned_value" != "x$with_version_security"; then
24641    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24642$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24643  fi
24644  VERSION_SECURITY=$cleaned_value
24645
24646    fi
24647  else
24648    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24649      # Default is 0, if unspecified
24650      VERSION_SECURITY=0
24651    fi
24652  fi
24653
24654
24655# Check whether --with-version-patch was given.
24656if test "${with_version_patch+set}" = set; then :
24657  withval=$with_version_patch; with_version_patch_present=true
24658else
24659  with_version_patch_present=false
24660fi
24661
24662
24663  if test "x$with_version_patch_present" = xtrue; then
24664    if test "x$with_version_patch" = xyes; then
24665      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24666    elif test "x$with_version_patch" = xno; then
24667      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24668      VERSION_PATCH=0
24669    elif test "x$with_version_patch" = x; then
24670      VERSION_PATCH=0
24671    else
24672
24673  # Additional [] needed to keep m4 from mangling shell constructs.
24674  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24675    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24676  fi
24677  # Extract the version number without leading zeros.
24678  cleaned_value=${BASH_REMATCH[1]}
24679  if test "x$cleaned_value" = x; then
24680    # Special case for zero
24681    cleaned_value=${BASH_REMATCH[2]}
24682  fi
24683
24684  if test $cleaned_value -gt 255; then
24685    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24686  fi
24687  if test "x$cleaned_value" != "x$with_version_patch"; then
24688    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24689$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24690  fi
24691  VERSION_PATCH=$cleaned_value
24692
24693    fi
24694  else
24695    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24696      # Default is 0, if unspecified
24697      VERSION_PATCH=0
24698    fi
24699  fi
24700
24701  # Calculate derived version properties
24702
24703  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24704  if test "x$VERSION_PRE" = x; then
24705    VERSION_IS_GA=true
24706  else
24707    VERSION_IS_GA=false
24708  fi
24709
24710  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24711  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24712
24713  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24714  # Strip trailing zeroes from stripped_version_number
24715  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24716  VERSION_NUMBER=$stripped_version_number
24717
24718  # The complete version string, with additional build information
24719  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24720    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24721  else
24722    # If either build or opt is set, we need a + separator
24723    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24724  fi
24725
24726  # The short version string, just VERSION_NUMBER and PRE, if present.
24727  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24728
24729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24730$as_echo_n "checking for version string... " >&6; }
24731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24732$as_echo "$VERSION_STRING" >&6; }
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748###############################################################################
24749#
24750# Setup BootJDK, used to bootstrap the build.
24751#
24752###############################################################################
24753
24754
24755  BOOT_JDK_FOUND=no
24756
24757# Check whether --with-boot-jdk was given.
24758if test "${with_boot_jdk+set}" = set; then :
24759  withval=$with_boot_jdk;
24760fi
24761
24762
24763  # We look for the Boot JDK through various means, going from more certain to
24764  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24765  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24766  # must check if this is indeed valid; otherwise we'll continue looking.
24767
24768  # Test: Is bootjdk explicitely set by command line arguments?
24769
24770  if test "x$BOOT_JDK_FOUND" = xno; then
24771    # Now execute the test
24772
24773  if test "x$with_boot_jdk" != x; then
24774    BOOT_JDK=$with_boot_jdk
24775    BOOT_JDK_FOUND=maybe
24776    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24777$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24778  fi
24779
24780
24781    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24782    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24783      # Do we have a bin/java?
24784      if test ! -x "$BOOT_JDK/bin/java"; then
24785        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24787        BOOT_JDK_FOUND=no
24788      else
24789        # Do we have a bin/javac?
24790        if test ! -x "$BOOT_JDK/bin/javac"; then
24791          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24793          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24794$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24795          BOOT_JDK_FOUND=no
24796        else
24797          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24798          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24799
24800          # Extra M4 quote needed to protect [] in grep expression.
24801          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24802          if test "x$FOUND_CORRECT_VERSION" = x; then
24803            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24805            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24806$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24807            BOOT_JDK_FOUND=no
24808          else
24809            # We're done! :-)
24810            BOOT_JDK_FOUND=yes
24811
24812  # Only process if variable expands to non-empty
24813
24814  if test "x$BOOT_JDK" != x; then
24815    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24816
24817  # Input might be given as Windows format, start by converting to
24818  # unix format.
24819  path="$BOOT_JDK"
24820  new_path=`$CYGPATH -u "$path"`
24821
24822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24825  # "foo.exe" is OK but "foo" is an error.
24826  #
24827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24828  # It is also a way to make sure we got the proper file name for the real test later on.
24829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24830  if test "x$test_shortpath" = x; then
24831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24832$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24833    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24834  fi
24835
24836  # Call helper function which possibly converts this using DOS-style short mode.
24837  # If so, the updated path is stored in $new_path.
24838
24839  input_path="$new_path"
24840  # Check if we need to convert this using DOS-style short mode. If the path
24841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24842  # take no chances and rewrite it.
24843  # Note: m4 eats our [], so we need to use [ and ] instead.
24844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24845  if test "x$has_forbidden_chars" != x; then
24846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24850      # Going to short mode and back again did indeed matter. Since short mode is
24851      # case insensitive, let's make it lowercase to improve readability.
24852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24853      # Now convert it back to Unix-style (cygpath)
24854      input_path=`$CYGPATH -u "$shortmode_path"`
24855      new_path="$input_path"
24856    fi
24857  fi
24858
24859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24860  if test "x$test_cygdrive_prefix" = x; then
24861    # As a simple fix, exclude /usr/bin since it's not a real path.
24862    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24864      # a path prefixed by /cygdrive for fixpath to work.
24865      new_path="$CYGWIN_ROOT_PATH$input_path"
24866    fi
24867  fi
24868
24869
24870  if test "x$path" != "x$new_path"; then
24871    BOOT_JDK="$new_path"
24872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24873$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24874  fi
24875
24876    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24877
24878  path="$BOOT_JDK"
24879  has_colon=`$ECHO $path | $GREP ^.:`
24880  new_path="$path"
24881  if test "x$has_colon" = x; then
24882    # Not in mixed or Windows style, start by that.
24883    new_path=`cmd //c echo $path`
24884  fi
24885
24886
24887  input_path="$new_path"
24888  # Check if we need to convert this using DOS-style short mode. If the path
24889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24890  # take no chances and rewrite it.
24891  # Note: m4 eats our [], so we need to use [ and ] instead.
24892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24893  if test "x$has_forbidden_chars" != x; then
24894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24896  fi
24897
24898
24899  windows_path="$new_path"
24900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24901    unix_path=`$CYGPATH -u "$windows_path"`
24902    new_path="$unix_path"
24903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24905    new_path="$unix_path"
24906  fi
24907
24908  if test "x$path" != "x$new_path"; then
24909    BOOT_JDK="$new_path"
24910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24911$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24912  fi
24913
24914  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24915  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24916
24917    else
24918      # We're on a unix platform. Hooray! :)
24919      path="$BOOT_JDK"
24920      has_space=`$ECHO "$path" | $GREP " "`
24921      if test "x$has_space" != x; then
24922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24923$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24924        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24925      fi
24926
24927      # Use eval to expand a potential ~
24928      eval path="$path"
24929      if test ! -f "$path" && test ! -d "$path"; then
24930        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24931      fi
24932
24933      if test -d "$path"; then
24934        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24935      else
24936        dir="`$DIRNAME "$path"`"
24937        base="`$BASENAME "$path"`"
24938        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24939      fi
24940    fi
24941  fi
24942
24943            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24944$as_echo_n "checking for Boot JDK... " >&6; }
24945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24946$as_echo "$BOOT_JDK" >&6; }
24947            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24948$as_echo_n "checking Boot JDK version... " >&6; }
24949            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24951$as_echo "$BOOT_JDK_VERSION" >&6; }
24952          fi # end check jdk version
24953        fi # end check javac
24954      fi # end check java
24955    fi # end check boot jdk found
24956  fi
24957
24958  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24959    # Having specified an argument which is incorrect will produce an instant failure;
24960    # we should not go on looking
24961    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24962  fi
24963
24964  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24965
24966  if test "x$BOOT_JDK_FOUND" = xno; then
24967    # Now execute the test
24968
24969  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24970    # First check at user selected default
24971
24972  if test "x$BOOT_JDK_FOUND" = xno; then
24973    # Now execute the test
24974
24975  if test -x /usr/libexec/java_home; then
24976    BOOT_JDK=`/usr/libexec/java_home `
24977    BOOT_JDK_FOUND=maybe
24978    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24979$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24980  fi
24981
24982
24983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24985      # Do we have a bin/java?
24986      if test ! -x "$BOOT_JDK/bin/java"; then
24987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24989        BOOT_JDK_FOUND=no
24990      else
24991        # Do we have a bin/javac?
24992        if test ! -x "$BOOT_JDK/bin/javac"; then
24993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24997          BOOT_JDK_FOUND=no
24998        else
24999          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25000          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25001
25002          # Extra M4 quote needed to protect [] in grep expression.
25003          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25004          if test "x$FOUND_CORRECT_VERSION" = x; then
25005            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25007            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25008$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25009            BOOT_JDK_FOUND=no
25010          else
25011            # We're done! :-)
25012            BOOT_JDK_FOUND=yes
25013
25014  # Only process if variable expands to non-empty
25015
25016  if test "x$BOOT_JDK" != x; then
25017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25018
25019  # Input might be given as Windows format, start by converting to
25020  # unix format.
25021  path="$BOOT_JDK"
25022  new_path=`$CYGPATH -u "$path"`
25023
25024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25027  # "foo.exe" is OK but "foo" is an error.
25028  #
25029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25030  # It is also a way to make sure we got the proper file name for the real test later on.
25031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25032  if test "x$test_shortpath" = x; then
25033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25035    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25036  fi
25037
25038  # Call helper function which possibly converts this using DOS-style short mode.
25039  # If so, the updated path is stored in $new_path.
25040
25041  input_path="$new_path"
25042  # Check if we need to convert this using DOS-style short mode. If the path
25043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25044  # take no chances and rewrite it.
25045  # Note: m4 eats our [], so we need to use [ and ] instead.
25046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25047  if test "x$has_forbidden_chars" != x; then
25048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25052      # Going to short mode and back again did indeed matter. Since short mode is
25053      # case insensitive, let's make it lowercase to improve readability.
25054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25055      # Now convert it back to Unix-style (cygpath)
25056      input_path=`$CYGPATH -u "$shortmode_path"`
25057      new_path="$input_path"
25058    fi
25059  fi
25060
25061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25062  if test "x$test_cygdrive_prefix" = x; then
25063    # As a simple fix, exclude /usr/bin since it's not a real path.
25064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25066      # a path prefixed by /cygdrive for fixpath to work.
25067      new_path="$CYGWIN_ROOT_PATH$input_path"
25068    fi
25069  fi
25070
25071
25072  if test "x$path" != "x$new_path"; then
25073    BOOT_JDK="$new_path"
25074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25076  fi
25077
25078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25079
25080  path="$BOOT_JDK"
25081  has_colon=`$ECHO $path | $GREP ^.:`
25082  new_path="$path"
25083  if test "x$has_colon" = x; then
25084    # Not in mixed or Windows style, start by that.
25085    new_path=`cmd //c echo $path`
25086  fi
25087
25088
25089  input_path="$new_path"
25090  # Check if we need to convert this using DOS-style short mode. If the path
25091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25092  # take no chances and rewrite it.
25093  # Note: m4 eats our [], so we need to use [ and ] instead.
25094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25095  if test "x$has_forbidden_chars" != x; then
25096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25098  fi
25099
25100
25101  windows_path="$new_path"
25102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25103    unix_path=`$CYGPATH -u "$windows_path"`
25104    new_path="$unix_path"
25105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25107    new_path="$unix_path"
25108  fi
25109
25110  if test "x$path" != "x$new_path"; then
25111    BOOT_JDK="$new_path"
25112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25114  fi
25115
25116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25118
25119    else
25120      # We're on a unix platform. Hooray! :)
25121      path="$BOOT_JDK"
25122      has_space=`$ECHO "$path" | $GREP " "`
25123      if test "x$has_space" != x; then
25124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25127      fi
25128
25129      # Use eval to expand a potential ~
25130      eval path="$path"
25131      if test ! -f "$path" && test ! -d "$path"; then
25132        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25133      fi
25134
25135      if test -d "$path"; then
25136        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25137      else
25138        dir="`$DIRNAME "$path"`"
25139        base="`$BASENAME "$path"`"
25140        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25141      fi
25142    fi
25143  fi
25144
25145            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25146$as_echo_n "checking for Boot JDK... " >&6; }
25147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25148$as_echo "$BOOT_JDK" >&6; }
25149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25150$as_echo_n "checking Boot JDK version... " >&6; }
25151            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25153$as_echo "$BOOT_JDK_VERSION" >&6; }
25154          fi # end check jdk version
25155        fi # end check javac
25156      fi # end check java
25157    fi # end check boot jdk found
25158  fi
25159
25160    # If that did not work out (e.g. too old), try explicit versions instead
25161
25162  if test "x$BOOT_JDK_FOUND" = xno; then
25163    # Now execute the test
25164
25165  if test -x /usr/libexec/java_home; then
25166    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25167    BOOT_JDK_FOUND=maybe
25168    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25169$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25170  fi
25171
25172
25173    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25174    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25175      # Do we have a bin/java?
25176      if test ! -x "$BOOT_JDK/bin/java"; then
25177        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25179        BOOT_JDK_FOUND=no
25180      else
25181        # Do we have a bin/javac?
25182        if test ! -x "$BOOT_JDK/bin/javac"; then
25183          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25185          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25186$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25187          BOOT_JDK_FOUND=no
25188        else
25189          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25190          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25191
25192          # Extra M4 quote needed to protect [] in grep expression.
25193          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25194          if test "x$FOUND_CORRECT_VERSION" = x; then
25195            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25197            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25198$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25199            BOOT_JDK_FOUND=no
25200          else
25201            # We're done! :-)
25202            BOOT_JDK_FOUND=yes
25203
25204  # Only process if variable expands to non-empty
25205
25206  if test "x$BOOT_JDK" != x; then
25207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25208
25209  # Input might be given as Windows format, start by converting to
25210  # unix format.
25211  path="$BOOT_JDK"
25212  new_path=`$CYGPATH -u "$path"`
25213
25214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25217  # "foo.exe" is OK but "foo" is an error.
25218  #
25219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25220  # It is also a way to make sure we got the proper file name for the real test later on.
25221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25222  if test "x$test_shortpath" = x; then
25223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25224$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25225    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25226  fi
25227
25228  # Call helper function which possibly converts this using DOS-style short mode.
25229  # If so, the updated path is stored in $new_path.
25230
25231  input_path="$new_path"
25232  # Check if we need to convert this using DOS-style short mode. If the path
25233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25234  # take no chances and rewrite it.
25235  # Note: m4 eats our [], so we need to use [ and ] instead.
25236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25237  if test "x$has_forbidden_chars" != x; then
25238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25242      # Going to short mode and back again did indeed matter. Since short mode is
25243      # case insensitive, let's make it lowercase to improve readability.
25244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25245      # Now convert it back to Unix-style (cygpath)
25246      input_path=`$CYGPATH -u "$shortmode_path"`
25247      new_path="$input_path"
25248    fi
25249  fi
25250
25251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25252  if test "x$test_cygdrive_prefix" = x; then
25253    # As a simple fix, exclude /usr/bin since it's not a real path.
25254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25256      # a path prefixed by /cygdrive for fixpath to work.
25257      new_path="$CYGWIN_ROOT_PATH$input_path"
25258    fi
25259  fi
25260
25261
25262  if test "x$path" != "x$new_path"; then
25263    BOOT_JDK="$new_path"
25264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25265$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25266  fi
25267
25268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25269
25270  path="$BOOT_JDK"
25271  has_colon=`$ECHO $path | $GREP ^.:`
25272  new_path="$path"
25273  if test "x$has_colon" = x; then
25274    # Not in mixed or Windows style, start by that.
25275    new_path=`cmd //c echo $path`
25276  fi
25277
25278
25279  input_path="$new_path"
25280  # Check if we need to convert this using DOS-style short mode. If the path
25281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25282  # take no chances and rewrite it.
25283  # Note: m4 eats our [], so we need to use [ and ] instead.
25284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25285  if test "x$has_forbidden_chars" != x; then
25286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25288  fi
25289
25290
25291  windows_path="$new_path"
25292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25293    unix_path=`$CYGPATH -u "$windows_path"`
25294    new_path="$unix_path"
25295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25297    new_path="$unix_path"
25298  fi
25299
25300  if test "x$path" != "x$new_path"; then
25301    BOOT_JDK="$new_path"
25302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25303$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25304  fi
25305
25306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25308
25309    else
25310      # We're on a unix platform. Hooray! :)
25311      path="$BOOT_JDK"
25312      has_space=`$ECHO "$path" | $GREP " "`
25313      if test "x$has_space" != x; then
25314        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25316        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25317      fi
25318
25319      # Use eval to expand a potential ~
25320      eval path="$path"
25321      if test ! -f "$path" && test ! -d "$path"; then
25322        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25323      fi
25324
25325      if test -d "$path"; then
25326        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25327      else
25328        dir="`$DIRNAME "$path"`"
25329        base="`$BASENAME "$path"`"
25330        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25331      fi
25332    fi
25333  fi
25334
25335            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25336$as_echo_n "checking for Boot JDK... " >&6; }
25337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25338$as_echo "$BOOT_JDK" >&6; }
25339            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25340$as_echo_n "checking Boot JDK version... " >&6; }
25341            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25343$as_echo "$BOOT_JDK_VERSION" >&6; }
25344          fi # end check jdk version
25345        fi # end check javac
25346      fi # end check java
25347    fi # end check boot jdk found
25348  fi
25349
25350
25351  if test "x$BOOT_JDK_FOUND" = xno; then
25352    # Now execute the test
25353
25354  if test -x /usr/libexec/java_home; then
25355    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25356    BOOT_JDK_FOUND=maybe
25357    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25358$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25359  fi
25360
25361
25362    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25363    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25364      # Do we have a bin/java?
25365      if test ! -x "$BOOT_JDK/bin/java"; then
25366        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25368        BOOT_JDK_FOUND=no
25369      else
25370        # Do we have a bin/javac?
25371        if test ! -x "$BOOT_JDK/bin/javac"; then
25372          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25374          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25375$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25376          BOOT_JDK_FOUND=no
25377        else
25378          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25379          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25380
25381          # Extra M4 quote needed to protect [] in grep expression.
25382          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25383          if test "x$FOUND_CORRECT_VERSION" = x; then
25384            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25386            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25387$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25388            BOOT_JDK_FOUND=no
25389          else
25390            # We're done! :-)
25391            BOOT_JDK_FOUND=yes
25392
25393  # Only process if variable expands to non-empty
25394
25395  if test "x$BOOT_JDK" != x; then
25396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25397
25398  # Input might be given as Windows format, start by converting to
25399  # unix format.
25400  path="$BOOT_JDK"
25401  new_path=`$CYGPATH -u "$path"`
25402
25403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25406  # "foo.exe" is OK but "foo" is an error.
25407  #
25408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25409  # It is also a way to make sure we got the proper file name for the real test later on.
25410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25411  if test "x$test_shortpath" = x; then
25412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25414    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25415  fi
25416
25417  # Call helper function which possibly converts this using DOS-style short mode.
25418  # If so, the updated path is stored in $new_path.
25419
25420  input_path="$new_path"
25421  # Check if we need to convert this using DOS-style short mode. If the path
25422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25423  # take no chances and rewrite it.
25424  # Note: m4 eats our [], so we need to use [ and ] instead.
25425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25426  if test "x$has_forbidden_chars" != x; then
25427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25431      # Going to short mode and back again did indeed matter. Since short mode is
25432      # case insensitive, let's make it lowercase to improve readability.
25433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25434      # Now convert it back to Unix-style (cygpath)
25435      input_path=`$CYGPATH -u "$shortmode_path"`
25436      new_path="$input_path"
25437    fi
25438  fi
25439
25440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25441  if test "x$test_cygdrive_prefix" = x; then
25442    # As a simple fix, exclude /usr/bin since it's not a real path.
25443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25445      # a path prefixed by /cygdrive for fixpath to work.
25446      new_path="$CYGWIN_ROOT_PATH$input_path"
25447    fi
25448  fi
25449
25450
25451  if test "x$path" != "x$new_path"; then
25452    BOOT_JDK="$new_path"
25453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25455  fi
25456
25457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25458
25459  path="$BOOT_JDK"
25460  has_colon=`$ECHO $path | $GREP ^.:`
25461  new_path="$path"
25462  if test "x$has_colon" = x; then
25463    # Not in mixed or Windows style, start by that.
25464    new_path=`cmd //c echo $path`
25465  fi
25466
25467
25468  input_path="$new_path"
25469  # Check if we need to convert this using DOS-style short mode. If the path
25470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25471  # take no chances and rewrite it.
25472  # Note: m4 eats our [], so we need to use [ and ] instead.
25473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25474  if test "x$has_forbidden_chars" != x; then
25475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25477  fi
25478
25479
25480  windows_path="$new_path"
25481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25482    unix_path=`$CYGPATH -u "$windows_path"`
25483    new_path="$unix_path"
25484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25486    new_path="$unix_path"
25487  fi
25488
25489  if test "x$path" != "x$new_path"; then
25490    BOOT_JDK="$new_path"
25491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25493  fi
25494
25495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25497
25498    else
25499      # We're on a unix platform. Hooray! :)
25500      path="$BOOT_JDK"
25501      has_space=`$ECHO "$path" | $GREP " "`
25502      if test "x$has_space" != x; then
25503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25506      fi
25507
25508      # Use eval to expand a potential ~
25509      eval path="$path"
25510      if test ! -f "$path" && test ! -d "$path"; then
25511        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25512      fi
25513
25514      if test -d "$path"; then
25515        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25516      else
25517        dir="`$DIRNAME "$path"`"
25518        base="`$BASENAME "$path"`"
25519        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25520      fi
25521    fi
25522  fi
25523
25524            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25525$as_echo_n "checking for Boot JDK... " >&6; }
25526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25527$as_echo "$BOOT_JDK" >&6; }
25528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25529$as_echo_n "checking Boot JDK version... " >&6; }
25530            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25532$as_echo "$BOOT_JDK_VERSION" >&6; }
25533          fi # end check jdk version
25534        fi # end check javac
25535      fi # end check java
25536    fi # end check boot jdk found
25537  fi
25538
25539
25540  if test "x$BOOT_JDK_FOUND" = xno; then
25541    # Now execute the test
25542
25543  if test -x /usr/libexec/java_home; then
25544    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25545    BOOT_JDK_FOUND=maybe
25546    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25547$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25548  fi
25549
25550
25551    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25552    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25553      # Do we have a bin/java?
25554      if test ! -x "$BOOT_JDK/bin/java"; then
25555        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25557        BOOT_JDK_FOUND=no
25558      else
25559        # Do we have a bin/javac?
25560        if test ! -x "$BOOT_JDK/bin/javac"; then
25561          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25563          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25564$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25565          BOOT_JDK_FOUND=no
25566        else
25567          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25568          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25569
25570          # Extra M4 quote needed to protect [] in grep expression.
25571          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25572          if test "x$FOUND_CORRECT_VERSION" = x; then
25573            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25575            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25576$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25577            BOOT_JDK_FOUND=no
25578          else
25579            # We're done! :-)
25580            BOOT_JDK_FOUND=yes
25581
25582  # Only process if variable expands to non-empty
25583
25584  if test "x$BOOT_JDK" != x; then
25585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25586
25587  # Input might be given as Windows format, start by converting to
25588  # unix format.
25589  path="$BOOT_JDK"
25590  new_path=`$CYGPATH -u "$path"`
25591
25592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25595  # "foo.exe" is OK but "foo" is an error.
25596  #
25597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25598  # It is also a way to make sure we got the proper file name for the real test later on.
25599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25600  if test "x$test_shortpath" = x; then
25601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25602$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25603    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25604  fi
25605
25606  # Call helper function which possibly converts this using DOS-style short mode.
25607  # If so, the updated path is stored in $new_path.
25608
25609  input_path="$new_path"
25610  # Check if we need to convert this using DOS-style short mode. If the path
25611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25612  # take no chances and rewrite it.
25613  # Note: m4 eats our [], so we need to use [ and ] instead.
25614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25615  if test "x$has_forbidden_chars" != x; then
25616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25620      # Going to short mode and back again did indeed matter. Since short mode is
25621      # case insensitive, let's make it lowercase to improve readability.
25622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25623      # Now convert it back to Unix-style (cygpath)
25624      input_path=`$CYGPATH -u "$shortmode_path"`
25625      new_path="$input_path"
25626    fi
25627  fi
25628
25629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25630  if test "x$test_cygdrive_prefix" = x; then
25631    # As a simple fix, exclude /usr/bin since it's not a real path.
25632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25634      # a path prefixed by /cygdrive for fixpath to work.
25635      new_path="$CYGWIN_ROOT_PATH$input_path"
25636    fi
25637  fi
25638
25639
25640  if test "x$path" != "x$new_path"; then
25641    BOOT_JDK="$new_path"
25642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25644  fi
25645
25646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25647
25648  path="$BOOT_JDK"
25649  has_colon=`$ECHO $path | $GREP ^.:`
25650  new_path="$path"
25651  if test "x$has_colon" = x; then
25652    # Not in mixed or Windows style, start by that.
25653    new_path=`cmd //c echo $path`
25654  fi
25655
25656
25657  input_path="$new_path"
25658  # Check if we need to convert this using DOS-style short mode. If the path
25659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25660  # take no chances and rewrite it.
25661  # Note: m4 eats our [], so we need to use [ and ] instead.
25662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25663  if test "x$has_forbidden_chars" != x; then
25664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25666  fi
25667
25668
25669  windows_path="$new_path"
25670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25671    unix_path=`$CYGPATH -u "$windows_path"`
25672    new_path="$unix_path"
25673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25675    new_path="$unix_path"
25676  fi
25677
25678  if test "x$path" != "x$new_path"; then
25679    BOOT_JDK="$new_path"
25680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25682  fi
25683
25684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25686
25687    else
25688      # We're on a unix platform. Hooray! :)
25689      path="$BOOT_JDK"
25690      has_space=`$ECHO "$path" | $GREP " "`
25691      if test "x$has_space" != x; then
25692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25693$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25695      fi
25696
25697      # Use eval to expand a potential ~
25698      eval path="$path"
25699      if test ! -f "$path" && test ! -d "$path"; then
25700        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25701      fi
25702
25703      if test -d "$path"; then
25704        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25705      else
25706        dir="`$DIRNAME "$path"`"
25707        base="`$BASENAME "$path"`"
25708        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25709      fi
25710    fi
25711  fi
25712
25713            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25714$as_echo_n "checking for Boot JDK... " >&6; }
25715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25716$as_echo "$BOOT_JDK" >&6; }
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25718$as_echo_n "checking Boot JDK version... " >&6; }
25719            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25721$as_echo "$BOOT_JDK_VERSION" >&6; }
25722          fi # end check jdk version
25723        fi # end check javac
25724      fi # end check java
25725    fi # end check boot jdk found
25726  fi
25727
25728  fi
25729
25730
25731    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25732    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25733      # Do we have a bin/java?
25734      if test ! -x "$BOOT_JDK/bin/java"; then
25735        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25737        BOOT_JDK_FOUND=no
25738      else
25739        # Do we have a bin/javac?
25740        if test ! -x "$BOOT_JDK/bin/javac"; then
25741          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25743          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25744$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25745          BOOT_JDK_FOUND=no
25746        else
25747          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25748          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25749
25750          # Extra M4 quote needed to protect [] in grep expression.
25751          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25752          if test "x$FOUND_CORRECT_VERSION" = x; then
25753            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25755            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25756$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25757            BOOT_JDK_FOUND=no
25758          else
25759            # We're done! :-)
25760            BOOT_JDK_FOUND=yes
25761
25762  # Only process if variable expands to non-empty
25763
25764  if test "x$BOOT_JDK" != x; then
25765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25766
25767  # Input might be given as Windows format, start by converting to
25768  # unix format.
25769  path="$BOOT_JDK"
25770  new_path=`$CYGPATH -u "$path"`
25771
25772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25775  # "foo.exe" is OK but "foo" is an error.
25776  #
25777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25778  # It is also a way to make sure we got the proper file name for the real test later on.
25779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25780  if test "x$test_shortpath" = x; then
25781    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25782$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25783    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25784  fi
25785
25786  # Call helper function which possibly converts this using DOS-style short mode.
25787  # If so, the updated path is stored in $new_path.
25788
25789  input_path="$new_path"
25790  # Check if we need to convert this using DOS-style short mode. If the path
25791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25792  # take no chances and rewrite it.
25793  # Note: m4 eats our [], so we need to use [ and ] instead.
25794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25795  if test "x$has_forbidden_chars" != x; then
25796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25800      # Going to short mode and back again did indeed matter. Since short mode is
25801      # case insensitive, let's make it lowercase to improve readability.
25802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25803      # Now convert it back to Unix-style (cygpath)
25804      input_path=`$CYGPATH -u "$shortmode_path"`
25805      new_path="$input_path"
25806    fi
25807  fi
25808
25809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25810  if test "x$test_cygdrive_prefix" = x; then
25811    # As a simple fix, exclude /usr/bin since it's not a real path.
25812    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25814      # a path prefixed by /cygdrive for fixpath to work.
25815      new_path="$CYGWIN_ROOT_PATH$input_path"
25816    fi
25817  fi
25818
25819
25820  if test "x$path" != "x$new_path"; then
25821    BOOT_JDK="$new_path"
25822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25823$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25824  fi
25825
25826    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25827
25828  path="$BOOT_JDK"
25829  has_colon=`$ECHO $path | $GREP ^.:`
25830  new_path="$path"
25831  if test "x$has_colon" = x; then
25832    # Not in mixed or Windows style, start by that.
25833    new_path=`cmd //c echo $path`
25834  fi
25835
25836
25837  input_path="$new_path"
25838  # Check if we need to convert this using DOS-style short mode. If the path
25839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25840  # take no chances and rewrite it.
25841  # Note: m4 eats our [], so we need to use [ and ] instead.
25842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25843  if test "x$has_forbidden_chars" != x; then
25844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25846  fi
25847
25848
25849  windows_path="$new_path"
25850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25851    unix_path=`$CYGPATH -u "$windows_path"`
25852    new_path="$unix_path"
25853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25855    new_path="$unix_path"
25856  fi
25857
25858  if test "x$path" != "x$new_path"; then
25859    BOOT_JDK="$new_path"
25860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25861$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25862  fi
25863
25864  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25865  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25866
25867    else
25868      # We're on a unix platform. Hooray! :)
25869      path="$BOOT_JDK"
25870      has_space=`$ECHO "$path" | $GREP " "`
25871      if test "x$has_space" != x; then
25872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25873$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25874        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25875      fi
25876
25877      # Use eval to expand a potential ~
25878      eval path="$path"
25879      if test ! -f "$path" && test ! -d "$path"; then
25880        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25881      fi
25882
25883      if test -d "$path"; then
25884        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25885      else
25886        dir="`$DIRNAME "$path"`"
25887        base="`$BASENAME "$path"`"
25888        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25889      fi
25890    fi
25891  fi
25892
25893            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25894$as_echo_n "checking for Boot JDK... " >&6; }
25895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25896$as_echo "$BOOT_JDK" >&6; }
25897            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25898$as_echo_n "checking Boot JDK version... " >&6; }
25899            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25901$as_echo "$BOOT_JDK_VERSION" >&6; }
25902          fi # end check jdk version
25903        fi # end check javac
25904      fi # end check java
25905    fi # end check boot jdk found
25906  fi
25907
25908
25909  # Test: Is $JAVA_HOME set?
25910
25911  if test "x$BOOT_JDK_FOUND" = xno; then
25912    # Now execute the test
25913
25914  if test "x$JAVA_HOME" != x; then
25915    JAVA_HOME_PROCESSED="$JAVA_HOME"
25916
25917  # Only process if variable expands to non-empty
25918
25919  if test "x$JAVA_HOME_PROCESSED" != x; then
25920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25921
25922  # Input might be given as Windows format, start by converting to
25923  # unix format.
25924  path="$JAVA_HOME_PROCESSED"
25925  new_path=`$CYGPATH -u "$path"`
25926
25927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25930  # "foo.exe" is OK but "foo" is an error.
25931  #
25932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25933  # It is also a way to make sure we got the proper file name for the real test later on.
25934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25935  if test "x$test_shortpath" = x; then
25936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25937$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25938    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25939  fi
25940
25941  # Call helper function which possibly converts this using DOS-style short mode.
25942  # If so, the updated path is stored in $new_path.
25943
25944  input_path="$new_path"
25945  # Check if we need to convert this using DOS-style short mode. If the path
25946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25947  # take no chances and rewrite it.
25948  # Note: m4 eats our [], so we need to use [ and ] instead.
25949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25950  if test "x$has_forbidden_chars" != x; then
25951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25955      # Going to short mode and back again did indeed matter. Since short mode is
25956      # case insensitive, let's make it lowercase to improve readability.
25957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25958      # Now convert it back to Unix-style (cygpath)
25959      input_path=`$CYGPATH -u "$shortmode_path"`
25960      new_path="$input_path"
25961    fi
25962  fi
25963
25964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25965  if test "x$test_cygdrive_prefix" = x; then
25966    # As a simple fix, exclude /usr/bin since it's not a real path.
25967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25969      # a path prefixed by /cygdrive for fixpath to work.
25970      new_path="$CYGWIN_ROOT_PATH$input_path"
25971    fi
25972  fi
25973
25974
25975  if test "x$path" != "x$new_path"; then
25976    JAVA_HOME_PROCESSED="$new_path"
25977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25978$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25979  fi
25980
25981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25982
25983  path="$JAVA_HOME_PROCESSED"
25984  has_colon=`$ECHO $path | $GREP ^.:`
25985  new_path="$path"
25986  if test "x$has_colon" = x; then
25987    # Not in mixed or Windows style, start by that.
25988    new_path=`cmd //c echo $path`
25989  fi
25990
25991
25992  input_path="$new_path"
25993  # Check if we need to convert this using DOS-style short mode. If the path
25994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25995  # take no chances and rewrite it.
25996  # Note: m4 eats our [], so we need to use [ and ] instead.
25997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25998  if test "x$has_forbidden_chars" != x; then
25999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26001  fi
26002
26003
26004  windows_path="$new_path"
26005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26006    unix_path=`$CYGPATH -u "$windows_path"`
26007    new_path="$unix_path"
26008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26010    new_path="$unix_path"
26011  fi
26012
26013  if test "x$path" != "x$new_path"; then
26014    JAVA_HOME_PROCESSED="$new_path"
26015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26016$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26017  fi
26018
26019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26021
26022    else
26023      # We're on a unix platform. Hooray! :)
26024      path="$JAVA_HOME_PROCESSED"
26025      has_space=`$ECHO "$path" | $GREP " "`
26026      if test "x$has_space" != x; then
26027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26028$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26029        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26030      fi
26031
26032      # Use eval to expand a potential ~
26033      eval path="$path"
26034      if test ! -f "$path" && test ! -d "$path"; then
26035        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26036      fi
26037
26038      if test -d "$path"; then
26039        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26040      else
26041        dir="`$DIRNAME "$path"`"
26042        base="`$BASENAME "$path"`"
26043        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26044      fi
26045    fi
26046  fi
26047
26048    if test ! -d "$JAVA_HOME_PROCESSED"; then
26049      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26050$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26051    else
26052      # Aha, the user has set a JAVA_HOME
26053      # let us use that as the Boot JDK.
26054      BOOT_JDK="$JAVA_HOME_PROCESSED"
26055      BOOT_JDK_FOUND=maybe
26056      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26057$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26058    fi
26059  fi
26060
26061
26062    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26063    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26064      # Do we have a bin/java?
26065      if test ! -x "$BOOT_JDK/bin/java"; then
26066        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26068        BOOT_JDK_FOUND=no
26069      else
26070        # Do we have a bin/javac?
26071        if test ! -x "$BOOT_JDK/bin/javac"; then
26072          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26074          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26075$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26076          BOOT_JDK_FOUND=no
26077        else
26078          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26079          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26080
26081          # Extra M4 quote needed to protect [] in grep expression.
26082          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26083          if test "x$FOUND_CORRECT_VERSION" = x; then
26084            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26086            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26087$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26088            BOOT_JDK_FOUND=no
26089          else
26090            # We're done! :-)
26091            BOOT_JDK_FOUND=yes
26092
26093  # Only process if variable expands to non-empty
26094
26095  if test "x$BOOT_JDK" != x; then
26096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26097
26098  # Input might be given as Windows format, start by converting to
26099  # unix format.
26100  path="$BOOT_JDK"
26101  new_path=`$CYGPATH -u "$path"`
26102
26103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26106  # "foo.exe" is OK but "foo" is an error.
26107  #
26108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26109  # It is also a way to make sure we got the proper file name for the real test later on.
26110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26111  if test "x$test_shortpath" = x; then
26112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26113$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26114    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26115  fi
26116
26117  # Call helper function which possibly converts this using DOS-style short mode.
26118  # If so, the updated path is stored in $new_path.
26119
26120  input_path="$new_path"
26121  # Check if we need to convert this using DOS-style short mode. If the path
26122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26123  # take no chances and rewrite it.
26124  # Note: m4 eats our [], so we need to use [ and ] instead.
26125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26126  if test "x$has_forbidden_chars" != x; then
26127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26131      # Going to short mode and back again did indeed matter. Since short mode is
26132      # case insensitive, let's make it lowercase to improve readability.
26133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26134      # Now convert it back to Unix-style (cygpath)
26135      input_path=`$CYGPATH -u "$shortmode_path"`
26136      new_path="$input_path"
26137    fi
26138  fi
26139
26140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26141  if test "x$test_cygdrive_prefix" = x; then
26142    # As a simple fix, exclude /usr/bin since it's not a real path.
26143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26145      # a path prefixed by /cygdrive for fixpath to work.
26146      new_path="$CYGWIN_ROOT_PATH$input_path"
26147    fi
26148  fi
26149
26150
26151  if test "x$path" != "x$new_path"; then
26152    BOOT_JDK="$new_path"
26153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26154$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26155  fi
26156
26157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26158
26159  path="$BOOT_JDK"
26160  has_colon=`$ECHO $path | $GREP ^.:`
26161  new_path="$path"
26162  if test "x$has_colon" = x; then
26163    # Not in mixed or Windows style, start by that.
26164    new_path=`cmd //c echo $path`
26165  fi
26166
26167
26168  input_path="$new_path"
26169  # Check if we need to convert this using DOS-style short mode. If the path
26170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26171  # take no chances and rewrite it.
26172  # Note: m4 eats our [], so we need to use [ and ] instead.
26173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26174  if test "x$has_forbidden_chars" != x; then
26175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26177  fi
26178
26179
26180  windows_path="$new_path"
26181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26182    unix_path=`$CYGPATH -u "$windows_path"`
26183    new_path="$unix_path"
26184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26186    new_path="$unix_path"
26187  fi
26188
26189  if test "x$path" != "x$new_path"; then
26190    BOOT_JDK="$new_path"
26191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26193  fi
26194
26195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26197
26198    else
26199      # We're on a unix platform. Hooray! :)
26200      path="$BOOT_JDK"
26201      has_space=`$ECHO "$path" | $GREP " "`
26202      if test "x$has_space" != x; then
26203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26204$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26206      fi
26207
26208      # Use eval to expand a potential ~
26209      eval path="$path"
26210      if test ! -f "$path" && test ! -d "$path"; then
26211        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26212      fi
26213
26214      if test -d "$path"; then
26215        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26216      else
26217        dir="`$DIRNAME "$path"`"
26218        base="`$BASENAME "$path"`"
26219        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26220      fi
26221    fi
26222  fi
26223
26224            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26225$as_echo_n "checking for Boot JDK... " >&6; }
26226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26227$as_echo "$BOOT_JDK" >&6; }
26228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26229$as_echo_n "checking Boot JDK version... " >&6; }
26230            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26232$as_echo "$BOOT_JDK_VERSION" >&6; }
26233          fi # end check jdk version
26234        fi # end check javac
26235      fi # end check java
26236    fi # end check boot jdk found
26237  fi
26238
26239
26240  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26241
26242  if test "x$BOOT_JDK_FOUND" = xno; then
26243    # Now execute the test
26244
26245  # Extract the first word of "javac", so it can be a program name with args.
26246set dummy javac; ac_word=$2
26247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26248$as_echo_n "checking for $ac_word... " >&6; }
26249if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26250  $as_echo_n "(cached) " >&6
26251else
26252  case $JAVAC_CHECK in
26253  [\\/]* | ?:[\\/]*)
26254  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26255  ;;
26256  *)
26257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26258for as_dir in $PATH
26259do
26260  IFS=$as_save_IFS
26261  test -z "$as_dir" && as_dir=.
26262    for ac_exec_ext in '' $ac_executable_extensions; do
26263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26264    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26266    break 2
26267  fi
26268done
26269  done
26270IFS=$as_save_IFS
26271
26272  ;;
26273esac
26274fi
26275JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26276if test -n "$JAVAC_CHECK"; then
26277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26278$as_echo "$JAVAC_CHECK" >&6; }
26279else
26280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26281$as_echo "no" >&6; }
26282fi
26283
26284
26285  # Extract the first word of "java", so it can be a program name with args.
26286set dummy java; ac_word=$2
26287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26288$as_echo_n "checking for $ac_word... " >&6; }
26289if ${ac_cv_path_JAVA_CHECK+:} false; then :
26290  $as_echo_n "(cached) " >&6
26291else
26292  case $JAVA_CHECK in
26293  [\\/]* | ?:[\\/]*)
26294  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26295  ;;
26296  *)
26297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26298for as_dir in $PATH
26299do
26300  IFS=$as_save_IFS
26301  test -z "$as_dir" && as_dir=.
26302    for ac_exec_ext in '' $ac_executable_extensions; do
26303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26304    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26306    break 2
26307  fi
26308done
26309  done
26310IFS=$as_save_IFS
26311
26312  ;;
26313esac
26314fi
26315JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26316if test -n "$JAVA_CHECK"; then
26317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26318$as_echo "$JAVA_CHECK" >&6; }
26319else
26320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26321$as_echo "no" >&6; }
26322fi
26323
26324
26325  BINARY="$JAVAC_CHECK"
26326  if test "x$JAVAC_CHECK" = x; then
26327    BINARY="$JAVA_CHECK"
26328  fi
26329  if test "x$BINARY" != x; then
26330    # So there is a java(c) binary, it might be part of a JDK.
26331    # Lets find the JDK/JRE directory by following symbolic links.
26332    # Linux/GNU systems often have links from /usr/bin/java to
26333    # /etc/alternatives/java to the real JDK binary.
26334
26335  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26336    # Follow a chain of symbolic links. Use readlink
26337    # where it exists, else fall back to horribly
26338    # complicated shell code.
26339    if test "x$READLINK_TESTED" != yes; then
26340      # On MacOSX there is a readlink tool with a different
26341      # purpose than the GNU readlink tool. Check the found readlink.
26342      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26343      if test "x$ISGNU" = x; then
26344        # A readlink that we do not know how to use.
26345        # Are there other non-GNU readlinks out there?
26346        READLINK_TESTED=yes
26347        READLINK=
26348      fi
26349    fi
26350
26351    if test "x$READLINK" != x; then
26352      BINARY=`$READLINK -f $BINARY`
26353    else
26354      # Save the current directory for restoring afterwards
26355      STARTDIR=$PWD
26356      COUNTER=0
26357      sym_link_dir=`$DIRNAME $BINARY`
26358      sym_link_file=`$BASENAME $BINARY`
26359      cd $sym_link_dir
26360      # Use -P flag to resolve symlinks in directories.
26361      cd `$THEPWDCMD -P`
26362      sym_link_dir=`$THEPWDCMD -P`
26363      # Resolve file symlinks
26364      while test $COUNTER -lt 20; do
26365        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26366        if test "x$ISLINK" == x; then
26367          # This is not a symbolic link! We are done!
26368          break
26369        fi
26370        # Again resolve directory symlinks since the target of the just found
26371        # link could be in a different directory
26372        cd `$DIRNAME $ISLINK`
26373        sym_link_dir=`$THEPWDCMD -P`
26374        sym_link_file=`$BASENAME $ISLINK`
26375        let COUNTER=COUNTER+1
26376      done
26377      cd $STARTDIR
26378      BINARY=$sym_link_dir/$sym_link_file
26379    fi
26380  fi
26381
26382    BOOT_JDK=`dirname "$BINARY"`
26383    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26384    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26385      # Looks like we found ourselves an JDK
26386      BOOT_JDK_FOUND=maybe
26387      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26388$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26389    fi
26390  fi
26391
26392
26393    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26394    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26395      # Do we have a bin/java?
26396      if test ! -x "$BOOT_JDK/bin/java"; then
26397        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26399        BOOT_JDK_FOUND=no
26400      else
26401        # Do we have a bin/javac?
26402        if test ! -x "$BOOT_JDK/bin/javac"; then
26403          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26405          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26406$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26407          BOOT_JDK_FOUND=no
26408        else
26409          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26410          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26411
26412          # Extra M4 quote needed to protect [] in grep expression.
26413          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26414          if test "x$FOUND_CORRECT_VERSION" = x; then
26415            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26417            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26418$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26419            BOOT_JDK_FOUND=no
26420          else
26421            # We're done! :-)
26422            BOOT_JDK_FOUND=yes
26423
26424  # Only process if variable expands to non-empty
26425
26426  if test "x$BOOT_JDK" != x; then
26427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26428
26429  # Input might be given as Windows format, start by converting to
26430  # unix format.
26431  path="$BOOT_JDK"
26432  new_path=`$CYGPATH -u "$path"`
26433
26434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26437  # "foo.exe" is OK but "foo" is an error.
26438  #
26439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26440  # It is also a way to make sure we got the proper file name for the real test later on.
26441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26442  if test "x$test_shortpath" = x; then
26443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26444$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26445    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26446  fi
26447
26448  # Call helper function which possibly converts this using DOS-style short mode.
26449  # If so, the updated path is stored in $new_path.
26450
26451  input_path="$new_path"
26452  # Check if we need to convert this using DOS-style short mode. If the path
26453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26454  # take no chances and rewrite it.
26455  # Note: m4 eats our [], so we need to use [ and ] instead.
26456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26457  if test "x$has_forbidden_chars" != x; then
26458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26462      # Going to short mode and back again did indeed matter. Since short mode is
26463      # case insensitive, let's make it lowercase to improve readability.
26464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26465      # Now convert it back to Unix-style (cygpath)
26466      input_path=`$CYGPATH -u "$shortmode_path"`
26467      new_path="$input_path"
26468    fi
26469  fi
26470
26471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26472  if test "x$test_cygdrive_prefix" = x; then
26473    # As a simple fix, exclude /usr/bin since it's not a real path.
26474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26476      # a path prefixed by /cygdrive for fixpath to work.
26477      new_path="$CYGWIN_ROOT_PATH$input_path"
26478    fi
26479  fi
26480
26481
26482  if test "x$path" != "x$new_path"; then
26483    BOOT_JDK="$new_path"
26484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26485$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26486  fi
26487
26488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26489
26490  path="$BOOT_JDK"
26491  has_colon=`$ECHO $path | $GREP ^.:`
26492  new_path="$path"
26493  if test "x$has_colon" = x; then
26494    # Not in mixed or Windows style, start by that.
26495    new_path=`cmd //c echo $path`
26496  fi
26497
26498
26499  input_path="$new_path"
26500  # Check if we need to convert this using DOS-style short mode. If the path
26501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26502  # take no chances and rewrite it.
26503  # Note: m4 eats our [], so we need to use [ and ] instead.
26504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26505  if test "x$has_forbidden_chars" != x; then
26506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26508  fi
26509
26510
26511  windows_path="$new_path"
26512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26513    unix_path=`$CYGPATH -u "$windows_path"`
26514    new_path="$unix_path"
26515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26517    new_path="$unix_path"
26518  fi
26519
26520  if test "x$path" != "x$new_path"; then
26521    BOOT_JDK="$new_path"
26522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26523$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26524  fi
26525
26526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26528
26529    else
26530      # We're on a unix platform. Hooray! :)
26531      path="$BOOT_JDK"
26532      has_space=`$ECHO "$path" | $GREP " "`
26533      if test "x$has_space" != x; then
26534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26535$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26536        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26537      fi
26538
26539      # Use eval to expand a potential ~
26540      eval path="$path"
26541      if test ! -f "$path" && test ! -d "$path"; then
26542        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26543      fi
26544
26545      if test -d "$path"; then
26546        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26547      else
26548        dir="`$DIRNAME "$path"`"
26549        base="`$BASENAME "$path"`"
26550        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26551      fi
26552    fi
26553  fi
26554
26555            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26556$as_echo_n "checking for Boot JDK... " >&6; }
26557            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26558$as_echo "$BOOT_JDK" >&6; }
26559            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26560$as_echo_n "checking Boot JDK version... " >&6; }
26561            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26563$as_echo "$BOOT_JDK_VERSION" >&6; }
26564          fi # end check jdk version
26565        fi # end check javac
26566      fi # end check java
26567    fi # end check boot jdk found
26568  fi
26569
26570
26571  # Test: Is there a JDK installed in default, well-known locations?
26572
26573  if test "x$BOOT_JDK_FOUND" = xno; then
26574    # Now execute the test
26575
26576  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26577
26578  if test "x$BOOT_JDK_FOUND" = xno; then
26579    # Now execute the test
26580
26581  if test "x$ProgramW6432" != x; then
26582    VIRTUAL_DIR="$ProgramW6432/Java"
26583
26584  windows_path="$VIRTUAL_DIR"
26585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26586    unix_path=`$CYGPATH -u "$windows_path"`
26587    VIRTUAL_DIR="$unix_path"
26588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26590    VIRTUAL_DIR="$unix_path"
26591  fi
26592
26593
26594  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26595  BOOT_JDK_SUFFIX=""
26596  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26597  if test "x$ALL_JDKS_FOUND" != x; then
26598    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26599
26600  if test "x$BOOT_JDK_FOUND" = xno; then
26601    # Now execute the test
26602
26603        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26604        if test -d "$BOOT_JDK"; then
26605          BOOT_JDK_FOUND=maybe
26606          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26607$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26608        fi
26609
26610
26611    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26612    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26613      # Do we have a bin/java?
26614      if test ! -x "$BOOT_JDK/bin/java"; then
26615        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26617        BOOT_JDK_FOUND=no
26618      else
26619        # Do we have a bin/javac?
26620        if test ! -x "$BOOT_JDK/bin/javac"; then
26621          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26623          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26624$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26625          BOOT_JDK_FOUND=no
26626        else
26627          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26628          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26629
26630          # Extra M4 quote needed to protect [] in grep expression.
26631          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26632          if test "x$FOUND_CORRECT_VERSION" = x; then
26633            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26634$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26635            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26636$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26637            BOOT_JDK_FOUND=no
26638          else
26639            # We're done! :-)
26640            BOOT_JDK_FOUND=yes
26641
26642  # Only process if variable expands to non-empty
26643
26644  if test "x$BOOT_JDK" != x; then
26645    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26646
26647  # Input might be given as Windows format, start by converting to
26648  # unix format.
26649  path="$BOOT_JDK"
26650  new_path=`$CYGPATH -u "$path"`
26651
26652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26655  # "foo.exe" is OK but "foo" is an error.
26656  #
26657  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26658  # It is also a way to make sure we got the proper file name for the real test later on.
26659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26660  if test "x$test_shortpath" = x; then
26661    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26662$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26663    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26664  fi
26665
26666  # Call helper function which possibly converts this using DOS-style short mode.
26667  # If so, the updated path is stored in $new_path.
26668
26669  input_path="$new_path"
26670  # Check if we need to convert this using DOS-style short mode. If the path
26671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26672  # take no chances and rewrite it.
26673  # Note: m4 eats our [], so we need to use [ and ] instead.
26674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26675  if test "x$has_forbidden_chars" != x; then
26676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26680      # Going to short mode and back again did indeed matter. Since short mode is
26681      # case insensitive, let's make it lowercase to improve readability.
26682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26683      # Now convert it back to Unix-style (cygpath)
26684      input_path=`$CYGPATH -u "$shortmode_path"`
26685      new_path="$input_path"
26686    fi
26687  fi
26688
26689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26690  if test "x$test_cygdrive_prefix" = x; then
26691    # As a simple fix, exclude /usr/bin since it's not a real path.
26692    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26694      # a path prefixed by /cygdrive for fixpath to work.
26695      new_path="$CYGWIN_ROOT_PATH$input_path"
26696    fi
26697  fi
26698
26699
26700  if test "x$path" != "x$new_path"; then
26701    BOOT_JDK="$new_path"
26702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26703$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26704  fi
26705
26706    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26707
26708  path="$BOOT_JDK"
26709  has_colon=`$ECHO $path | $GREP ^.:`
26710  new_path="$path"
26711  if test "x$has_colon" = x; then
26712    # Not in mixed or Windows style, start by that.
26713    new_path=`cmd //c echo $path`
26714  fi
26715
26716
26717  input_path="$new_path"
26718  # Check if we need to convert this using DOS-style short mode. If the path
26719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26720  # take no chances and rewrite it.
26721  # Note: m4 eats our [], so we need to use [ and ] instead.
26722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26723  if test "x$has_forbidden_chars" != x; then
26724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26726  fi
26727
26728
26729  windows_path="$new_path"
26730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26731    unix_path=`$CYGPATH -u "$windows_path"`
26732    new_path="$unix_path"
26733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26735    new_path="$unix_path"
26736  fi
26737
26738  if test "x$path" != "x$new_path"; then
26739    BOOT_JDK="$new_path"
26740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26741$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26742  fi
26743
26744  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26745  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26746
26747    else
26748      # We're on a unix platform. Hooray! :)
26749      path="$BOOT_JDK"
26750      has_space=`$ECHO "$path" | $GREP " "`
26751      if test "x$has_space" != x; then
26752        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26754        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26755      fi
26756
26757      # Use eval to expand a potential ~
26758      eval path="$path"
26759      if test ! -f "$path" && test ! -d "$path"; then
26760        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26761      fi
26762
26763      if test -d "$path"; then
26764        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26765      else
26766        dir="`$DIRNAME "$path"`"
26767        base="`$BASENAME "$path"`"
26768        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26769      fi
26770    fi
26771  fi
26772
26773            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26774$as_echo_n "checking for Boot JDK... " >&6; }
26775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26776$as_echo "$BOOT_JDK" >&6; }
26777            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26778$as_echo_n "checking Boot JDK version... " >&6; }
26779            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26781$as_echo "$BOOT_JDK_VERSION" >&6; }
26782          fi # end check jdk version
26783        fi # end check javac
26784      fi # end check java
26785    fi # end check boot jdk found
26786  fi
26787
26788    done
26789  fi
26790
26791  fi
26792
26793
26794    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26795    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26796      # Do we have a bin/java?
26797      if test ! -x "$BOOT_JDK/bin/java"; then
26798        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26800        BOOT_JDK_FOUND=no
26801      else
26802        # Do we have a bin/javac?
26803        if test ! -x "$BOOT_JDK/bin/javac"; then
26804          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26806          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26807$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26808          BOOT_JDK_FOUND=no
26809        else
26810          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26811          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26812
26813          # Extra M4 quote needed to protect [] in grep expression.
26814          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26815          if test "x$FOUND_CORRECT_VERSION" = x; then
26816            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26818            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26819$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26820            BOOT_JDK_FOUND=no
26821          else
26822            # We're done! :-)
26823            BOOT_JDK_FOUND=yes
26824
26825  # Only process if variable expands to non-empty
26826
26827  if test "x$BOOT_JDK" != x; then
26828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26829
26830  # Input might be given as Windows format, start by converting to
26831  # unix format.
26832  path="$BOOT_JDK"
26833  new_path=`$CYGPATH -u "$path"`
26834
26835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26838  # "foo.exe" is OK but "foo" is an error.
26839  #
26840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26841  # It is also a way to make sure we got the proper file name for the real test later on.
26842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26843  if test "x$test_shortpath" = x; then
26844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26845$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26846    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26847  fi
26848
26849  # Call helper function which possibly converts this using DOS-style short mode.
26850  # If so, the updated path is stored in $new_path.
26851
26852  input_path="$new_path"
26853  # Check if we need to convert this using DOS-style short mode. If the path
26854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26855  # take no chances and rewrite it.
26856  # Note: m4 eats our [], so we need to use [ and ] instead.
26857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26858  if test "x$has_forbidden_chars" != x; then
26859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26863      # Going to short mode and back again did indeed matter. Since short mode is
26864      # case insensitive, let's make it lowercase to improve readability.
26865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26866      # Now convert it back to Unix-style (cygpath)
26867      input_path=`$CYGPATH -u "$shortmode_path"`
26868      new_path="$input_path"
26869    fi
26870  fi
26871
26872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26873  if test "x$test_cygdrive_prefix" = x; then
26874    # As a simple fix, exclude /usr/bin since it's not a real path.
26875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26877      # a path prefixed by /cygdrive for fixpath to work.
26878      new_path="$CYGWIN_ROOT_PATH$input_path"
26879    fi
26880  fi
26881
26882
26883  if test "x$path" != "x$new_path"; then
26884    BOOT_JDK="$new_path"
26885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26886$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26887  fi
26888
26889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26890
26891  path="$BOOT_JDK"
26892  has_colon=`$ECHO $path | $GREP ^.:`
26893  new_path="$path"
26894  if test "x$has_colon" = x; then
26895    # Not in mixed or Windows style, start by that.
26896    new_path=`cmd //c echo $path`
26897  fi
26898
26899
26900  input_path="$new_path"
26901  # Check if we need to convert this using DOS-style short mode. If the path
26902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26903  # take no chances and rewrite it.
26904  # Note: m4 eats our [], so we need to use [ and ] instead.
26905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26906  if test "x$has_forbidden_chars" != x; then
26907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26909  fi
26910
26911
26912  windows_path="$new_path"
26913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26914    unix_path=`$CYGPATH -u "$windows_path"`
26915    new_path="$unix_path"
26916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26918    new_path="$unix_path"
26919  fi
26920
26921  if test "x$path" != "x$new_path"; then
26922    BOOT_JDK="$new_path"
26923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26924$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26925  fi
26926
26927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26929
26930    else
26931      # We're on a unix platform. Hooray! :)
26932      path="$BOOT_JDK"
26933      has_space=`$ECHO "$path" | $GREP " "`
26934      if test "x$has_space" != x; then
26935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26936$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26938      fi
26939
26940      # Use eval to expand a potential ~
26941      eval path="$path"
26942      if test ! -f "$path" && test ! -d "$path"; then
26943        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26944      fi
26945
26946      if test -d "$path"; then
26947        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26948      else
26949        dir="`$DIRNAME "$path"`"
26950        base="`$BASENAME "$path"`"
26951        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26952      fi
26953    fi
26954  fi
26955
26956            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26957$as_echo_n "checking for Boot JDK... " >&6; }
26958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26959$as_echo "$BOOT_JDK" >&6; }
26960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26961$as_echo_n "checking Boot JDK version... " >&6; }
26962            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26964$as_echo "$BOOT_JDK_VERSION" >&6; }
26965          fi # end check jdk version
26966        fi # end check javac
26967      fi # end check java
26968    fi # end check boot jdk found
26969  fi
26970
26971
26972  if test "x$BOOT_JDK_FOUND" = xno; then
26973    # Now execute the test
26974
26975  if test "x$PROGRAMW6432" != x; then
26976    VIRTUAL_DIR="$PROGRAMW6432/Java"
26977
26978  windows_path="$VIRTUAL_DIR"
26979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26980    unix_path=`$CYGPATH -u "$windows_path"`
26981    VIRTUAL_DIR="$unix_path"
26982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26984    VIRTUAL_DIR="$unix_path"
26985  fi
26986
26987
26988  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26989  BOOT_JDK_SUFFIX=""
26990  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26991  if test "x$ALL_JDKS_FOUND" != x; then
26992    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26993
26994  if test "x$BOOT_JDK_FOUND" = xno; then
26995    # Now execute the test
26996
26997        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26998        if test -d "$BOOT_JDK"; then
26999          BOOT_JDK_FOUND=maybe
27000          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27001$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27002        fi
27003
27004
27005    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27006    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27007      # Do we have a bin/java?
27008      if test ! -x "$BOOT_JDK/bin/java"; then
27009        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27011        BOOT_JDK_FOUND=no
27012      else
27013        # Do we have a bin/javac?
27014        if test ! -x "$BOOT_JDK/bin/javac"; then
27015          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27017          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27018$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27019          BOOT_JDK_FOUND=no
27020        else
27021          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27022          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27023
27024          # Extra M4 quote needed to protect [] in grep expression.
27025          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27026          if test "x$FOUND_CORRECT_VERSION" = x; then
27027            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27029            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27030$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27031            BOOT_JDK_FOUND=no
27032          else
27033            # We're done! :-)
27034            BOOT_JDK_FOUND=yes
27035
27036  # Only process if variable expands to non-empty
27037
27038  if test "x$BOOT_JDK" != x; then
27039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27040
27041  # Input might be given as Windows format, start by converting to
27042  # unix format.
27043  path="$BOOT_JDK"
27044  new_path=`$CYGPATH -u "$path"`
27045
27046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27049  # "foo.exe" is OK but "foo" is an error.
27050  #
27051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27052  # It is also a way to make sure we got the proper file name for the real test later on.
27053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27054  if test "x$test_shortpath" = x; then
27055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27056$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27057    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27058  fi
27059
27060  # Call helper function which possibly converts this using DOS-style short mode.
27061  # If so, the updated path is stored in $new_path.
27062
27063  input_path="$new_path"
27064  # Check if we need to convert this using DOS-style short mode. If the path
27065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27066  # take no chances and rewrite it.
27067  # Note: m4 eats our [], so we need to use [ and ] instead.
27068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27069  if test "x$has_forbidden_chars" != x; then
27070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27074      # Going to short mode and back again did indeed matter. Since short mode is
27075      # case insensitive, let's make it lowercase to improve readability.
27076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27077      # Now convert it back to Unix-style (cygpath)
27078      input_path=`$CYGPATH -u "$shortmode_path"`
27079      new_path="$input_path"
27080    fi
27081  fi
27082
27083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27084  if test "x$test_cygdrive_prefix" = x; then
27085    # As a simple fix, exclude /usr/bin since it's not a real path.
27086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27088      # a path prefixed by /cygdrive for fixpath to work.
27089      new_path="$CYGWIN_ROOT_PATH$input_path"
27090    fi
27091  fi
27092
27093
27094  if test "x$path" != "x$new_path"; then
27095    BOOT_JDK="$new_path"
27096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27098  fi
27099
27100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27101
27102  path="$BOOT_JDK"
27103  has_colon=`$ECHO $path | $GREP ^.:`
27104  new_path="$path"
27105  if test "x$has_colon" = x; then
27106    # Not in mixed or Windows style, start by that.
27107    new_path=`cmd //c echo $path`
27108  fi
27109
27110
27111  input_path="$new_path"
27112  # Check if we need to convert this using DOS-style short mode. If the path
27113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27114  # take no chances and rewrite it.
27115  # Note: m4 eats our [], so we need to use [ and ] instead.
27116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27117  if test "x$has_forbidden_chars" != x; then
27118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27120  fi
27121
27122
27123  windows_path="$new_path"
27124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27125    unix_path=`$CYGPATH -u "$windows_path"`
27126    new_path="$unix_path"
27127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27129    new_path="$unix_path"
27130  fi
27131
27132  if test "x$path" != "x$new_path"; then
27133    BOOT_JDK="$new_path"
27134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27136  fi
27137
27138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27140
27141    else
27142      # We're on a unix platform. Hooray! :)
27143      path="$BOOT_JDK"
27144      has_space=`$ECHO "$path" | $GREP " "`
27145      if test "x$has_space" != x; then
27146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27147$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27148        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27149      fi
27150
27151      # Use eval to expand a potential ~
27152      eval path="$path"
27153      if test ! -f "$path" && test ! -d "$path"; then
27154        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27155      fi
27156
27157      if test -d "$path"; then
27158        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27159      else
27160        dir="`$DIRNAME "$path"`"
27161        base="`$BASENAME "$path"`"
27162        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27163      fi
27164    fi
27165  fi
27166
27167            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27168$as_echo_n "checking for Boot JDK... " >&6; }
27169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27170$as_echo "$BOOT_JDK" >&6; }
27171            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27172$as_echo_n "checking Boot JDK version... " >&6; }
27173            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27175$as_echo "$BOOT_JDK_VERSION" >&6; }
27176          fi # end check jdk version
27177        fi # end check javac
27178      fi # end check java
27179    fi # end check boot jdk found
27180  fi
27181
27182    done
27183  fi
27184
27185  fi
27186
27187
27188    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27189    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27190      # Do we have a bin/java?
27191      if test ! -x "$BOOT_JDK/bin/java"; then
27192        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27194        BOOT_JDK_FOUND=no
27195      else
27196        # Do we have a bin/javac?
27197        if test ! -x "$BOOT_JDK/bin/javac"; then
27198          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27200          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27201$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27202          BOOT_JDK_FOUND=no
27203        else
27204          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27205          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27206
27207          # Extra M4 quote needed to protect [] in grep expression.
27208          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27209          if test "x$FOUND_CORRECT_VERSION" = x; then
27210            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27212            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27213$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27214            BOOT_JDK_FOUND=no
27215          else
27216            # We're done! :-)
27217            BOOT_JDK_FOUND=yes
27218
27219  # Only process if variable expands to non-empty
27220
27221  if test "x$BOOT_JDK" != x; then
27222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27223
27224  # Input might be given as Windows format, start by converting to
27225  # unix format.
27226  path="$BOOT_JDK"
27227  new_path=`$CYGPATH -u "$path"`
27228
27229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27232  # "foo.exe" is OK but "foo" is an error.
27233  #
27234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27235  # It is also a way to make sure we got the proper file name for the real test later on.
27236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27237  if test "x$test_shortpath" = x; then
27238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27240    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27241  fi
27242
27243  # Call helper function which possibly converts this using DOS-style short mode.
27244  # If so, the updated path is stored in $new_path.
27245
27246  input_path="$new_path"
27247  # Check if we need to convert this using DOS-style short mode. If the path
27248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27249  # take no chances and rewrite it.
27250  # Note: m4 eats our [], so we need to use [ and ] instead.
27251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27252  if test "x$has_forbidden_chars" != x; then
27253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27257      # Going to short mode and back again did indeed matter. Since short mode is
27258      # case insensitive, let's make it lowercase to improve readability.
27259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27260      # Now convert it back to Unix-style (cygpath)
27261      input_path=`$CYGPATH -u "$shortmode_path"`
27262      new_path="$input_path"
27263    fi
27264  fi
27265
27266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27267  if test "x$test_cygdrive_prefix" = x; then
27268    # As a simple fix, exclude /usr/bin since it's not a real path.
27269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27271      # a path prefixed by /cygdrive for fixpath to work.
27272      new_path="$CYGWIN_ROOT_PATH$input_path"
27273    fi
27274  fi
27275
27276
27277  if test "x$path" != "x$new_path"; then
27278    BOOT_JDK="$new_path"
27279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27281  fi
27282
27283    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27284
27285  path="$BOOT_JDK"
27286  has_colon=`$ECHO $path | $GREP ^.:`
27287  new_path="$path"
27288  if test "x$has_colon" = x; then
27289    # Not in mixed or Windows style, start by that.
27290    new_path=`cmd //c echo $path`
27291  fi
27292
27293
27294  input_path="$new_path"
27295  # Check if we need to convert this using DOS-style short mode. If the path
27296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27297  # take no chances and rewrite it.
27298  # Note: m4 eats our [], so we need to use [ and ] instead.
27299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27300  if test "x$has_forbidden_chars" != x; then
27301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27303  fi
27304
27305
27306  windows_path="$new_path"
27307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27308    unix_path=`$CYGPATH -u "$windows_path"`
27309    new_path="$unix_path"
27310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27312    new_path="$unix_path"
27313  fi
27314
27315  if test "x$path" != "x$new_path"; then
27316    BOOT_JDK="$new_path"
27317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27319  fi
27320
27321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27323
27324    else
27325      # We're on a unix platform. Hooray! :)
27326      path="$BOOT_JDK"
27327      has_space=`$ECHO "$path" | $GREP " "`
27328      if test "x$has_space" != x; then
27329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27330$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27331        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27332      fi
27333
27334      # Use eval to expand a potential ~
27335      eval path="$path"
27336      if test ! -f "$path" && test ! -d "$path"; then
27337        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27338      fi
27339
27340      if test -d "$path"; then
27341        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27342      else
27343        dir="`$DIRNAME "$path"`"
27344        base="`$BASENAME "$path"`"
27345        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27346      fi
27347    fi
27348  fi
27349
27350            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27351$as_echo_n "checking for Boot JDK... " >&6; }
27352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27353$as_echo "$BOOT_JDK" >&6; }
27354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27355$as_echo_n "checking Boot JDK version... " >&6; }
27356            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27358$as_echo "$BOOT_JDK_VERSION" >&6; }
27359          fi # end check jdk version
27360        fi # end check javac
27361      fi # end check java
27362    fi # end check boot jdk found
27363  fi
27364
27365
27366  if test "x$BOOT_JDK_FOUND" = xno; then
27367    # Now execute the test
27368
27369  if test "x$PROGRAMFILES" != x; then
27370    VIRTUAL_DIR="$PROGRAMFILES/Java"
27371
27372  windows_path="$VIRTUAL_DIR"
27373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27374    unix_path=`$CYGPATH -u "$windows_path"`
27375    VIRTUAL_DIR="$unix_path"
27376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27378    VIRTUAL_DIR="$unix_path"
27379  fi
27380
27381
27382  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27383  BOOT_JDK_SUFFIX=""
27384  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27385  if test "x$ALL_JDKS_FOUND" != x; then
27386    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27387
27388  if test "x$BOOT_JDK_FOUND" = xno; then
27389    # Now execute the test
27390
27391        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27392        if test -d "$BOOT_JDK"; then
27393          BOOT_JDK_FOUND=maybe
27394          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27395$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27396        fi
27397
27398
27399    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27400    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27401      # Do we have a bin/java?
27402      if test ! -x "$BOOT_JDK/bin/java"; then
27403        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27405        BOOT_JDK_FOUND=no
27406      else
27407        # Do we have a bin/javac?
27408        if test ! -x "$BOOT_JDK/bin/javac"; then
27409          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27411          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27412$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27413          BOOT_JDK_FOUND=no
27414        else
27415          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27416          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27417
27418          # Extra M4 quote needed to protect [] in grep expression.
27419          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27420          if test "x$FOUND_CORRECT_VERSION" = x; then
27421            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27423            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27424$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27425            BOOT_JDK_FOUND=no
27426          else
27427            # We're done! :-)
27428            BOOT_JDK_FOUND=yes
27429
27430  # Only process if variable expands to non-empty
27431
27432  if test "x$BOOT_JDK" != x; then
27433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27434
27435  # Input might be given as Windows format, start by converting to
27436  # unix format.
27437  path="$BOOT_JDK"
27438  new_path=`$CYGPATH -u "$path"`
27439
27440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27443  # "foo.exe" is OK but "foo" is an error.
27444  #
27445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27446  # It is also a way to make sure we got the proper file name for the real test later on.
27447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27448  if test "x$test_shortpath" = x; then
27449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27451    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27452  fi
27453
27454  # Call helper function which possibly converts this using DOS-style short mode.
27455  # If so, the updated path is stored in $new_path.
27456
27457  input_path="$new_path"
27458  # Check if we need to convert this using DOS-style short mode. If the path
27459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27460  # take no chances and rewrite it.
27461  # Note: m4 eats our [], so we need to use [ and ] instead.
27462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27463  if test "x$has_forbidden_chars" != x; then
27464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27468      # Going to short mode and back again did indeed matter. Since short mode is
27469      # case insensitive, let's make it lowercase to improve readability.
27470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27471      # Now convert it back to Unix-style (cygpath)
27472      input_path=`$CYGPATH -u "$shortmode_path"`
27473      new_path="$input_path"
27474    fi
27475  fi
27476
27477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27478  if test "x$test_cygdrive_prefix" = x; then
27479    # As a simple fix, exclude /usr/bin since it's not a real path.
27480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27482      # a path prefixed by /cygdrive for fixpath to work.
27483      new_path="$CYGWIN_ROOT_PATH$input_path"
27484    fi
27485  fi
27486
27487
27488  if test "x$path" != "x$new_path"; then
27489    BOOT_JDK="$new_path"
27490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27492  fi
27493
27494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27495
27496  path="$BOOT_JDK"
27497  has_colon=`$ECHO $path | $GREP ^.:`
27498  new_path="$path"
27499  if test "x$has_colon" = x; then
27500    # Not in mixed or Windows style, start by that.
27501    new_path=`cmd //c echo $path`
27502  fi
27503
27504
27505  input_path="$new_path"
27506  # Check if we need to convert this using DOS-style short mode. If the path
27507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27508  # take no chances and rewrite it.
27509  # Note: m4 eats our [], so we need to use [ and ] instead.
27510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27511  if test "x$has_forbidden_chars" != x; then
27512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27514  fi
27515
27516
27517  windows_path="$new_path"
27518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27519    unix_path=`$CYGPATH -u "$windows_path"`
27520    new_path="$unix_path"
27521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27523    new_path="$unix_path"
27524  fi
27525
27526  if test "x$path" != "x$new_path"; then
27527    BOOT_JDK="$new_path"
27528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27530  fi
27531
27532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27534
27535    else
27536      # We're on a unix platform. Hooray! :)
27537      path="$BOOT_JDK"
27538      has_space=`$ECHO "$path" | $GREP " "`
27539      if test "x$has_space" != x; then
27540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27542        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27543      fi
27544
27545      # Use eval to expand a potential ~
27546      eval path="$path"
27547      if test ! -f "$path" && test ! -d "$path"; then
27548        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27549      fi
27550
27551      if test -d "$path"; then
27552        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27553      else
27554        dir="`$DIRNAME "$path"`"
27555        base="`$BASENAME "$path"`"
27556        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27557      fi
27558    fi
27559  fi
27560
27561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27562$as_echo_n "checking for Boot JDK... " >&6; }
27563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27564$as_echo "$BOOT_JDK" >&6; }
27565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27566$as_echo_n "checking Boot JDK version... " >&6; }
27567            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27569$as_echo "$BOOT_JDK_VERSION" >&6; }
27570          fi # end check jdk version
27571        fi # end check javac
27572      fi # end check java
27573    fi # end check boot jdk found
27574  fi
27575
27576    done
27577  fi
27578
27579  fi
27580
27581
27582    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27583    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27584      # Do we have a bin/java?
27585      if test ! -x "$BOOT_JDK/bin/java"; then
27586        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27588        BOOT_JDK_FOUND=no
27589      else
27590        # Do we have a bin/javac?
27591        if test ! -x "$BOOT_JDK/bin/javac"; then
27592          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27594          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27595$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27596          BOOT_JDK_FOUND=no
27597        else
27598          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27599          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27600
27601          # Extra M4 quote needed to protect [] in grep expression.
27602          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27603          if test "x$FOUND_CORRECT_VERSION" = x; then
27604            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27606            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27607$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27608            BOOT_JDK_FOUND=no
27609          else
27610            # We're done! :-)
27611            BOOT_JDK_FOUND=yes
27612
27613  # Only process if variable expands to non-empty
27614
27615  if test "x$BOOT_JDK" != x; then
27616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27617
27618  # Input might be given as Windows format, start by converting to
27619  # unix format.
27620  path="$BOOT_JDK"
27621  new_path=`$CYGPATH -u "$path"`
27622
27623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27626  # "foo.exe" is OK but "foo" is an error.
27627  #
27628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27629  # It is also a way to make sure we got the proper file name for the real test later on.
27630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27631  if test "x$test_shortpath" = x; then
27632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27633$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27634    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27635  fi
27636
27637  # Call helper function which possibly converts this using DOS-style short mode.
27638  # If so, the updated path is stored in $new_path.
27639
27640  input_path="$new_path"
27641  # Check if we need to convert this using DOS-style short mode. If the path
27642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27643  # take no chances and rewrite it.
27644  # Note: m4 eats our [], so we need to use [ and ] instead.
27645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27646  if test "x$has_forbidden_chars" != x; then
27647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27651      # Going to short mode and back again did indeed matter. Since short mode is
27652      # case insensitive, let's make it lowercase to improve readability.
27653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27654      # Now convert it back to Unix-style (cygpath)
27655      input_path=`$CYGPATH -u "$shortmode_path"`
27656      new_path="$input_path"
27657    fi
27658  fi
27659
27660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27661  if test "x$test_cygdrive_prefix" = x; then
27662    # As a simple fix, exclude /usr/bin since it's not a real path.
27663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27665      # a path prefixed by /cygdrive for fixpath to work.
27666      new_path="$CYGWIN_ROOT_PATH$input_path"
27667    fi
27668  fi
27669
27670
27671  if test "x$path" != "x$new_path"; then
27672    BOOT_JDK="$new_path"
27673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27674$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27675  fi
27676
27677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27678
27679  path="$BOOT_JDK"
27680  has_colon=`$ECHO $path | $GREP ^.:`
27681  new_path="$path"
27682  if test "x$has_colon" = x; then
27683    # Not in mixed or Windows style, start by that.
27684    new_path=`cmd //c echo $path`
27685  fi
27686
27687
27688  input_path="$new_path"
27689  # Check if we need to convert this using DOS-style short mode. If the path
27690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27691  # take no chances and rewrite it.
27692  # Note: m4 eats our [], so we need to use [ and ] instead.
27693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27694  if test "x$has_forbidden_chars" != x; then
27695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27697  fi
27698
27699
27700  windows_path="$new_path"
27701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27702    unix_path=`$CYGPATH -u "$windows_path"`
27703    new_path="$unix_path"
27704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27706    new_path="$unix_path"
27707  fi
27708
27709  if test "x$path" != "x$new_path"; then
27710    BOOT_JDK="$new_path"
27711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27712$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27713  fi
27714
27715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27717
27718    else
27719      # We're on a unix platform. Hooray! :)
27720      path="$BOOT_JDK"
27721      has_space=`$ECHO "$path" | $GREP " "`
27722      if test "x$has_space" != x; then
27723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27724$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27725        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27726      fi
27727
27728      # Use eval to expand a potential ~
27729      eval path="$path"
27730      if test ! -f "$path" && test ! -d "$path"; then
27731        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27732      fi
27733
27734      if test -d "$path"; then
27735        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27736      else
27737        dir="`$DIRNAME "$path"`"
27738        base="`$BASENAME "$path"`"
27739        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27740      fi
27741    fi
27742  fi
27743
27744            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27745$as_echo_n "checking for Boot JDK... " >&6; }
27746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27747$as_echo "$BOOT_JDK" >&6; }
27748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27749$as_echo_n "checking Boot JDK version... " >&6; }
27750            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27752$as_echo "$BOOT_JDK_VERSION" >&6; }
27753          fi # end check jdk version
27754        fi # end check javac
27755      fi # end check java
27756    fi # end check boot jdk found
27757  fi
27758
27759
27760  if test "x$BOOT_JDK_FOUND" = xno; then
27761    # Now execute the test
27762
27763  if test "x$ProgramFiles" != x; then
27764    VIRTUAL_DIR="$ProgramFiles/Java"
27765
27766  windows_path="$VIRTUAL_DIR"
27767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27768    unix_path=`$CYGPATH -u "$windows_path"`
27769    VIRTUAL_DIR="$unix_path"
27770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27772    VIRTUAL_DIR="$unix_path"
27773  fi
27774
27775
27776  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27777  BOOT_JDK_SUFFIX=""
27778  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27779  if test "x$ALL_JDKS_FOUND" != x; then
27780    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27781
27782  if test "x$BOOT_JDK_FOUND" = xno; then
27783    # Now execute the test
27784
27785        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27786        if test -d "$BOOT_JDK"; then
27787          BOOT_JDK_FOUND=maybe
27788          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27789$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27790        fi
27791
27792
27793    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27794    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27795      # Do we have a bin/java?
27796      if test ! -x "$BOOT_JDK/bin/java"; then
27797        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27799        BOOT_JDK_FOUND=no
27800      else
27801        # Do we have a bin/javac?
27802        if test ! -x "$BOOT_JDK/bin/javac"; then
27803          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27805          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27806$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27807          BOOT_JDK_FOUND=no
27808        else
27809          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27810          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27811
27812          # Extra M4 quote needed to protect [] in grep expression.
27813          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27814          if test "x$FOUND_CORRECT_VERSION" = x; then
27815            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27817            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27818$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27819            BOOT_JDK_FOUND=no
27820          else
27821            # We're done! :-)
27822            BOOT_JDK_FOUND=yes
27823
27824  # Only process if variable expands to non-empty
27825
27826  if test "x$BOOT_JDK" != x; then
27827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27828
27829  # Input might be given as Windows format, start by converting to
27830  # unix format.
27831  path="$BOOT_JDK"
27832  new_path=`$CYGPATH -u "$path"`
27833
27834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27837  # "foo.exe" is OK but "foo" is an error.
27838  #
27839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27840  # It is also a way to make sure we got the proper file name for the real test later on.
27841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27842  if test "x$test_shortpath" = x; then
27843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27845    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27846  fi
27847
27848  # Call helper function which possibly converts this using DOS-style short mode.
27849  # If so, the updated path is stored in $new_path.
27850
27851  input_path="$new_path"
27852  # Check if we need to convert this using DOS-style short mode. If the path
27853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27854  # take no chances and rewrite it.
27855  # Note: m4 eats our [], so we need to use [ and ] instead.
27856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27857  if test "x$has_forbidden_chars" != x; then
27858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27862      # Going to short mode and back again did indeed matter. Since short mode is
27863      # case insensitive, let's make it lowercase to improve readability.
27864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27865      # Now convert it back to Unix-style (cygpath)
27866      input_path=`$CYGPATH -u "$shortmode_path"`
27867      new_path="$input_path"
27868    fi
27869  fi
27870
27871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27872  if test "x$test_cygdrive_prefix" = x; then
27873    # As a simple fix, exclude /usr/bin since it's not a real path.
27874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27876      # a path prefixed by /cygdrive for fixpath to work.
27877      new_path="$CYGWIN_ROOT_PATH$input_path"
27878    fi
27879  fi
27880
27881
27882  if test "x$path" != "x$new_path"; then
27883    BOOT_JDK="$new_path"
27884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27886  fi
27887
27888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27889
27890  path="$BOOT_JDK"
27891  has_colon=`$ECHO $path | $GREP ^.:`
27892  new_path="$path"
27893  if test "x$has_colon" = x; then
27894    # Not in mixed or Windows style, start by that.
27895    new_path=`cmd //c echo $path`
27896  fi
27897
27898
27899  input_path="$new_path"
27900  # Check if we need to convert this using DOS-style short mode. If the path
27901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27902  # take no chances and rewrite it.
27903  # Note: m4 eats our [], so we need to use [ and ] instead.
27904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27905  if test "x$has_forbidden_chars" != x; then
27906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27908  fi
27909
27910
27911  windows_path="$new_path"
27912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27913    unix_path=`$CYGPATH -u "$windows_path"`
27914    new_path="$unix_path"
27915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27917    new_path="$unix_path"
27918  fi
27919
27920  if test "x$path" != "x$new_path"; then
27921    BOOT_JDK="$new_path"
27922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27923$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27924  fi
27925
27926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27928
27929    else
27930      # We're on a unix platform. Hooray! :)
27931      path="$BOOT_JDK"
27932      has_space=`$ECHO "$path" | $GREP " "`
27933      if test "x$has_space" != x; then
27934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27935$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27936        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27937      fi
27938
27939      # Use eval to expand a potential ~
27940      eval path="$path"
27941      if test ! -f "$path" && test ! -d "$path"; then
27942        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27943      fi
27944
27945      if test -d "$path"; then
27946        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27947      else
27948        dir="`$DIRNAME "$path"`"
27949        base="`$BASENAME "$path"`"
27950        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27951      fi
27952    fi
27953  fi
27954
27955            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27956$as_echo_n "checking for Boot JDK... " >&6; }
27957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27958$as_echo "$BOOT_JDK" >&6; }
27959            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27960$as_echo_n "checking Boot JDK version... " >&6; }
27961            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27963$as_echo "$BOOT_JDK_VERSION" >&6; }
27964          fi # end check jdk version
27965        fi # end check javac
27966      fi # end check java
27967    fi # end check boot jdk found
27968  fi
27969
27970    done
27971  fi
27972
27973  fi
27974
27975
27976    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27977    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27978      # Do we have a bin/java?
27979      if test ! -x "$BOOT_JDK/bin/java"; then
27980        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27982        BOOT_JDK_FOUND=no
27983      else
27984        # Do we have a bin/javac?
27985        if test ! -x "$BOOT_JDK/bin/javac"; then
27986          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27988          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27989$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27990          BOOT_JDK_FOUND=no
27991        else
27992          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27993          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27994
27995          # Extra M4 quote needed to protect [] in grep expression.
27996          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27997          if test "x$FOUND_CORRECT_VERSION" = x; then
27998            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28000            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28001$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28002            BOOT_JDK_FOUND=no
28003          else
28004            # We're done! :-)
28005            BOOT_JDK_FOUND=yes
28006
28007  # Only process if variable expands to non-empty
28008
28009  if test "x$BOOT_JDK" != x; then
28010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28011
28012  # Input might be given as Windows format, start by converting to
28013  # unix format.
28014  path="$BOOT_JDK"
28015  new_path=`$CYGPATH -u "$path"`
28016
28017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28020  # "foo.exe" is OK but "foo" is an error.
28021  #
28022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28023  # It is also a way to make sure we got the proper file name for the real test later on.
28024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28025  if test "x$test_shortpath" = x; then
28026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28027$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28028    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28029  fi
28030
28031  # Call helper function which possibly converts this using DOS-style short mode.
28032  # If so, the updated path is stored in $new_path.
28033
28034  input_path="$new_path"
28035  # Check if we need to convert this using DOS-style short mode. If the path
28036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28037  # take no chances and rewrite it.
28038  # Note: m4 eats our [], so we need to use [ and ] instead.
28039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28040  if test "x$has_forbidden_chars" != x; then
28041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28045      # Going to short mode and back again did indeed matter. Since short mode is
28046      # case insensitive, let's make it lowercase to improve readability.
28047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28048      # Now convert it back to Unix-style (cygpath)
28049      input_path=`$CYGPATH -u "$shortmode_path"`
28050      new_path="$input_path"
28051    fi
28052  fi
28053
28054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28055  if test "x$test_cygdrive_prefix" = x; then
28056    # As a simple fix, exclude /usr/bin since it's not a real path.
28057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28059      # a path prefixed by /cygdrive for fixpath to work.
28060      new_path="$CYGWIN_ROOT_PATH$input_path"
28061    fi
28062  fi
28063
28064
28065  if test "x$path" != "x$new_path"; then
28066    BOOT_JDK="$new_path"
28067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28069  fi
28070
28071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28072
28073  path="$BOOT_JDK"
28074  has_colon=`$ECHO $path | $GREP ^.:`
28075  new_path="$path"
28076  if test "x$has_colon" = x; then
28077    # Not in mixed or Windows style, start by that.
28078    new_path=`cmd //c echo $path`
28079  fi
28080
28081
28082  input_path="$new_path"
28083  # Check if we need to convert this using DOS-style short mode. If the path
28084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28085  # take no chances and rewrite it.
28086  # Note: m4 eats our [], so we need to use [ and ] instead.
28087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28088  if test "x$has_forbidden_chars" != x; then
28089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28091  fi
28092
28093
28094  windows_path="$new_path"
28095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28096    unix_path=`$CYGPATH -u "$windows_path"`
28097    new_path="$unix_path"
28098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28100    new_path="$unix_path"
28101  fi
28102
28103  if test "x$path" != "x$new_path"; then
28104    BOOT_JDK="$new_path"
28105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28107  fi
28108
28109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28111
28112    else
28113      # We're on a unix platform. Hooray! :)
28114      path="$BOOT_JDK"
28115      has_space=`$ECHO "$path" | $GREP " "`
28116      if test "x$has_space" != x; then
28117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28120      fi
28121
28122      # Use eval to expand a potential ~
28123      eval path="$path"
28124      if test ! -f "$path" && test ! -d "$path"; then
28125        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28126      fi
28127
28128      if test -d "$path"; then
28129        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28130      else
28131        dir="`$DIRNAME "$path"`"
28132        base="`$BASENAME "$path"`"
28133        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28134      fi
28135    fi
28136  fi
28137
28138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28139$as_echo_n "checking for Boot JDK... " >&6; }
28140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28141$as_echo "$BOOT_JDK" >&6; }
28142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28143$as_echo_n "checking Boot JDK version... " >&6; }
28144            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28145            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28146$as_echo "$BOOT_JDK_VERSION" >&6; }
28147          fi # end check jdk version
28148        fi # end check javac
28149      fi # end check java
28150    fi # end check boot jdk found
28151  fi
28152
28153
28154  if test "x$BOOT_JDK_FOUND" = xno; then
28155    # Now execute the test
28156
28157  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28158  BOOT_JDK_SUFFIX=""
28159  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28160  if test "x$ALL_JDKS_FOUND" != x; then
28161    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28162
28163  if test "x$BOOT_JDK_FOUND" = xno; then
28164    # Now execute the test
28165
28166        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28167        if test -d "$BOOT_JDK"; then
28168          BOOT_JDK_FOUND=maybe
28169          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28170$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28171        fi
28172
28173
28174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28175    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28176      # Do we have a bin/java?
28177      if test ! -x "$BOOT_JDK/bin/java"; then
28178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28180        BOOT_JDK_FOUND=no
28181      else
28182        # Do we have a bin/javac?
28183        if test ! -x "$BOOT_JDK/bin/javac"; then
28184          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28186          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28187$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28188          BOOT_JDK_FOUND=no
28189        else
28190          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28191          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28192
28193          # Extra M4 quote needed to protect [] in grep expression.
28194          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28195          if test "x$FOUND_CORRECT_VERSION" = x; then
28196            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28198            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28199$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28200            BOOT_JDK_FOUND=no
28201          else
28202            # We're done! :-)
28203            BOOT_JDK_FOUND=yes
28204
28205  # Only process if variable expands to non-empty
28206
28207  if test "x$BOOT_JDK" != x; then
28208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28209
28210  # Input might be given as Windows format, start by converting to
28211  # unix format.
28212  path="$BOOT_JDK"
28213  new_path=`$CYGPATH -u "$path"`
28214
28215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28218  # "foo.exe" is OK but "foo" is an error.
28219  #
28220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28221  # It is also a way to make sure we got the proper file name for the real test later on.
28222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28223  if test "x$test_shortpath" = x; then
28224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28227  fi
28228
28229  # Call helper function which possibly converts this using DOS-style short mode.
28230  # If so, the updated path is stored in $new_path.
28231
28232  input_path="$new_path"
28233  # Check if we need to convert this using DOS-style short mode. If the path
28234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28235  # take no chances and rewrite it.
28236  # Note: m4 eats our [], so we need to use [ and ] instead.
28237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28238  if test "x$has_forbidden_chars" != x; then
28239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28243      # Going to short mode and back again did indeed matter. Since short mode is
28244      # case insensitive, let's make it lowercase to improve readability.
28245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28246      # Now convert it back to Unix-style (cygpath)
28247      input_path=`$CYGPATH -u "$shortmode_path"`
28248      new_path="$input_path"
28249    fi
28250  fi
28251
28252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28253  if test "x$test_cygdrive_prefix" = x; then
28254    # As a simple fix, exclude /usr/bin since it's not a real path.
28255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28257      # a path prefixed by /cygdrive for fixpath to work.
28258      new_path="$CYGWIN_ROOT_PATH$input_path"
28259    fi
28260  fi
28261
28262
28263  if test "x$path" != "x$new_path"; then
28264    BOOT_JDK="$new_path"
28265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28267  fi
28268
28269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28270
28271  path="$BOOT_JDK"
28272  has_colon=`$ECHO $path | $GREP ^.:`
28273  new_path="$path"
28274  if test "x$has_colon" = x; then
28275    # Not in mixed or Windows style, start by that.
28276    new_path=`cmd //c echo $path`
28277  fi
28278
28279
28280  input_path="$new_path"
28281  # Check if we need to convert this using DOS-style short mode. If the path
28282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28283  # take no chances and rewrite it.
28284  # Note: m4 eats our [], so we need to use [ and ] instead.
28285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28286  if test "x$has_forbidden_chars" != x; then
28287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28289  fi
28290
28291
28292  windows_path="$new_path"
28293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28294    unix_path=`$CYGPATH -u "$windows_path"`
28295    new_path="$unix_path"
28296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28298    new_path="$unix_path"
28299  fi
28300
28301  if test "x$path" != "x$new_path"; then
28302    BOOT_JDK="$new_path"
28303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28305  fi
28306
28307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28309
28310    else
28311      # We're on a unix platform. Hooray! :)
28312      path="$BOOT_JDK"
28313      has_space=`$ECHO "$path" | $GREP " "`
28314      if test "x$has_space" != x; then
28315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28317        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28318      fi
28319
28320      # Use eval to expand a potential ~
28321      eval path="$path"
28322      if test ! -f "$path" && test ! -d "$path"; then
28323        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28324      fi
28325
28326      if test -d "$path"; then
28327        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28328      else
28329        dir="`$DIRNAME "$path"`"
28330        base="`$BASENAME "$path"`"
28331        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28332      fi
28333    fi
28334  fi
28335
28336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28337$as_echo_n "checking for Boot JDK... " >&6; }
28338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28339$as_echo "$BOOT_JDK" >&6; }
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28341$as_echo_n "checking Boot JDK version... " >&6; }
28342            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28344$as_echo "$BOOT_JDK_VERSION" >&6; }
28345          fi # end check jdk version
28346        fi # end check javac
28347      fi # end check java
28348    fi # end check boot jdk found
28349  fi
28350
28351    done
28352  fi
28353
28354
28355    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28356    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28357      # Do we have a bin/java?
28358      if test ! -x "$BOOT_JDK/bin/java"; then
28359        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28361        BOOT_JDK_FOUND=no
28362      else
28363        # Do we have a bin/javac?
28364        if test ! -x "$BOOT_JDK/bin/javac"; then
28365          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28367          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28368$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28369          BOOT_JDK_FOUND=no
28370        else
28371          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28372          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28373
28374          # Extra M4 quote needed to protect [] in grep expression.
28375          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28376          if test "x$FOUND_CORRECT_VERSION" = x; then
28377            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28379            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28380$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28381            BOOT_JDK_FOUND=no
28382          else
28383            # We're done! :-)
28384            BOOT_JDK_FOUND=yes
28385
28386  # Only process if variable expands to non-empty
28387
28388  if test "x$BOOT_JDK" != x; then
28389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28390
28391  # Input might be given as Windows format, start by converting to
28392  # unix format.
28393  path="$BOOT_JDK"
28394  new_path=`$CYGPATH -u "$path"`
28395
28396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28399  # "foo.exe" is OK but "foo" is an error.
28400  #
28401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28402  # It is also a way to make sure we got the proper file name for the real test later on.
28403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28404  if test "x$test_shortpath" = x; then
28405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28406$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28407    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28408  fi
28409
28410  # Call helper function which possibly converts this using DOS-style short mode.
28411  # If so, the updated path is stored in $new_path.
28412
28413  input_path="$new_path"
28414  # Check if we need to convert this using DOS-style short mode. If the path
28415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28416  # take no chances and rewrite it.
28417  # Note: m4 eats our [], so we need to use [ and ] instead.
28418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28419  if test "x$has_forbidden_chars" != x; then
28420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28424      # Going to short mode and back again did indeed matter. Since short mode is
28425      # case insensitive, let's make it lowercase to improve readability.
28426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28427      # Now convert it back to Unix-style (cygpath)
28428      input_path=`$CYGPATH -u "$shortmode_path"`
28429      new_path="$input_path"
28430    fi
28431  fi
28432
28433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28434  if test "x$test_cygdrive_prefix" = x; then
28435    # As a simple fix, exclude /usr/bin since it's not a real path.
28436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28438      # a path prefixed by /cygdrive for fixpath to work.
28439      new_path="$CYGWIN_ROOT_PATH$input_path"
28440    fi
28441  fi
28442
28443
28444  if test "x$path" != "x$new_path"; then
28445    BOOT_JDK="$new_path"
28446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28448  fi
28449
28450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28451
28452  path="$BOOT_JDK"
28453  has_colon=`$ECHO $path | $GREP ^.:`
28454  new_path="$path"
28455  if test "x$has_colon" = x; then
28456    # Not in mixed or Windows style, start by that.
28457    new_path=`cmd //c echo $path`
28458  fi
28459
28460
28461  input_path="$new_path"
28462  # Check if we need to convert this using DOS-style short mode. If the path
28463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28464  # take no chances and rewrite it.
28465  # Note: m4 eats our [], so we need to use [ and ] instead.
28466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28467  if test "x$has_forbidden_chars" != x; then
28468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28470  fi
28471
28472
28473  windows_path="$new_path"
28474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28475    unix_path=`$CYGPATH -u "$windows_path"`
28476    new_path="$unix_path"
28477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28479    new_path="$unix_path"
28480  fi
28481
28482  if test "x$path" != "x$new_path"; then
28483    BOOT_JDK="$new_path"
28484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28485$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28486  fi
28487
28488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28490
28491    else
28492      # We're on a unix platform. Hooray! :)
28493      path="$BOOT_JDK"
28494      has_space=`$ECHO "$path" | $GREP " "`
28495      if test "x$has_space" != x; then
28496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28499      fi
28500
28501      # Use eval to expand a potential ~
28502      eval path="$path"
28503      if test ! -f "$path" && test ! -d "$path"; then
28504        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28505      fi
28506
28507      if test -d "$path"; then
28508        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28509      else
28510        dir="`$DIRNAME "$path"`"
28511        base="`$BASENAME "$path"`"
28512        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28513      fi
28514    fi
28515  fi
28516
28517            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28518$as_echo_n "checking for Boot JDK... " >&6; }
28519            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28520$as_echo "$BOOT_JDK" >&6; }
28521            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28522$as_echo_n "checking Boot JDK version... " >&6; }
28523            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28525$as_echo "$BOOT_JDK_VERSION" >&6; }
28526          fi # end check jdk version
28527        fi # end check javac
28528      fi # end check java
28529    fi # end check boot jdk found
28530  fi
28531
28532  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28533
28534  if test "x$BOOT_JDK_FOUND" = xno; then
28535    # Now execute the test
28536
28537  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28538  BOOT_JDK_SUFFIX="/Contents/Home"
28539  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28540  if test "x$ALL_JDKS_FOUND" != x; then
28541    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28542
28543  if test "x$BOOT_JDK_FOUND" = xno; then
28544    # Now execute the test
28545
28546        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28547        if test -d "$BOOT_JDK"; then
28548          BOOT_JDK_FOUND=maybe
28549          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28550$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28551        fi
28552
28553
28554    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28555    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28556      # Do we have a bin/java?
28557      if test ! -x "$BOOT_JDK/bin/java"; then
28558        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28560        BOOT_JDK_FOUND=no
28561      else
28562        # Do we have a bin/javac?
28563        if test ! -x "$BOOT_JDK/bin/javac"; then
28564          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28566          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28567$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28568          BOOT_JDK_FOUND=no
28569        else
28570          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28571          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28572
28573          # Extra M4 quote needed to protect [] in grep expression.
28574          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28575          if test "x$FOUND_CORRECT_VERSION" = x; then
28576            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28578            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28579$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28580            BOOT_JDK_FOUND=no
28581          else
28582            # We're done! :-)
28583            BOOT_JDK_FOUND=yes
28584
28585  # Only process if variable expands to non-empty
28586
28587  if test "x$BOOT_JDK" != x; then
28588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28589
28590  # Input might be given as Windows format, start by converting to
28591  # unix format.
28592  path="$BOOT_JDK"
28593  new_path=`$CYGPATH -u "$path"`
28594
28595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28598  # "foo.exe" is OK but "foo" is an error.
28599  #
28600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28601  # It is also a way to make sure we got the proper file name for the real test later on.
28602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28603  if test "x$test_shortpath" = x; then
28604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28605$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28606    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28607  fi
28608
28609  # Call helper function which possibly converts this using DOS-style short mode.
28610  # If so, the updated path is stored in $new_path.
28611
28612  input_path="$new_path"
28613  # Check if we need to convert this using DOS-style short mode. If the path
28614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28615  # take no chances and rewrite it.
28616  # Note: m4 eats our [], so we need to use [ and ] instead.
28617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28618  if test "x$has_forbidden_chars" != x; then
28619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28623      # Going to short mode and back again did indeed matter. Since short mode is
28624      # case insensitive, let's make it lowercase to improve readability.
28625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28626      # Now convert it back to Unix-style (cygpath)
28627      input_path=`$CYGPATH -u "$shortmode_path"`
28628      new_path="$input_path"
28629    fi
28630  fi
28631
28632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28633  if test "x$test_cygdrive_prefix" = x; then
28634    # As a simple fix, exclude /usr/bin since it's not a real path.
28635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28637      # a path prefixed by /cygdrive for fixpath to work.
28638      new_path="$CYGWIN_ROOT_PATH$input_path"
28639    fi
28640  fi
28641
28642
28643  if test "x$path" != "x$new_path"; then
28644    BOOT_JDK="$new_path"
28645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28647  fi
28648
28649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28650
28651  path="$BOOT_JDK"
28652  has_colon=`$ECHO $path | $GREP ^.:`
28653  new_path="$path"
28654  if test "x$has_colon" = x; then
28655    # Not in mixed or Windows style, start by that.
28656    new_path=`cmd //c echo $path`
28657  fi
28658
28659
28660  input_path="$new_path"
28661  # Check if we need to convert this using DOS-style short mode. If the path
28662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28663  # take no chances and rewrite it.
28664  # Note: m4 eats our [], so we need to use [ and ] instead.
28665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28666  if test "x$has_forbidden_chars" != x; then
28667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28669  fi
28670
28671
28672  windows_path="$new_path"
28673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28674    unix_path=`$CYGPATH -u "$windows_path"`
28675    new_path="$unix_path"
28676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28678    new_path="$unix_path"
28679  fi
28680
28681  if test "x$path" != "x$new_path"; then
28682    BOOT_JDK="$new_path"
28683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28684$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28685  fi
28686
28687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28689
28690    else
28691      # We're on a unix platform. Hooray! :)
28692      path="$BOOT_JDK"
28693      has_space=`$ECHO "$path" | $GREP " "`
28694      if test "x$has_space" != x; then
28695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28696$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28698      fi
28699
28700      # Use eval to expand a potential ~
28701      eval path="$path"
28702      if test ! -f "$path" && test ! -d "$path"; then
28703        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28704      fi
28705
28706      if test -d "$path"; then
28707        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28708      else
28709        dir="`$DIRNAME "$path"`"
28710        base="`$BASENAME "$path"`"
28711        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28712      fi
28713    fi
28714  fi
28715
28716            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28717$as_echo_n "checking for Boot JDK... " >&6; }
28718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28719$as_echo "$BOOT_JDK" >&6; }
28720            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28721$as_echo_n "checking Boot JDK version... " >&6; }
28722            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28723            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28724$as_echo "$BOOT_JDK_VERSION" >&6; }
28725          fi # end check jdk version
28726        fi # end check javac
28727      fi # end check java
28728    fi # end check boot jdk found
28729  fi
28730
28731    done
28732  fi
28733
28734
28735    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28736    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28737      # Do we have a bin/java?
28738      if test ! -x "$BOOT_JDK/bin/java"; then
28739        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28741        BOOT_JDK_FOUND=no
28742      else
28743        # Do we have a bin/javac?
28744        if test ! -x "$BOOT_JDK/bin/javac"; then
28745          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28747          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28748$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28749          BOOT_JDK_FOUND=no
28750        else
28751          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28752          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28753
28754          # Extra M4 quote needed to protect [] in grep expression.
28755          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28756          if test "x$FOUND_CORRECT_VERSION" = x; then
28757            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28759            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28760$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28761            BOOT_JDK_FOUND=no
28762          else
28763            # We're done! :-)
28764            BOOT_JDK_FOUND=yes
28765
28766  # Only process if variable expands to non-empty
28767
28768  if test "x$BOOT_JDK" != x; then
28769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28770
28771  # Input might be given as Windows format, start by converting to
28772  # unix format.
28773  path="$BOOT_JDK"
28774  new_path=`$CYGPATH -u "$path"`
28775
28776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28779  # "foo.exe" is OK but "foo" is an error.
28780  #
28781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28782  # It is also a way to make sure we got the proper file name for the real test later on.
28783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28784  if test "x$test_shortpath" = x; then
28785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28786$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28787    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28788  fi
28789
28790  # Call helper function which possibly converts this using DOS-style short mode.
28791  # If so, the updated path is stored in $new_path.
28792
28793  input_path="$new_path"
28794  # Check if we need to convert this using DOS-style short mode. If the path
28795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28796  # take no chances and rewrite it.
28797  # Note: m4 eats our [], so we need to use [ and ] instead.
28798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28799  if test "x$has_forbidden_chars" != x; then
28800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28804      # Going to short mode and back again did indeed matter. Since short mode is
28805      # case insensitive, let's make it lowercase to improve readability.
28806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28807      # Now convert it back to Unix-style (cygpath)
28808      input_path=`$CYGPATH -u "$shortmode_path"`
28809      new_path="$input_path"
28810    fi
28811  fi
28812
28813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28814  if test "x$test_cygdrive_prefix" = x; then
28815    # As a simple fix, exclude /usr/bin since it's not a real path.
28816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28818      # a path prefixed by /cygdrive for fixpath to work.
28819      new_path="$CYGWIN_ROOT_PATH$input_path"
28820    fi
28821  fi
28822
28823
28824  if test "x$path" != "x$new_path"; then
28825    BOOT_JDK="$new_path"
28826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28828  fi
28829
28830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28831
28832  path="$BOOT_JDK"
28833  has_colon=`$ECHO $path | $GREP ^.:`
28834  new_path="$path"
28835  if test "x$has_colon" = x; then
28836    # Not in mixed or Windows style, start by that.
28837    new_path=`cmd //c echo $path`
28838  fi
28839
28840
28841  input_path="$new_path"
28842  # Check if we need to convert this using DOS-style short mode. If the path
28843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28844  # take no chances and rewrite it.
28845  # Note: m4 eats our [], so we need to use [ and ] instead.
28846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28847  if test "x$has_forbidden_chars" != x; then
28848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28850  fi
28851
28852
28853  windows_path="$new_path"
28854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28855    unix_path=`$CYGPATH -u "$windows_path"`
28856    new_path="$unix_path"
28857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28859    new_path="$unix_path"
28860  fi
28861
28862  if test "x$path" != "x$new_path"; then
28863    BOOT_JDK="$new_path"
28864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28866  fi
28867
28868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28870
28871    else
28872      # We're on a unix platform. Hooray! :)
28873      path="$BOOT_JDK"
28874      has_space=`$ECHO "$path" | $GREP " "`
28875      if test "x$has_space" != x; then
28876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28877$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28879      fi
28880
28881      # Use eval to expand a potential ~
28882      eval path="$path"
28883      if test ! -f "$path" && test ! -d "$path"; then
28884        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28885      fi
28886
28887      if test -d "$path"; then
28888        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28889      else
28890        dir="`$DIRNAME "$path"`"
28891        base="`$BASENAME "$path"`"
28892        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28893      fi
28894    fi
28895  fi
28896
28897            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28898$as_echo_n "checking for Boot JDK... " >&6; }
28899            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28900$as_echo "$BOOT_JDK" >&6; }
28901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28902$as_echo_n "checking Boot JDK version... " >&6; }
28903            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28905$as_echo "$BOOT_JDK_VERSION" >&6; }
28906          fi # end check jdk version
28907        fi # end check javac
28908      fi # end check java
28909    fi # end check boot jdk found
28910  fi
28911
28912
28913  if test "x$BOOT_JDK_FOUND" = xno; then
28914    # Now execute the test
28915
28916  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28917  BOOT_JDK_SUFFIX="/Contents/Home"
28918  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28919  if test "x$ALL_JDKS_FOUND" != x; then
28920    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28921
28922  if test "x$BOOT_JDK_FOUND" = xno; then
28923    # Now execute the test
28924
28925        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28926        if test -d "$BOOT_JDK"; then
28927          BOOT_JDK_FOUND=maybe
28928          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28929$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28930        fi
28931
28932
28933    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28934    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28935      # Do we have a bin/java?
28936      if test ! -x "$BOOT_JDK/bin/java"; then
28937        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28939        BOOT_JDK_FOUND=no
28940      else
28941        # Do we have a bin/javac?
28942        if test ! -x "$BOOT_JDK/bin/javac"; then
28943          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28945          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28946$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28947          BOOT_JDK_FOUND=no
28948        else
28949          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28950          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28951
28952          # Extra M4 quote needed to protect [] in grep expression.
28953          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28954          if test "x$FOUND_CORRECT_VERSION" = x; then
28955            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28957            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28958$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28959            BOOT_JDK_FOUND=no
28960          else
28961            # We're done! :-)
28962            BOOT_JDK_FOUND=yes
28963
28964  # Only process if variable expands to non-empty
28965
28966  if test "x$BOOT_JDK" != x; then
28967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28968
28969  # Input might be given as Windows format, start by converting to
28970  # unix format.
28971  path="$BOOT_JDK"
28972  new_path=`$CYGPATH -u "$path"`
28973
28974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28977  # "foo.exe" is OK but "foo" is an error.
28978  #
28979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28980  # It is also a way to make sure we got the proper file name for the real test later on.
28981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28982  if test "x$test_shortpath" = x; then
28983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28984$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28985    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28986  fi
28987
28988  # Call helper function which possibly converts this using DOS-style short mode.
28989  # If so, the updated path is stored in $new_path.
28990
28991  input_path="$new_path"
28992  # Check if we need to convert this using DOS-style short mode. If the path
28993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28994  # take no chances and rewrite it.
28995  # Note: m4 eats our [], so we need to use [ and ] instead.
28996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28997  if test "x$has_forbidden_chars" != x; then
28998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29002      # Going to short mode and back again did indeed matter. Since short mode is
29003      # case insensitive, let's make it lowercase to improve readability.
29004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29005      # Now convert it back to Unix-style (cygpath)
29006      input_path=`$CYGPATH -u "$shortmode_path"`
29007      new_path="$input_path"
29008    fi
29009  fi
29010
29011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29012  if test "x$test_cygdrive_prefix" = x; then
29013    # As a simple fix, exclude /usr/bin since it's not a real path.
29014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29016      # a path prefixed by /cygdrive for fixpath to work.
29017      new_path="$CYGWIN_ROOT_PATH$input_path"
29018    fi
29019  fi
29020
29021
29022  if test "x$path" != "x$new_path"; then
29023    BOOT_JDK="$new_path"
29024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29025$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29026  fi
29027
29028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29029
29030  path="$BOOT_JDK"
29031  has_colon=`$ECHO $path | $GREP ^.:`
29032  new_path="$path"
29033  if test "x$has_colon" = x; then
29034    # Not in mixed or Windows style, start by that.
29035    new_path=`cmd //c echo $path`
29036  fi
29037
29038
29039  input_path="$new_path"
29040  # Check if we need to convert this using DOS-style short mode. If the path
29041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29042  # take no chances and rewrite it.
29043  # Note: m4 eats our [], so we need to use [ and ] instead.
29044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29045  if test "x$has_forbidden_chars" != x; then
29046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29048  fi
29049
29050
29051  windows_path="$new_path"
29052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29053    unix_path=`$CYGPATH -u "$windows_path"`
29054    new_path="$unix_path"
29055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29057    new_path="$unix_path"
29058  fi
29059
29060  if test "x$path" != "x$new_path"; then
29061    BOOT_JDK="$new_path"
29062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29063$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29064  fi
29065
29066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29068
29069    else
29070      # We're on a unix platform. Hooray! :)
29071      path="$BOOT_JDK"
29072      has_space=`$ECHO "$path" | $GREP " "`
29073      if test "x$has_space" != x; then
29074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29075$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29077      fi
29078
29079      # Use eval to expand a potential ~
29080      eval path="$path"
29081      if test ! -f "$path" && test ! -d "$path"; then
29082        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29083      fi
29084
29085      if test -d "$path"; then
29086        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29087      else
29088        dir="`$DIRNAME "$path"`"
29089        base="`$BASENAME "$path"`"
29090        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29091      fi
29092    fi
29093  fi
29094
29095            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29096$as_echo_n "checking for Boot JDK... " >&6; }
29097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29098$as_echo "$BOOT_JDK" >&6; }
29099            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29100$as_echo_n "checking Boot JDK version... " >&6; }
29101            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29102            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29103$as_echo "$BOOT_JDK_VERSION" >&6; }
29104          fi # end check jdk version
29105        fi # end check javac
29106      fi # end check java
29107    fi # end check boot jdk found
29108  fi
29109
29110    done
29111  fi
29112
29113
29114    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29115    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29116      # Do we have a bin/java?
29117      if test ! -x "$BOOT_JDK/bin/java"; then
29118        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29120        BOOT_JDK_FOUND=no
29121      else
29122        # Do we have a bin/javac?
29123        if test ! -x "$BOOT_JDK/bin/javac"; then
29124          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29126          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29127$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29128          BOOT_JDK_FOUND=no
29129        else
29130          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29131          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29132
29133          # Extra M4 quote needed to protect [] in grep expression.
29134          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29135          if test "x$FOUND_CORRECT_VERSION" = x; then
29136            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29138            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29139$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29140            BOOT_JDK_FOUND=no
29141          else
29142            # We're done! :-)
29143            BOOT_JDK_FOUND=yes
29144
29145  # Only process if variable expands to non-empty
29146
29147  if test "x$BOOT_JDK" != x; then
29148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29149
29150  # Input might be given as Windows format, start by converting to
29151  # unix format.
29152  path="$BOOT_JDK"
29153  new_path=`$CYGPATH -u "$path"`
29154
29155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29158  # "foo.exe" is OK but "foo" is an error.
29159  #
29160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29161  # It is also a way to make sure we got the proper file name for the real test later on.
29162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29163  if test "x$test_shortpath" = x; then
29164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29165$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29166    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29167  fi
29168
29169  # Call helper function which possibly converts this using DOS-style short mode.
29170  # If so, the updated path is stored in $new_path.
29171
29172  input_path="$new_path"
29173  # Check if we need to convert this using DOS-style short mode. If the path
29174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29175  # take no chances and rewrite it.
29176  # Note: m4 eats our [], so we need to use [ and ] instead.
29177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29178  if test "x$has_forbidden_chars" != x; then
29179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29183      # Going to short mode and back again did indeed matter. Since short mode is
29184      # case insensitive, let's make it lowercase to improve readability.
29185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29186      # Now convert it back to Unix-style (cygpath)
29187      input_path=`$CYGPATH -u "$shortmode_path"`
29188      new_path="$input_path"
29189    fi
29190  fi
29191
29192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29193  if test "x$test_cygdrive_prefix" = x; then
29194    # As a simple fix, exclude /usr/bin since it's not a real path.
29195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29197      # a path prefixed by /cygdrive for fixpath to work.
29198      new_path="$CYGWIN_ROOT_PATH$input_path"
29199    fi
29200  fi
29201
29202
29203  if test "x$path" != "x$new_path"; then
29204    BOOT_JDK="$new_path"
29205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29206$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29207  fi
29208
29209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29210
29211  path="$BOOT_JDK"
29212  has_colon=`$ECHO $path | $GREP ^.:`
29213  new_path="$path"
29214  if test "x$has_colon" = x; then
29215    # Not in mixed or Windows style, start by that.
29216    new_path=`cmd //c echo $path`
29217  fi
29218
29219
29220  input_path="$new_path"
29221  # Check if we need to convert this using DOS-style short mode. If the path
29222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29223  # take no chances and rewrite it.
29224  # Note: m4 eats our [], so we need to use [ and ] instead.
29225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29226  if test "x$has_forbidden_chars" != x; then
29227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29229  fi
29230
29231
29232  windows_path="$new_path"
29233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29234    unix_path=`$CYGPATH -u "$windows_path"`
29235    new_path="$unix_path"
29236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29238    new_path="$unix_path"
29239  fi
29240
29241  if test "x$path" != "x$new_path"; then
29242    BOOT_JDK="$new_path"
29243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29244$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29245  fi
29246
29247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29249
29250    else
29251      # We're on a unix platform. Hooray! :)
29252      path="$BOOT_JDK"
29253      has_space=`$ECHO "$path" | $GREP " "`
29254      if test "x$has_space" != x; then
29255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29256$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29257        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29258      fi
29259
29260      # Use eval to expand a potential ~
29261      eval path="$path"
29262      if test ! -f "$path" && test ! -d "$path"; then
29263        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29264      fi
29265
29266      if test -d "$path"; then
29267        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29268      else
29269        dir="`$DIRNAME "$path"`"
29270        base="`$BASENAME "$path"`"
29271        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29272      fi
29273    fi
29274  fi
29275
29276            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29277$as_echo_n "checking for Boot JDK... " >&6; }
29278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29279$as_echo "$BOOT_JDK" >&6; }
29280            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29281$as_echo_n "checking Boot JDK version... " >&6; }
29282            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29284$as_echo "$BOOT_JDK_VERSION" >&6; }
29285          fi # end check jdk version
29286        fi # end check javac
29287      fi # end check java
29288    fi # end check boot jdk found
29289  fi
29290
29291  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29292
29293  if test "x$BOOT_JDK_FOUND" = xno; then
29294    # Now execute the test
29295
29296  BOOT_JDK_PREFIX="/usr/lib/jvm"
29297  BOOT_JDK_SUFFIX=""
29298  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29299  if test "x$ALL_JDKS_FOUND" != x; then
29300    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29301
29302  if test "x$BOOT_JDK_FOUND" = xno; then
29303    # Now execute the test
29304
29305        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29306        if test -d "$BOOT_JDK"; then
29307          BOOT_JDK_FOUND=maybe
29308          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29309$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29310        fi
29311
29312
29313    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29314    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29315      # Do we have a bin/java?
29316      if test ! -x "$BOOT_JDK/bin/java"; then
29317        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29319        BOOT_JDK_FOUND=no
29320      else
29321        # Do we have a bin/javac?
29322        if test ! -x "$BOOT_JDK/bin/javac"; then
29323          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29325          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29326$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29327          BOOT_JDK_FOUND=no
29328        else
29329          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29330          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29331
29332          # Extra M4 quote needed to protect [] in grep expression.
29333          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29334          if test "x$FOUND_CORRECT_VERSION" = x; then
29335            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29337            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29338$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29339            BOOT_JDK_FOUND=no
29340          else
29341            # We're done! :-)
29342            BOOT_JDK_FOUND=yes
29343
29344  # Only process if variable expands to non-empty
29345
29346  if test "x$BOOT_JDK" != x; then
29347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29348
29349  # Input might be given as Windows format, start by converting to
29350  # unix format.
29351  path="$BOOT_JDK"
29352  new_path=`$CYGPATH -u "$path"`
29353
29354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29357  # "foo.exe" is OK but "foo" is an error.
29358  #
29359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29360  # It is also a way to make sure we got the proper file name for the real test later on.
29361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29362  if test "x$test_shortpath" = x; then
29363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29365    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29366  fi
29367
29368  # Call helper function which possibly converts this using DOS-style short mode.
29369  # If so, the updated path is stored in $new_path.
29370
29371  input_path="$new_path"
29372  # Check if we need to convert this using DOS-style short mode. If the path
29373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29374  # take no chances and rewrite it.
29375  # Note: m4 eats our [], so we need to use [ and ] instead.
29376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29377  if test "x$has_forbidden_chars" != x; then
29378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29382      # Going to short mode and back again did indeed matter. Since short mode is
29383      # case insensitive, let's make it lowercase to improve readability.
29384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29385      # Now convert it back to Unix-style (cygpath)
29386      input_path=`$CYGPATH -u "$shortmode_path"`
29387      new_path="$input_path"
29388    fi
29389  fi
29390
29391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29392  if test "x$test_cygdrive_prefix" = x; then
29393    # As a simple fix, exclude /usr/bin since it's not a real path.
29394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29396      # a path prefixed by /cygdrive for fixpath to work.
29397      new_path="$CYGWIN_ROOT_PATH$input_path"
29398    fi
29399  fi
29400
29401
29402  if test "x$path" != "x$new_path"; then
29403    BOOT_JDK="$new_path"
29404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29406  fi
29407
29408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29409
29410  path="$BOOT_JDK"
29411  has_colon=`$ECHO $path | $GREP ^.:`
29412  new_path="$path"
29413  if test "x$has_colon" = x; then
29414    # Not in mixed or Windows style, start by that.
29415    new_path=`cmd //c echo $path`
29416  fi
29417
29418
29419  input_path="$new_path"
29420  # Check if we need to convert this using DOS-style short mode. If the path
29421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29422  # take no chances and rewrite it.
29423  # Note: m4 eats our [], so we need to use [ and ] instead.
29424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29425  if test "x$has_forbidden_chars" != x; then
29426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29428  fi
29429
29430
29431  windows_path="$new_path"
29432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29433    unix_path=`$CYGPATH -u "$windows_path"`
29434    new_path="$unix_path"
29435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29437    new_path="$unix_path"
29438  fi
29439
29440  if test "x$path" != "x$new_path"; then
29441    BOOT_JDK="$new_path"
29442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29444  fi
29445
29446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29448
29449    else
29450      # We're on a unix platform. Hooray! :)
29451      path="$BOOT_JDK"
29452      has_space=`$ECHO "$path" | $GREP " "`
29453      if test "x$has_space" != x; then
29454        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29456        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29457      fi
29458
29459      # Use eval to expand a potential ~
29460      eval path="$path"
29461      if test ! -f "$path" && test ! -d "$path"; then
29462        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29463      fi
29464
29465      if test -d "$path"; then
29466        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29467      else
29468        dir="`$DIRNAME "$path"`"
29469        base="`$BASENAME "$path"`"
29470        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29471      fi
29472    fi
29473  fi
29474
29475            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29476$as_echo_n "checking for Boot JDK... " >&6; }
29477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29478$as_echo "$BOOT_JDK" >&6; }
29479            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29480$as_echo_n "checking Boot JDK version... " >&6; }
29481            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29483$as_echo "$BOOT_JDK_VERSION" >&6; }
29484          fi # end check jdk version
29485        fi # end check javac
29486      fi # end check java
29487    fi # end check boot jdk found
29488  fi
29489
29490    done
29491  fi
29492
29493
29494    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29495    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29496      # Do we have a bin/java?
29497      if test ! -x "$BOOT_JDK/bin/java"; then
29498        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29500        BOOT_JDK_FOUND=no
29501      else
29502        # Do we have a bin/javac?
29503        if test ! -x "$BOOT_JDK/bin/javac"; then
29504          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29506          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29507$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29508          BOOT_JDK_FOUND=no
29509        else
29510          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29511          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29512
29513          # Extra M4 quote needed to protect [] in grep expression.
29514          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29515          if test "x$FOUND_CORRECT_VERSION" = x; then
29516            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29518            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29519$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29520            BOOT_JDK_FOUND=no
29521          else
29522            # We're done! :-)
29523            BOOT_JDK_FOUND=yes
29524
29525  # Only process if variable expands to non-empty
29526
29527  if test "x$BOOT_JDK" != x; then
29528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29529
29530  # Input might be given as Windows format, start by converting to
29531  # unix format.
29532  path="$BOOT_JDK"
29533  new_path=`$CYGPATH -u "$path"`
29534
29535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29538  # "foo.exe" is OK but "foo" is an error.
29539  #
29540  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29541  # It is also a way to make sure we got the proper file name for the real test later on.
29542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29543  if test "x$test_shortpath" = x; then
29544    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29545$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29546    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29547  fi
29548
29549  # Call helper function which possibly converts this using DOS-style short mode.
29550  # If so, the updated path is stored in $new_path.
29551
29552  input_path="$new_path"
29553  # Check if we need to convert this using DOS-style short mode. If the path
29554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29555  # take no chances and rewrite it.
29556  # Note: m4 eats our [], so we need to use [ and ] instead.
29557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29558  if test "x$has_forbidden_chars" != x; then
29559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29563      # Going to short mode and back again did indeed matter. Since short mode is
29564      # case insensitive, let's make it lowercase to improve readability.
29565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29566      # Now convert it back to Unix-style (cygpath)
29567      input_path=`$CYGPATH -u "$shortmode_path"`
29568      new_path="$input_path"
29569    fi
29570  fi
29571
29572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29573  if test "x$test_cygdrive_prefix" = x; then
29574    # As a simple fix, exclude /usr/bin since it's not a real path.
29575    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29577      # a path prefixed by /cygdrive for fixpath to work.
29578      new_path="$CYGWIN_ROOT_PATH$input_path"
29579    fi
29580  fi
29581
29582
29583  if test "x$path" != "x$new_path"; then
29584    BOOT_JDK="$new_path"
29585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29586$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29587  fi
29588
29589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29590
29591  path="$BOOT_JDK"
29592  has_colon=`$ECHO $path | $GREP ^.:`
29593  new_path="$path"
29594  if test "x$has_colon" = x; then
29595    # Not in mixed or Windows style, start by that.
29596    new_path=`cmd //c echo $path`
29597  fi
29598
29599
29600  input_path="$new_path"
29601  # Check if we need to convert this using DOS-style short mode. If the path
29602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29603  # take no chances and rewrite it.
29604  # Note: m4 eats our [], so we need to use [ and ] instead.
29605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29606  if test "x$has_forbidden_chars" != x; then
29607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29609  fi
29610
29611
29612  windows_path="$new_path"
29613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29614    unix_path=`$CYGPATH -u "$windows_path"`
29615    new_path="$unix_path"
29616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29618    new_path="$unix_path"
29619  fi
29620
29621  if test "x$path" != "x$new_path"; then
29622    BOOT_JDK="$new_path"
29623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29624$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29625  fi
29626
29627  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29628  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29629
29630    else
29631      # We're on a unix platform. Hooray! :)
29632      path="$BOOT_JDK"
29633      has_space=`$ECHO "$path" | $GREP " "`
29634      if test "x$has_space" != x; then
29635        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29636$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29637        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29638      fi
29639
29640      # Use eval to expand a potential ~
29641      eval path="$path"
29642      if test ! -f "$path" && test ! -d "$path"; then
29643        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29644      fi
29645
29646      if test -d "$path"; then
29647        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29648      else
29649        dir="`$DIRNAME "$path"`"
29650        base="`$BASENAME "$path"`"
29651        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29652      fi
29653    fi
29654  fi
29655
29656            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29657$as_echo_n "checking for Boot JDK... " >&6; }
29658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29659$as_echo "$BOOT_JDK" >&6; }
29660            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29661$as_echo_n "checking Boot JDK version... " >&6; }
29662            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29664$as_echo "$BOOT_JDK_VERSION" >&6; }
29665          fi # end check jdk version
29666        fi # end check javac
29667      fi # end check java
29668    fi # end check boot jdk found
29669  fi
29670
29671  fi
29672
29673
29674    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29675    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29676      # Do we have a bin/java?
29677      if test ! -x "$BOOT_JDK/bin/java"; then
29678        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29680        BOOT_JDK_FOUND=no
29681      else
29682        # Do we have a bin/javac?
29683        if test ! -x "$BOOT_JDK/bin/javac"; then
29684          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29686          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29687$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29688          BOOT_JDK_FOUND=no
29689        else
29690          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29691          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29692
29693          # Extra M4 quote needed to protect [] in grep expression.
29694          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29695          if test "x$FOUND_CORRECT_VERSION" = x; then
29696            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29698            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29699$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29700            BOOT_JDK_FOUND=no
29701          else
29702            # We're done! :-)
29703            BOOT_JDK_FOUND=yes
29704
29705  # Only process if variable expands to non-empty
29706
29707  if test "x$BOOT_JDK" != x; then
29708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29709
29710  # Input might be given as Windows format, start by converting to
29711  # unix format.
29712  path="$BOOT_JDK"
29713  new_path=`$CYGPATH -u "$path"`
29714
29715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29718  # "foo.exe" is OK but "foo" is an error.
29719  #
29720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29721  # It is also a way to make sure we got the proper file name for the real test later on.
29722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29723  if test "x$test_shortpath" = x; then
29724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29726    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29727  fi
29728
29729  # Call helper function which possibly converts this using DOS-style short mode.
29730  # If so, the updated path is stored in $new_path.
29731
29732  input_path="$new_path"
29733  # Check if we need to convert this using DOS-style short mode. If the path
29734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29735  # take no chances and rewrite it.
29736  # Note: m4 eats our [], so we need to use [ and ] instead.
29737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29738  if test "x$has_forbidden_chars" != x; then
29739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29743      # Going to short mode and back again did indeed matter. Since short mode is
29744      # case insensitive, let's make it lowercase to improve readability.
29745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29746      # Now convert it back to Unix-style (cygpath)
29747      input_path=`$CYGPATH -u "$shortmode_path"`
29748      new_path="$input_path"
29749    fi
29750  fi
29751
29752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29753  if test "x$test_cygdrive_prefix" = x; then
29754    # As a simple fix, exclude /usr/bin since it's not a real path.
29755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29757      # a path prefixed by /cygdrive for fixpath to work.
29758      new_path="$CYGWIN_ROOT_PATH$input_path"
29759    fi
29760  fi
29761
29762
29763  if test "x$path" != "x$new_path"; then
29764    BOOT_JDK="$new_path"
29765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29767  fi
29768
29769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29770
29771  path="$BOOT_JDK"
29772  has_colon=`$ECHO $path | $GREP ^.:`
29773  new_path="$path"
29774  if test "x$has_colon" = x; then
29775    # Not in mixed or Windows style, start by that.
29776    new_path=`cmd //c echo $path`
29777  fi
29778
29779
29780  input_path="$new_path"
29781  # Check if we need to convert this using DOS-style short mode. If the path
29782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29783  # take no chances and rewrite it.
29784  # Note: m4 eats our [], so we need to use [ and ] instead.
29785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29786  if test "x$has_forbidden_chars" != x; then
29787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29789  fi
29790
29791
29792  windows_path="$new_path"
29793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29794    unix_path=`$CYGPATH -u "$windows_path"`
29795    new_path="$unix_path"
29796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29798    new_path="$unix_path"
29799  fi
29800
29801  if test "x$path" != "x$new_path"; then
29802    BOOT_JDK="$new_path"
29803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29805  fi
29806
29807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29809
29810    else
29811      # We're on a unix platform. Hooray! :)
29812      path="$BOOT_JDK"
29813      has_space=`$ECHO "$path" | $GREP " "`
29814      if test "x$has_space" != x; then
29815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29818      fi
29819
29820      # Use eval to expand a potential ~
29821      eval path="$path"
29822      if test ! -f "$path" && test ! -d "$path"; then
29823        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29824      fi
29825
29826      if test -d "$path"; then
29827        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29828      else
29829        dir="`$DIRNAME "$path"`"
29830        base="`$BASENAME "$path"`"
29831        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29832      fi
29833    fi
29834  fi
29835
29836            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29837$as_echo_n "checking for Boot JDK... " >&6; }
29838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29839$as_echo "$BOOT_JDK" >&6; }
29840            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29841$as_echo_n "checking Boot JDK version... " >&6; }
29842            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29844$as_echo "$BOOT_JDK_VERSION" >&6; }
29845          fi # end check jdk version
29846        fi # end check javac
29847      fi # end check java
29848    fi # end check boot jdk found
29849  fi
29850
29851
29852  # If we haven't found anything yet, we've truly lost. Give up.
29853  if test "x$BOOT_JDK_FOUND" = xno; then
29854
29855  # Print a helpful message on how to acquire the necessary build dependency.
29856  # openjdk is the help tag: freetype, cups, alsa etc
29857  MISSING_DEPENDENCY=openjdk
29858
29859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29860    cygwin_help $MISSING_DEPENDENCY
29861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29862    msys_help $MISSING_DEPENDENCY
29863  else
29864    PKGHANDLER_COMMAND=
29865
29866    case $PKGHANDLER in
29867      apt-get)
29868        apt_help     $MISSING_DEPENDENCY ;;
29869      yum)
29870        yum_help     $MISSING_DEPENDENCY ;;
29871      port)
29872        port_help    $MISSING_DEPENDENCY ;;
29873      pkgutil)
29874        pkgutil_help $MISSING_DEPENDENCY ;;
29875      pkgadd)
29876        pkgadd_help  $MISSING_DEPENDENCY ;;
29877    esac
29878
29879    if test "x$PKGHANDLER_COMMAND" != x; then
29880      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29881    fi
29882  fi
29883
29884    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29885$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29886    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29887$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29888    as_fn_error $? "Cannot continue" "$LINENO" 5
29889  fi
29890
29891
29892
29893  # Setup tools from the Boot JDK.
29894
29895  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29896
29897  # Publish this variable in the help.
29898
29899
29900  if [ -z "${JAVA+x}" ]; then
29901    # The variable is not set by user, try to locate tool using the code snippet
29902
29903      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29904$as_echo_n "checking for java in Boot JDK... " >&6; }
29905      JAVA=$BOOT_JDK/bin/java
29906      if test ! -x $JAVA; then
29907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29908$as_echo "not found" >&6; }
29909        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29910$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29911        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29912      fi
29913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29914$as_echo "ok" >&6; }
29915
29916
29917  else
29918    # The variable is set, but is it from the command line or the environment?
29919
29920    # Try to remove the string !JAVA! from our list.
29921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29923      # If it failed, the variable was not from the command line. Ignore it,
29924      # but warn the user (except for BASH, which is always set by the calling BASH).
29925      if test "xJAVA" != xBASH; then
29926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29927$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29928      fi
29929      # Try to locate tool using the code snippet
29930
29931      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29932$as_echo_n "checking for java in Boot JDK... " >&6; }
29933      JAVA=$BOOT_JDK/bin/java
29934      if test ! -x $JAVA; then
29935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29936$as_echo "not found" >&6; }
29937        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29938$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29939        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29940      fi
29941      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29942$as_echo "ok" >&6; }
29943
29944
29945    else
29946      # If it succeeded, then it was overridden by the user. We will use it
29947      # for the tool.
29948
29949      # First remove it from the list of overridden variables, so we can test
29950      # for unknown variables in the end.
29951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29952
29953      # Check if we try to supply an empty value
29954      if test "x$JAVA" = x; then
29955        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29956$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29957        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29958$as_echo_n "checking for JAVA... " >&6; }
29959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29960$as_echo "disabled" >&6; }
29961      else
29962        # Check if the provided tool contains a complete path.
29963        tool_specified="$JAVA"
29964        tool_basename="${tool_specified##*/}"
29965        if test "x$tool_basename" = "x$tool_specified"; then
29966          # A command without a complete path is provided, search $PATH.
29967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29968$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29969          # Extract the first word of "$tool_basename", so it can be a program name with args.
29970set dummy $tool_basename; ac_word=$2
29971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29972$as_echo_n "checking for $ac_word... " >&6; }
29973if ${ac_cv_path_JAVA+:} false; then :
29974  $as_echo_n "(cached) " >&6
29975else
29976  case $JAVA in
29977  [\\/]* | ?:[\\/]*)
29978  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29979  ;;
29980  *)
29981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29982for as_dir in $PATH
29983do
29984  IFS=$as_save_IFS
29985  test -z "$as_dir" && as_dir=.
29986    for ac_exec_ext in '' $ac_executable_extensions; do
29987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29988    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29990    break 2
29991  fi
29992done
29993  done
29994IFS=$as_save_IFS
29995
29996  ;;
29997esac
29998fi
29999JAVA=$ac_cv_path_JAVA
30000if test -n "$JAVA"; then
30001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30002$as_echo "$JAVA" >&6; }
30003else
30004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30005$as_echo "no" >&6; }
30006fi
30007
30008
30009          if test "x$JAVA" = x; then
30010            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30011          fi
30012        else
30013          # Otherwise we believe it is a complete path. Use it as it is.
30014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30015$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30016          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30017$as_echo_n "checking for JAVA... " >&6; }
30018          if test ! -x "$tool_specified"; then
30019            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30020$as_echo "not found" >&6; }
30021            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30022          fi
30023          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30024$as_echo "$tool_specified" >&6; }
30025        fi
30026      fi
30027    fi
30028
30029  fi
30030
30031
30032
30033  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30034
30035  # Publish this variable in the help.
30036
30037
30038  if [ -z "${JAVAC+x}" ]; then
30039    # The variable is not set by user, try to locate tool using the code snippet
30040
30041      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30042$as_echo_n "checking for javac in Boot JDK... " >&6; }
30043      JAVAC=$BOOT_JDK/bin/javac
30044      if test ! -x $JAVAC; then
30045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30046$as_echo "not found" >&6; }
30047        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30048$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30049        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30050      fi
30051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30052$as_echo "ok" >&6; }
30053
30054
30055  else
30056    # The variable is set, but is it from the command line or the environment?
30057
30058    # Try to remove the string !JAVAC! from our list.
30059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30061      # If it failed, the variable was not from the command line. Ignore it,
30062      # but warn the user (except for BASH, which is always set by the calling BASH).
30063      if test "xJAVAC" != xBASH; then
30064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30065$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30066      fi
30067      # Try to locate tool using the code snippet
30068
30069      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30070$as_echo_n "checking for javac in Boot JDK... " >&6; }
30071      JAVAC=$BOOT_JDK/bin/javac
30072      if test ! -x $JAVAC; then
30073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30074$as_echo "not found" >&6; }
30075        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30076$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30077        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30078      fi
30079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30080$as_echo "ok" >&6; }
30081
30082
30083    else
30084      # If it succeeded, then it was overridden by the user. We will use it
30085      # for the tool.
30086
30087      # First remove it from the list of overridden variables, so we can test
30088      # for unknown variables in the end.
30089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30090
30091      # Check if we try to supply an empty value
30092      if test "x$JAVAC" = x; then
30093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30094$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30096$as_echo_n "checking for JAVAC... " >&6; }
30097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30098$as_echo "disabled" >&6; }
30099      else
30100        # Check if the provided tool contains a complete path.
30101        tool_specified="$JAVAC"
30102        tool_basename="${tool_specified##*/}"
30103        if test "x$tool_basename" = "x$tool_specified"; then
30104          # A command without a complete path is provided, search $PATH.
30105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30106$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30107          # Extract the first word of "$tool_basename", so it can be a program name with args.
30108set dummy $tool_basename; ac_word=$2
30109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30110$as_echo_n "checking for $ac_word... " >&6; }
30111if ${ac_cv_path_JAVAC+:} false; then :
30112  $as_echo_n "(cached) " >&6
30113else
30114  case $JAVAC in
30115  [\\/]* | ?:[\\/]*)
30116  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30117  ;;
30118  *)
30119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30120for as_dir in $PATH
30121do
30122  IFS=$as_save_IFS
30123  test -z "$as_dir" && as_dir=.
30124    for ac_exec_ext in '' $ac_executable_extensions; do
30125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30126    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30128    break 2
30129  fi
30130done
30131  done
30132IFS=$as_save_IFS
30133
30134  ;;
30135esac
30136fi
30137JAVAC=$ac_cv_path_JAVAC
30138if test -n "$JAVAC"; then
30139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30140$as_echo "$JAVAC" >&6; }
30141else
30142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30143$as_echo "no" >&6; }
30144fi
30145
30146
30147          if test "x$JAVAC" = x; then
30148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30149          fi
30150        else
30151          # Otherwise we believe it is a complete path. Use it as it is.
30152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30153$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30155$as_echo_n "checking for JAVAC... " >&6; }
30156          if test ! -x "$tool_specified"; then
30157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30158$as_echo "not found" >&6; }
30159            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30160          fi
30161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30162$as_echo "$tool_specified" >&6; }
30163        fi
30164      fi
30165    fi
30166
30167  fi
30168
30169
30170
30171  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30172
30173  # Publish this variable in the help.
30174
30175
30176  if [ -z "${JAVAH+x}" ]; then
30177    # The variable is not set by user, try to locate tool using the code snippet
30178
30179      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30180$as_echo_n "checking for javah in Boot JDK... " >&6; }
30181      JAVAH=$BOOT_JDK/bin/javah
30182      if test ! -x $JAVAH; then
30183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30184$as_echo "not found" >&6; }
30185        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30186$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30187        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30188      fi
30189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30190$as_echo "ok" >&6; }
30191
30192
30193  else
30194    # The variable is set, but is it from the command line or the environment?
30195
30196    # Try to remove the string !JAVAH! from our list.
30197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30199      # If it failed, the variable was not from the command line. Ignore it,
30200      # but warn the user (except for BASH, which is always set by the calling BASH).
30201      if test "xJAVAH" != xBASH; then
30202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30203$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30204      fi
30205      # Try to locate tool using the code snippet
30206
30207      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30208$as_echo_n "checking for javah in Boot JDK... " >&6; }
30209      JAVAH=$BOOT_JDK/bin/javah
30210      if test ! -x $JAVAH; then
30211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30212$as_echo "not found" >&6; }
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30214$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30215        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30216      fi
30217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30218$as_echo "ok" >&6; }
30219
30220
30221    else
30222      # If it succeeded, then it was overridden by the user. We will use it
30223      # for the tool.
30224
30225      # First remove it from the list of overridden variables, so we can test
30226      # for unknown variables in the end.
30227      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30228
30229      # Check if we try to supply an empty value
30230      if test "x$JAVAH" = x; then
30231        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30232$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30234$as_echo_n "checking for JAVAH... " >&6; }
30235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30236$as_echo "disabled" >&6; }
30237      else
30238        # Check if the provided tool contains a complete path.
30239        tool_specified="$JAVAH"
30240        tool_basename="${tool_specified##*/}"
30241        if test "x$tool_basename" = "x$tool_specified"; then
30242          # A command without a complete path is provided, search $PATH.
30243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30244$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30245          # Extract the first word of "$tool_basename", so it can be a program name with args.
30246set dummy $tool_basename; ac_word=$2
30247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30248$as_echo_n "checking for $ac_word... " >&6; }
30249if ${ac_cv_path_JAVAH+:} false; then :
30250  $as_echo_n "(cached) " >&6
30251else
30252  case $JAVAH in
30253  [\\/]* | ?:[\\/]*)
30254  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30255  ;;
30256  *)
30257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30258for as_dir in $PATH
30259do
30260  IFS=$as_save_IFS
30261  test -z "$as_dir" && as_dir=.
30262    for ac_exec_ext in '' $ac_executable_extensions; do
30263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30264    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30266    break 2
30267  fi
30268done
30269  done
30270IFS=$as_save_IFS
30271
30272  ;;
30273esac
30274fi
30275JAVAH=$ac_cv_path_JAVAH
30276if test -n "$JAVAH"; then
30277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30278$as_echo "$JAVAH" >&6; }
30279else
30280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30281$as_echo "no" >&6; }
30282fi
30283
30284
30285          if test "x$JAVAH" = x; then
30286            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30287          fi
30288        else
30289          # Otherwise we believe it is a complete path. Use it as it is.
30290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30291$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30292          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30293$as_echo_n "checking for JAVAH... " >&6; }
30294          if test ! -x "$tool_specified"; then
30295            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30296$as_echo "not found" >&6; }
30297            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30298          fi
30299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30300$as_echo "$tool_specified" >&6; }
30301        fi
30302      fi
30303    fi
30304
30305  fi
30306
30307
30308
30309  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30310
30311  # Publish this variable in the help.
30312
30313
30314  if [ -z "${JAR+x}" ]; then
30315    # The variable is not set by user, try to locate tool using the code snippet
30316
30317      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30318$as_echo_n "checking for jar in Boot JDK... " >&6; }
30319      JAR=$BOOT_JDK/bin/jar
30320      if test ! -x $JAR; then
30321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30322$as_echo "not found" >&6; }
30323        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30324$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30325        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30326      fi
30327      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30328$as_echo "ok" >&6; }
30329
30330
30331  else
30332    # The variable is set, but is it from the command line or the environment?
30333
30334    # Try to remove the string !JAR! from our list.
30335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30337      # If it failed, the variable was not from the command line. Ignore it,
30338      # but warn the user (except for BASH, which is always set by the calling BASH).
30339      if test "xJAR" != xBASH; then
30340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30341$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30342      fi
30343      # Try to locate tool using the code snippet
30344
30345      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30346$as_echo_n "checking for jar in Boot JDK... " >&6; }
30347      JAR=$BOOT_JDK/bin/jar
30348      if test ! -x $JAR; then
30349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30350$as_echo "not found" >&6; }
30351        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30352$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30353        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30354      fi
30355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30356$as_echo "ok" >&6; }
30357
30358
30359    else
30360      # If it succeeded, then it was overridden by the user. We will use it
30361      # for the tool.
30362
30363      # First remove it from the list of overridden variables, so we can test
30364      # for unknown variables in the end.
30365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30366
30367      # Check if we try to supply an empty value
30368      if test "x$JAR" = x; then
30369        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30370$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30371        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30372$as_echo_n "checking for JAR... " >&6; }
30373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30374$as_echo "disabled" >&6; }
30375      else
30376        # Check if the provided tool contains a complete path.
30377        tool_specified="$JAR"
30378        tool_basename="${tool_specified##*/}"
30379        if test "x$tool_basename" = "x$tool_specified"; then
30380          # A command without a complete path is provided, search $PATH.
30381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30382$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30383          # Extract the first word of "$tool_basename", so it can be a program name with args.
30384set dummy $tool_basename; ac_word=$2
30385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30386$as_echo_n "checking for $ac_word... " >&6; }
30387if ${ac_cv_path_JAR+:} false; then :
30388  $as_echo_n "(cached) " >&6
30389else
30390  case $JAR in
30391  [\\/]* | ?:[\\/]*)
30392  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30393  ;;
30394  *)
30395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30396for as_dir in $PATH
30397do
30398  IFS=$as_save_IFS
30399  test -z "$as_dir" && as_dir=.
30400    for ac_exec_ext in '' $ac_executable_extensions; do
30401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30402    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30404    break 2
30405  fi
30406done
30407  done
30408IFS=$as_save_IFS
30409
30410  ;;
30411esac
30412fi
30413JAR=$ac_cv_path_JAR
30414if test -n "$JAR"; then
30415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30416$as_echo "$JAR" >&6; }
30417else
30418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30419$as_echo "no" >&6; }
30420fi
30421
30422
30423          if test "x$JAR" = x; then
30424            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30425          fi
30426        else
30427          # Otherwise we believe it is a complete path. Use it as it is.
30428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30429$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30430          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30431$as_echo_n "checking for JAR... " >&6; }
30432          if test ! -x "$tool_specified"; then
30433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30434$as_echo "not found" >&6; }
30435            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30436          fi
30437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30438$as_echo "$tool_specified" >&6; }
30439        fi
30440      fi
30441    fi
30442
30443  fi
30444
30445
30446
30447  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30448
30449  # Publish this variable in the help.
30450
30451
30452  if [ -z "${JARSIGNER+x}" ]; then
30453    # The variable is not set by user, try to locate tool using the code snippet
30454
30455      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30456$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30457      JARSIGNER=$BOOT_JDK/bin/jarsigner
30458      if test ! -x $JARSIGNER; then
30459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30460$as_echo "not found" >&6; }
30461        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30462$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30463        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30464      fi
30465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30466$as_echo "ok" >&6; }
30467
30468
30469  else
30470    # The variable is set, but is it from the command line or the environment?
30471
30472    # Try to remove the string !JARSIGNER! from our list.
30473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30475      # If it failed, the variable was not from the command line. Ignore it,
30476      # but warn the user (except for BASH, which is always set by the calling BASH).
30477      if test "xJARSIGNER" != xBASH; then
30478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30479$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30480      fi
30481      # Try to locate tool using the code snippet
30482
30483      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30484$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30485      JARSIGNER=$BOOT_JDK/bin/jarsigner
30486      if test ! -x $JARSIGNER; then
30487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30488$as_echo "not found" >&6; }
30489        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30490$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30491        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30492      fi
30493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30494$as_echo "ok" >&6; }
30495
30496
30497    else
30498      # If it succeeded, then it was overridden by the user. We will use it
30499      # for the tool.
30500
30501      # First remove it from the list of overridden variables, so we can test
30502      # for unknown variables in the end.
30503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30504
30505      # Check if we try to supply an empty value
30506      if test "x$JARSIGNER" = x; then
30507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30508$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30510$as_echo_n "checking for JARSIGNER... " >&6; }
30511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30512$as_echo "disabled" >&6; }
30513      else
30514        # Check if the provided tool contains a complete path.
30515        tool_specified="$JARSIGNER"
30516        tool_basename="${tool_specified##*/}"
30517        if test "x$tool_basename" = "x$tool_specified"; then
30518          # A command without a complete path is provided, search $PATH.
30519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30520$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30521          # Extract the first word of "$tool_basename", so it can be a program name with args.
30522set dummy $tool_basename; ac_word=$2
30523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30524$as_echo_n "checking for $ac_word... " >&6; }
30525if ${ac_cv_path_JARSIGNER+:} false; then :
30526  $as_echo_n "(cached) " >&6
30527else
30528  case $JARSIGNER in
30529  [\\/]* | ?:[\\/]*)
30530  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30531  ;;
30532  *)
30533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30534for as_dir in $PATH
30535do
30536  IFS=$as_save_IFS
30537  test -z "$as_dir" && as_dir=.
30538    for ac_exec_ext in '' $ac_executable_extensions; do
30539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30540    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30542    break 2
30543  fi
30544done
30545  done
30546IFS=$as_save_IFS
30547
30548  ;;
30549esac
30550fi
30551JARSIGNER=$ac_cv_path_JARSIGNER
30552if test -n "$JARSIGNER"; then
30553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30554$as_echo "$JARSIGNER" >&6; }
30555else
30556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30557$as_echo "no" >&6; }
30558fi
30559
30560
30561          if test "x$JARSIGNER" = x; then
30562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30563          fi
30564        else
30565          # Otherwise we believe it is a complete path. Use it as it is.
30566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30567$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30569$as_echo_n "checking for JARSIGNER... " >&6; }
30570          if test ! -x "$tool_specified"; then
30571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30572$as_echo "not found" >&6; }
30573            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30574          fi
30575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30576$as_echo "$tool_specified" >&6; }
30577        fi
30578      fi
30579    fi
30580
30581  fi
30582
30583
30584
30585  # Finally, set some other options...
30586
30587  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30588  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30589
30590
30591
30592  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30593  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30594  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30595  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30596  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30597  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30598    dummy="$dummy -Xpatch:foo=bar"
30599    JVM_ARG_OK=true
30600  else
30601    $ECHO "Arg failed:" >&5
30602    $ECHO "$OUTPUT" >&5
30603    JVM_ARG_OK=false
30604  fi
30605
30606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30607$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30608  if test "x$JVM_ARG_OK" = "xtrue"; then
30609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30610$as_echo "yes" >&6; }
30611    BOOT_JDK_MODULAR="true"
30612  else
30613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30614$as_echo "no" >&6; }
30615    BOOT_JDK_MODULAR="false"
30616  fi
30617
30618
30619
30620
30621  # Check if the boot jdk is 32 or 64 bit
30622  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30623    BOOT_JDK_BITS="64"
30624  else
30625    BOOT_JDK_BITS="32"
30626  fi
30627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30628$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30630$as_echo "$BOOT_JDK_BITS" >&6; }
30631
30632
30633
30634
30635# Check whether --with-build-jdk was given.
30636if test "${with_build_jdk+set}" = set; then :
30637  withval=$with_build_jdk;
30638fi
30639
30640
30641  CREATE_BUILDJDK=false
30642  EXTERNAL_BUILDJDK=false
30643  BUILD_JDK_FOUND="no"
30644  if test "x$with_build_jdk" != "x"; then
30645
30646  if test "x$BUILD_JDK_FOUND" = xno; then
30647    # Execute the test
30648
30649       if test "x$with_build_jdk" != x; then
30650         BUILD_JDK=$with_build_jdk
30651         BUILD_JDK_FOUND=maybe
30652         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30653$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30654       fi
30655
30656    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30657    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30658      # Do we have a bin/java?
30659      if test ! -x "$BUILD_JDK/bin/java"; then
30660        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30661$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30662        BUILD_JDK_FOUND=no
30663      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30664        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30665$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30666        BUILD_JDK_FOUND=no
30667      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30668        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30669$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30670        BUILD_JDK_FOUND=no
30671      elif test ! -x "$BUILD_JDK/bin/javac"; then
30672        # Do we have a bin/javac?
30673        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30674$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30675        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30676$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30677        BUILD_JDK_FOUND=no
30678      else
30679        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30680        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30681
30682        # Extra M4 quote needed to protect [] in grep expression.
30683        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30684        if test "x$FOUND_CORRECT_VERSION" = x; then
30685          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30686$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30687          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30688$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30689          BUILD_JDK_FOUND=no
30690        else
30691          # We're done!
30692          BUILD_JDK_FOUND=yes
30693
30694  # Only process if variable expands to non-empty
30695
30696  if test "x$BUILD_JDK" != x; then
30697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30698
30699  # Input might be given as Windows format, start by converting to
30700  # unix format.
30701  path="$BUILD_JDK"
30702  new_path=`$CYGPATH -u "$path"`
30703
30704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30707  # "foo.exe" is OK but "foo" is an error.
30708  #
30709  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30710  # It is also a way to make sure we got the proper file name for the real test later on.
30711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30712  if test "x$test_shortpath" = x; then
30713    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30714$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30715    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30716  fi
30717
30718  # Call helper function which possibly converts this using DOS-style short mode.
30719  # If so, the updated path is stored in $new_path.
30720
30721  input_path="$new_path"
30722  # Check if we need to convert this using DOS-style short mode. If the path
30723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30724  # take no chances and rewrite it.
30725  # Note: m4 eats our [], so we need to use [ and ] instead.
30726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30727  if test "x$has_forbidden_chars" != x; then
30728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30732      # Going to short mode and back again did indeed matter. Since short mode is
30733      # case insensitive, let's make it lowercase to improve readability.
30734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30735      # Now convert it back to Unix-style (cygpath)
30736      input_path=`$CYGPATH -u "$shortmode_path"`
30737      new_path="$input_path"
30738    fi
30739  fi
30740
30741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30742  if test "x$test_cygdrive_prefix" = x; then
30743    # As a simple fix, exclude /usr/bin since it's not a real path.
30744    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30746      # a path prefixed by /cygdrive for fixpath to work.
30747      new_path="$CYGWIN_ROOT_PATH$input_path"
30748    fi
30749  fi
30750
30751
30752  if test "x$path" != "x$new_path"; then
30753    BUILD_JDK="$new_path"
30754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30755$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30756  fi
30757
30758    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30759
30760  path="$BUILD_JDK"
30761  has_colon=`$ECHO $path | $GREP ^.:`
30762  new_path="$path"
30763  if test "x$has_colon" = x; then
30764    # Not in mixed or Windows style, start by that.
30765    new_path=`cmd //c echo $path`
30766  fi
30767
30768
30769  input_path="$new_path"
30770  # Check if we need to convert this using DOS-style short mode. If the path
30771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30772  # take no chances and rewrite it.
30773  # Note: m4 eats our [], so we need to use [ and ] instead.
30774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30775  if test "x$has_forbidden_chars" != x; then
30776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30778  fi
30779
30780
30781  windows_path="$new_path"
30782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30783    unix_path=`$CYGPATH -u "$windows_path"`
30784    new_path="$unix_path"
30785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30787    new_path="$unix_path"
30788  fi
30789
30790  if test "x$path" != "x$new_path"; then
30791    BUILD_JDK="$new_path"
30792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30793$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30794  fi
30795
30796  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30797  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30798
30799    else
30800      # We're on a unix platform. Hooray! :)
30801      path="$BUILD_JDK"
30802      has_space=`$ECHO "$path" | $GREP " "`
30803      if test "x$has_space" != x; then
30804        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30805$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30806        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30807      fi
30808
30809      # Use eval to expand a potential ~
30810      eval path="$path"
30811      if test ! -f "$path" && test ! -d "$path"; then
30812        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30813      fi
30814
30815      if test -d "$path"; then
30816        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30817      else
30818        dir="`$DIRNAME "$path"`"
30819        base="`$BASENAME "$path"`"
30820        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30821      fi
30822    fi
30823  fi
30824
30825          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30826$as_echo_n "checking for Build JDK... " >&6; }
30827          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30828$as_echo "$BUILD_JDK" >&6; }
30829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30830$as_echo_n "checking Build JDK version... " >&6; }
30831          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30833$as_echo "$BUILD_JDK_VERSION" >&6; }
30834        fi # end check jdk version
30835      fi # end check java
30836    fi # end check build jdk found
30837  fi
30838
30839    EXTERNAL_BUILDJDK=true
30840  else
30841    if test "x$COMPILE_TYPE" = "xcross"; then
30842      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30843      BUILD_JDK_FOUND=yes
30844      CREATE_BUILDJDK=true
30845      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30846$as_echo_n "checking for Build JDK... " >&6; }
30847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30848$as_echo "yes, will build it for the host platform" >&6; }
30849    else
30850      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30851      BUILD_JDK_FOUND=yes
30852      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30853$as_echo_n "checking for Build JDK... " >&6; }
30854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30855$as_echo "yes, will use output dir" >&6; }
30856    fi
30857  fi
30858
30859  JMOD="$BUILD_JDK/bin/jmod"
30860  JLINK="$BUILD_JDK/bin/jlink"
30861
30862
30863
30864  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30866$as_echo_n "checking for Build JDK... " >&6; }
30867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30868$as_echo "no" >&6; }
30869    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30870  fi
30871
30872
30873
30874
30875
30876
30877###############################################################################
30878#
30879# Configure the sources to use. We can add or override individual directories.
30880#
30881###############################################################################
30882
30883
30884  # Where are the sources.
30885  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30886  CORBA_TOPDIR="$SRC_ROOT/corba"
30887  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30888  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30889  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30890  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30891  JDK_TOPDIR="$SRC_ROOT/jdk"
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901  # This feature is no longer supported.
30902
30903
30904
30905# Check whether --with-add-source-root was given.
30906if test "${with_add_source_root+set}" = set; then :
30907  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
30908$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30909fi
30910
30911
30912
30913
30914# Check whether --with-override-source-root was given.
30915if test "${with_override_source_root+set}" = set; then :
30916  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
30917$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30918fi
30919
30920
30921
30922
30923# Check whether --with-adds-and-overrides was given.
30924if test "${with_adds_and_overrides+set}" = set; then :
30925  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
30926$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30927fi
30928
30929
30930
30931
30932# Check whether --with-override-langtools was given.
30933if test "${with_override_langtools+set}" = set; then :
30934  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30935$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30936fi
30937
30938
30939
30940
30941# Check whether --with-override-corba was given.
30942if test "${with_override_corba+set}" = set; then :
30943  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30944$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30945fi
30946
30947
30948
30949
30950# Check whether --with-override-jaxp was given.
30951if test "${with_override_jaxp+set}" = set; then :
30952  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30953$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30954fi
30955
30956
30957
30958
30959# Check whether --with-override-jaxws was given.
30960if test "${with_override_jaxws+set}" = set; then :
30961  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30962$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30963fi
30964
30965
30966
30967
30968# Check whether --with-override-hotspot was given.
30969if test "${with_override_hotspot+set}" = set; then :
30970  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30971$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30972fi
30973
30974
30975
30976
30977# Check whether --with-override-nashorn was given.
30978if test "${with_override_nashorn+set}" = set; then :
30979  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30980$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30981fi
30982
30983
30984
30985
30986# Check whether --with-override-jdk was given.
30987if test "${with_override_jdk+set}" = set; then :
30988  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30989$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30990fi
30991
30992
30993
30994
30995  BUILD_OUTPUT="$OUTPUT_ROOT"
30996
30997
30998  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30999  BUILD_HOTSPOT=true
31000
31001
31002
31003# Check whether --with-import-hotspot was given.
31004if test "${with_import_hotspot+set}" = set; then :
31005  withval=$with_import_hotspot;
31006fi
31007
31008  if test "x$with_import_hotspot" != x; then
31009    CURDIR="$PWD"
31010    cd "$with_import_hotspot"
31011    HOTSPOT_DIST="`pwd`"
31012    cd "$CURDIR"
31013    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31014      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31015    fi
31016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31017$as_echo_n "checking if hotspot should be imported... " >&6; }
31018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31019$as_echo "yes from $HOTSPOT_DIST" >&6; }
31020    BUILD_HOTSPOT=false
31021  fi
31022
31023  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31024
31025
31026
31027
31028# Check whether --with-import-modules was given.
31029if test "${with_import_modules+set}" = set; then :
31030  withval=$with_import_modules;
31031fi
31032
31033
31034  if test "x$with_import_modules" != x \
31035      && test "x$with_import_modules" != "xno"; then
31036    if test -d "$with_import_modules"; then
31037      IMPORT_MODULES_TOPDIR="$with_import_modules"
31038
31039  # Only process if variable expands to non-empty
31040
31041  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31043
31044  # Input might be given as Windows format, start by converting to
31045  # unix format.
31046  path="$IMPORT_MODULES_TOPDIR"
31047  new_path=`$CYGPATH -u "$path"`
31048
31049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31052  # "foo.exe" is OK but "foo" is an error.
31053  #
31054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31055  # It is also a way to make sure we got the proper file name for the real test later on.
31056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31057  if test "x$test_shortpath" = x; then
31058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31059$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31060    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31061  fi
31062
31063  # Call helper function which possibly converts this using DOS-style short mode.
31064  # If so, the updated path is stored in $new_path.
31065
31066  input_path="$new_path"
31067  # Check if we need to convert this using DOS-style short mode. If the path
31068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31069  # take no chances and rewrite it.
31070  # Note: m4 eats our [], so we need to use [ and ] instead.
31071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31072  if test "x$has_forbidden_chars" != x; then
31073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31077      # Going to short mode and back again did indeed matter. Since short mode is
31078      # case insensitive, let's make it lowercase to improve readability.
31079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31080      # Now convert it back to Unix-style (cygpath)
31081      input_path=`$CYGPATH -u "$shortmode_path"`
31082      new_path="$input_path"
31083    fi
31084  fi
31085
31086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31087  if test "x$test_cygdrive_prefix" = x; then
31088    # As a simple fix, exclude /usr/bin since it's not a real path.
31089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31091      # a path prefixed by /cygdrive for fixpath to work.
31092      new_path="$CYGWIN_ROOT_PATH$input_path"
31093    fi
31094  fi
31095
31096
31097  if test "x$path" != "x$new_path"; then
31098    IMPORT_MODULES_TOPDIR="$new_path"
31099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31100$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31101  fi
31102
31103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31104
31105  path="$IMPORT_MODULES_TOPDIR"
31106  has_colon=`$ECHO $path | $GREP ^.:`
31107  new_path="$path"
31108  if test "x$has_colon" = x; then
31109    # Not in mixed or Windows style, start by that.
31110    new_path=`cmd //c echo $path`
31111  fi
31112
31113
31114  input_path="$new_path"
31115  # Check if we need to convert this using DOS-style short mode. If the path
31116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31117  # take no chances and rewrite it.
31118  # Note: m4 eats our [], so we need to use [ and ] instead.
31119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31120  if test "x$has_forbidden_chars" != x; then
31121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31123  fi
31124
31125
31126  windows_path="$new_path"
31127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31128    unix_path=`$CYGPATH -u "$windows_path"`
31129    new_path="$unix_path"
31130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31132    new_path="$unix_path"
31133  fi
31134
31135  if test "x$path" != "x$new_path"; then
31136    IMPORT_MODULES_TOPDIR="$new_path"
31137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31138$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31139  fi
31140
31141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31143
31144    else
31145      # We're on a unix platform. Hooray! :)
31146      path="$IMPORT_MODULES_TOPDIR"
31147      has_space=`$ECHO "$path" | $GREP " "`
31148      if test "x$has_space" != x; then
31149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31150$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31151        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31152      fi
31153
31154      # Use eval to expand a potential ~
31155      eval path="$path"
31156      if test ! -f "$path" && test ! -d "$path"; then
31157        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31158      fi
31159
31160      if test -d "$path"; then
31161        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31162      else
31163        dir="`$DIRNAME "$path"`"
31164        base="`$BASENAME "$path"`"
31165        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31166      fi
31167    fi
31168  fi
31169
31170    elif test -e "$with_import_modules"; then
31171      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31172      $RM -rf "$IMPORT_MODULES_TOPDIR"
31173      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31174      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31175        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31176      fi
31177    else
31178      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31179    fi
31180  fi
31181
31182  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31183    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31184  fi
31185  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31186    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31187  fi
31188  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31189    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31190  fi
31191  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31192    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31193  fi
31194  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31195    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31196  fi
31197  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31198    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31199  fi
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209###############################################################################
31210#
31211# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31212# native code.
31213#
31214###############################################################################
31215
31216# See if we are doing a complete static build or not
31217
31218  # Check whether --enable-static-build was given.
31219if test "${enable_static_build+set}" = set; then :
31220  enableval=$enable_static_build;
31221fi
31222
31223  STATIC_BUILD=false
31224  if test "x$enable_static_build" = "xyes"; then
31225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31226$as_echo_n "checking if static build is enabled... " >&6; }
31227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31228$as_echo "yes" >&6; }
31229    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31230      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31231    fi
31232    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31233    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31234    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31235    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31236    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31237    STATIC_BUILD=true
31238  elif test "x$enable_static_build" = "xno"; then
31239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31240$as_echo_n "checking if static build is enabled... " >&6; }
31241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31242$as_echo "no" >&6; }
31243  elif test "x$enable_static_build" != "x"; then
31244    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31245  fi
31246
31247
31248
31249
31250# First determine the toolchain type (compiler family)
31251
31252
31253# Check whether --with-toolchain-type was given.
31254if test "${with_toolchain_type+set}" = set; then :
31255  withval=$with_toolchain_type;
31256fi
31257
31258
31259  # Use indirect variable referencing
31260  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31261  VALID_TOOLCHAINS=${!toolchain_var_name}
31262
31263  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31264    if test -n "$XCODEBUILD"; then
31265      # On Mac OS X, default toolchain to clang after Xcode 5
31266      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31267      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31268      if test $? -ne 0; then
31269        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31270      fi
31271      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31272          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31273          $CUT -f 1 -d .`
31274      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31275$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31276      if test $XCODE_MAJOR_VERSION -ge 5; then
31277          DEFAULT_TOOLCHAIN="clang"
31278      else
31279          DEFAULT_TOOLCHAIN="gcc"
31280      fi
31281    else
31282      # If Xcode is not installed, but the command line tools are
31283      # then we can't run xcodebuild. On these systems we should
31284      # default to clang
31285      DEFAULT_TOOLCHAIN="clang"
31286    fi
31287  else
31288    # First toolchain type in the list is the default
31289    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31290  fi
31291
31292  if test "x$with_toolchain_type" = xlist; then
31293    # List all toolchains
31294    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31295$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31296    for toolchain in $VALID_TOOLCHAINS; do
31297      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31298      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31299      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31300    done
31301
31302    exit 0
31303  elif test "x$with_toolchain_type" != x; then
31304    # User override; check that it is valid
31305    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31306      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31307$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31308      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31309$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31310      as_fn_error $? "Cannot continue." "$LINENO" 5
31311    fi
31312    TOOLCHAIN_TYPE=$with_toolchain_type
31313  else
31314    # No flag given, use default
31315    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31316  fi
31317
31318
31319  TOOLCHAIN_CC_BINARY_clang="clang"
31320  TOOLCHAIN_CC_BINARY_gcc="gcc"
31321  TOOLCHAIN_CC_BINARY_microsoft="cl"
31322  TOOLCHAIN_CC_BINARY_solstudio="cc"
31323  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31324
31325  TOOLCHAIN_CXX_BINARY_clang="clang++"
31326  TOOLCHAIN_CXX_BINARY_gcc="g++"
31327  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31328  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31329  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31330
31331  # Use indirect variable referencing
31332  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31333  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31334  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31335  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31336  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31337  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31338  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31339  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31340
31341
31342  # Define filename patterns
31343  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31344    LIBRARY_PREFIX=
31345    SHARED_LIBRARY_SUFFIX='.dll'
31346    STATIC_LIBRARY_SUFFIX='.lib'
31347    SHARED_LIBRARY='$1.dll'
31348    STATIC_LIBRARY='$1.lib'
31349    OBJ_SUFFIX='.obj'
31350    EXE_SUFFIX='.exe'
31351  else
31352    LIBRARY_PREFIX=lib
31353    SHARED_LIBRARY_SUFFIX='.so'
31354    STATIC_LIBRARY_SUFFIX='.a'
31355    SHARED_LIBRARY='lib$1.so'
31356    STATIC_LIBRARY='lib$1.a'
31357    OBJ_SUFFIX='.o'
31358    EXE_SUFFIX=''
31359    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31360      # For full static builds, we're overloading the SHARED_LIBRARY
31361      # variables in order to limit the amount of changes required.
31362      # It would be better to remove SHARED and just use LIBRARY and
31363      # LIBRARY_SUFFIX for libraries that can be built either
31364      # shared or static and use STATIC_* for libraries that are
31365      # always built statically.
31366      if test "x$STATIC_BUILD" = xtrue; then
31367        SHARED_LIBRARY='lib$1.a'
31368        SHARED_LIBRARY_SUFFIX='.a'
31369      else
31370        SHARED_LIBRARY='lib$1.dylib'
31371        SHARED_LIBRARY_SUFFIX='.dylib'
31372      fi
31373    fi
31374  fi
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31386    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31387$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31388  else
31389    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31390$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31391  fi
31392
31393
31394# User supplied flags should be used when configure detects compilers
31395
31396  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31397    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31398$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31399  fi
31400
31401  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31402    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31403$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31404  fi
31405
31406  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31407    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31408$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31409  fi
31410
31411
31412# Check whether --with-extra-cflags was given.
31413if test "${with_extra_cflags+set}" = set; then :
31414  withval=$with_extra_cflags;
31415fi
31416
31417
31418
31419# Check whether --with-extra-cxxflags was given.
31420if test "${with_extra_cxxflags+set}" = set; then :
31421  withval=$with_extra_cxxflags;
31422fi
31423
31424
31425
31426# Check whether --with-extra-ldflags was given.
31427if test "${with_extra_ldflags+set}" = set; then :
31428  withval=$with_extra_ldflags;
31429fi
31430
31431
31432  EXTRA_CFLAGS="$with_extra_cflags"
31433  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31434  EXTRA_LDFLAGS="$with_extra_ldflags"
31435
31436  # Hotspot needs these set in their legacy form
31437  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31438  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31439  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449  # The global CFLAGS and LDLAGS variables are used by configure tests and
31450  # should include the extra parameters
31451  CFLAGS="$EXTRA_CFLAGS"
31452  CXXFLAGS="$EXTRA_CXXFLAGS"
31453  LDFLAGS="$EXTRA_LDFLAGS"
31454  CPPFLAGS=""
31455
31456# The sysroot cflags are needed for configure to be able to run the compilers
31457
31458  if test "x$SYSROOT" != "x"; then
31459    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31460      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31461        # Solaris Studio does not have a concept of sysroot. Instead we must
31462        # make sure the default include and lib dirs are appended to each
31463        # compile and link command line. Must also add -I-xbuiltin to enable
31464        # inlining of system functions and intrinsics.
31465        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31466        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31467            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31468            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31469      fi
31470    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31471      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31472      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31473    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31474      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31475      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31476    fi
31477    # Propagate the sysroot args to hotspot
31478    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31479    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31480    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31481    # The global CFLAGS and LDFLAGS variables need these for configure to function
31482    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31483    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31484    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31485    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31486  fi
31487
31488  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31489    # We also need -iframework<path>/System/Library/Frameworks
31490    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31491    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31492    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31493    # set this here so it doesn't have to be peppered throughout the forest
31494    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31495    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31496  fi
31497
31498
31499
31500
31501
31502# Then detect the actual binaries needed
31503
31504  # FIXME: Is this needed?
31505  ac_ext=cpp
31506ac_cpp='$CXXCPP $CPPFLAGS'
31507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31510
31511
31512  # Store the CFLAGS etc passed to the configure script.
31513  ORG_CFLAGS="$CFLAGS"
31514  ORG_CXXFLAGS="$CXXFLAGS"
31515
31516  # autoconf magic only relies on PATH, so update it if tools dir is specified
31517  OLD_PATH="$PATH"
31518
31519  # On Windows, we need to detect the visual studio installation first.
31520  # This will change the PATH, but we need to keep that new PATH even
31521  # after toolchain detection is done, since the compiler (on x86) uses
31522  # it for DLL resolution in runtime.
31523  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31524      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31525
31526  # Store path to cygwin link.exe to help excluding it when searching for
31527  # VS linker. This must be done before changing the PATH when looking for VS.
31528  # Extract the first word of "link", so it can be a program name with args.
31529set dummy link; ac_word=$2
31530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31531$as_echo_n "checking for $ac_word... " >&6; }
31532if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31533  $as_echo_n "(cached) " >&6
31534else
31535  case $CYGWIN_LINK in
31536  [\\/]* | ?:[\\/]*)
31537  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31538  ;;
31539  *)
31540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31541for as_dir in $PATH
31542do
31543  IFS=$as_save_IFS
31544  test -z "$as_dir" && as_dir=.
31545    for ac_exec_ext in '' $ac_executable_extensions; do
31546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31547    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31549    break 2
31550  fi
31551done
31552  done
31553IFS=$as_save_IFS
31554
31555  ;;
31556esac
31557fi
31558CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31559if test -n "$CYGWIN_LINK"; then
31560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31561$as_echo "$CYGWIN_LINK" >&6; }
31562else
31563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31564$as_echo "no" >&6; }
31565fi
31566
31567
31568  if test "x$CYGWIN_LINK" != x; then
31569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31570$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31571    "$CYGWIN_LINK" --version > /dev/null
31572    if test $? -eq 0 ; then
31573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31574$as_echo "yes" >&6; }
31575    else
31576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31577$as_echo "no" >&6; }
31578      # This might be the VS linker. Don't exclude it later on.
31579      CYGWIN_LINK=""
31580    fi
31581  fi
31582
31583  # First-hand choice is to locate and run the vsvars bat file.
31584
31585
31586# Check whether --with-toolchain-version was given.
31587if test "${with_toolchain_version+set}" = set; then :
31588  withval=$with_toolchain_version;
31589fi
31590
31591
31592  if test "x$with_toolchain_version" = xlist; then
31593    # List all toolchains
31594    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31595$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31596    for version in $VALID_VS_VERSIONS; do
31597      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31598      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31599    done
31600
31601    exit 0
31602  elif test "x$DEVKIT_VS_VERSION" != x; then
31603    VS_VERSION=$DEVKIT_VS_VERSION
31604    TOOLCHAIN_VERSION=$VS_VERSION
31605    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31606    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31607    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31608    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31609    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31610    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31611
31612    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31613    # can still be exported as INCLUDE for compiler invocations without
31614    # SYSROOT_CFLAGS
31615    OLDIFS="$IFS"
31616    IFS=";"
31617    for i in $DEVKIT_VS_INCLUDE; do
31618      ipath=$i
31619
31620  unix_path="$ipath"
31621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31622    windows_path=`$CYGPATH -m "$unix_path"`
31623    ipath="$windows_path"
31624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31625    windows_path=`cmd //c echo $unix_path`
31626    ipath="$windows_path"
31627  fi
31628
31629      VS_INCLUDE="$VS_INCLUDE;$ipath"
31630    done
31631    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31632    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31633    for i in $DEVKIT_VS_LIB; do
31634      libpath=$i
31635
31636  unix_path="$libpath"
31637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31638    windows_path=`$CYGPATH -m "$unix_path"`
31639    libpath="$windows_path"
31640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31641    windows_path=`cmd //c echo $unix_path`
31642    libpath="$windows_path"
31643  fi
31644
31645      VS_LIB="$VS_LIB;$libpath"
31646    done
31647    IFS="$OLDIFS"
31648
31649    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31650$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31651
31652  elif test "x$with_toolchain_version" != x; then
31653    # User override; check that it is valid
31654    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31655      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31656$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31657      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31658$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31659      as_fn_error $? "Cannot continue." "$LINENO" 5
31660    fi
31661    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31662  else
31663    # No flag given, use default
31664    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31665  fi
31666
31667  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31668
31669  VS_VERSION="$VS_VERSION"
31670  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31671  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31672  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31673  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31674
31675  # When using --with-tools-dir, assume it points to the correct and default
31676  # version of Visual Studio or that --with-toolchain-version was also set.
31677  if test "x$with_tools_dir" != x; then
31678
31679  if test "x$VS_ENV_CMD" = x; then
31680    VS_VERSION="${VS_VERSION}"
31681    VS_BASE="$with_tools_dir/../.."
31682    METHOD="--with-tools-dir"
31683
31684    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31685      VCVARSFILE="vc/bin/vcvars32.bat"
31686    else
31687      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31688    fi
31689
31690
31691  windows_path="$VS_BASE"
31692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31693    unix_path=`$CYGPATH -u "$windows_path"`
31694    VS_BASE="$unix_path"
31695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31697    VS_BASE="$unix_path"
31698  fi
31699
31700    if test -d "$VS_BASE"; then
31701      if test -f "$VS_BASE/$VCVARSFILE"; then
31702        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31703$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31704        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31705        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31706        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31707        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31708      else
31709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31710$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31711        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31712$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31713      fi
31714    fi
31715  fi
31716
31717
31718  if test "x$VS_ENV_CMD" = x; then
31719    VS_VERSION="${VS_VERSION}"
31720    VS_BASE="$with_tools_dir/../../.."
31721    METHOD="--with-tools-dir"
31722
31723    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31724      VCVARSFILE="vc/bin/vcvars32.bat"
31725    else
31726      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31727    fi
31728
31729
31730  windows_path="$VS_BASE"
31731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31732    unix_path=`$CYGPATH -u "$windows_path"`
31733    VS_BASE="$unix_path"
31734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31736    VS_BASE="$unix_path"
31737  fi
31738
31739    if test -d "$VS_BASE"; then
31740      if test -f "$VS_BASE/$VCVARSFILE"; then
31741        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31742$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31743        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31744        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31745        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31746        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31747      else
31748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31749$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31750        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31751$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31752      fi
31753    fi
31754  fi
31755
31756    if test "x$VS_ENV_CMD" = x; then
31757      # Having specified an argument which is incorrect will produce an instant failure;
31758      # we should not go on looking
31759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31760$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31761      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31762$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31763      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31764$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31765      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31766    fi
31767  fi
31768
31769  VS_ENV_CMD=""
31770  VS_ENV_ARGS=""
31771
31772  if test "x$VS_COMNTOOLS" != x; then
31773
31774  if test "x$VS_ENV_CMD" = x; then
31775    VS_VERSION="${VS_VERSION}"
31776    VS_BASE="$VS_COMNTOOLS/../.."
31777    METHOD="$VS_COMNTOOLS_VAR variable"
31778
31779    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31780      VCVARSFILE="vc/bin/vcvars32.bat"
31781    else
31782      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31783    fi
31784
31785
31786  windows_path="$VS_BASE"
31787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31788    unix_path=`$CYGPATH -u "$windows_path"`
31789    VS_BASE="$unix_path"
31790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31792    VS_BASE="$unix_path"
31793  fi
31794
31795    if test -d "$VS_BASE"; then
31796      if test -f "$VS_BASE/$VCVARSFILE"; then
31797        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31798$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31799        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31800        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31801        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31802        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31803      else
31804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31805$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31806        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31807$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31808      fi
31809    fi
31810  fi
31811
31812  fi
31813  if test "x$PROGRAMFILES" != x; then
31814
31815  if test "x$VS_ENV_CMD" = x; then
31816    VS_VERSION="${VS_VERSION}"
31817    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31818    METHOD="well-known name"
31819
31820    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31821      VCVARSFILE="vc/bin/vcvars32.bat"
31822    else
31823      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31824    fi
31825
31826
31827  windows_path="$VS_BASE"
31828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31829    unix_path=`$CYGPATH -u "$windows_path"`
31830    VS_BASE="$unix_path"
31831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31833    VS_BASE="$unix_path"
31834  fi
31835
31836    if test -d "$VS_BASE"; then
31837      if test -f "$VS_BASE/$VCVARSFILE"; then
31838        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31839$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31840        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31841        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31842        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31843        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31844      else
31845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31846$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31847        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31848$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31849      fi
31850    fi
31851  fi
31852
31853  fi
31854  # Work around the insanely named ProgramFiles(x86) env variable
31855  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31856  if test "x$PROGRAMFILES_X86" != x; then
31857
31858  if test "x$VS_ENV_CMD" = x; then
31859    VS_VERSION="${VS_VERSION}"
31860    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31861    METHOD="well-known name"
31862
31863    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31864      VCVARSFILE="vc/bin/vcvars32.bat"
31865    else
31866      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31867    fi
31868
31869
31870  windows_path="$VS_BASE"
31871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31872    unix_path=`$CYGPATH -u "$windows_path"`
31873    VS_BASE="$unix_path"
31874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31876    VS_BASE="$unix_path"
31877  fi
31878
31879    if test -d "$VS_BASE"; then
31880      if test -f "$VS_BASE/$VCVARSFILE"; then
31881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31882$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31883        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31884        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31885        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31886        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31887      else
31888        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31889$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31890        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31891$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31892      fi
31893    fi
31894  fi
31895
31896  fi
31897
31898  if test "x$VS_ENV_CMD" = x; then
31899    VS_VERSION="${VS_VERSION}"
31900    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31901    METHOD="well-known name"
31902
31903    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31904      VCVARSFILE="vc/bin/vcvars32.bat"
31905    else
31906      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31907    fi
31908
31909
31910  windows_path="$VS_BASE"
31911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31912    unix_path=`$CYGPATH -u "$windows_path"`
31913    VS_BASE="$unix_path"
31914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31916    VS_BASE="$unix_path"
31917  fi
31918
31919    if test -d "$VS_BASE"; then
31920      if test -f "$VS_BASE/$VCVARSFILE"; then
31921        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31922$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31923        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31924        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31925        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31926        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31927      else
31928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31929$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31930        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31931$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31932      fi
31933    fi
31934  fi
31935
31936
31937  if test "x$VS_ENV_CMD" = x; then
31938    VS_VERSION="${VS_VERSION}"
31939    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31940    METHOD="well-known name"
31941
31942    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31943      VCVARSFILE="vc/bin/vcvars32.bat"
31944    else
31945      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31946    fi
31947
31948
31949  windows_path="$VS_BASE"
31950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31951    unix_path=`$CYGPATH -u "$windows_path"`
31952    VS_BASE="$unix_path"
31953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31955    VS_BASE="$unix_path"
31956  fi
31957
31958    if test -d "$VS_BASE"; then
31959      if test -f "$VS_BASE/$VCVARSFILE"; then
31960        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31961$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31962        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31963        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31964        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31965        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31966      else
31967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31968$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31969        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31970$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31971      fi
31972    fi
31973  fi
31974
31975
31976  if test "x$SDK_INSTALL_DIR" != x; then
31977    if test "x$ProgramW6432" != x; then
31978
31979  if test "x$VS_ENV_CMD" = x; then
31980    VS_VERSION="${VS_VERSION}"
31981    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31982    METHOD="well-known name"
31983
31984  windows_path="$WIN_SDK_BASE"
31985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31986    unix_path=`$CYGPATH -u "$windows_path"`
31987    WIN_SDK_BASE="$unix_path"
31988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31990    WIN_SDK_BASE="$unix_path"
31991  fi
31992
31993    if test -d "$WIN_SDK_BASE"; then
31994      # There have been cases of partial or broken SDK installations. A missing
31995      # lib dir is not going to work.
31996      if test ! -d "$WIN_SDK_BASE/lib"; then
31997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31998$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31999        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32000$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32001      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32005        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32006          VS_ENV_ARGS="/x86"
32007        else
32008          VS_ENV_ARGS="/x64"
32009        fi
32010        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32011        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32012        # TODO: improve detection for other versions of SDK
32013        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32014      else
32015        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32016$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32017        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32018$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32019      fi
32020    fi
32021  fi
32022
32023    fi
32024    if test "x$PROGRAMW6432" != x; then
32025
32026  if test "x$VS_ENV_CMD" = x; then
32027    VS_VERSION="${VS_VERSION}"
32028    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32029    METHOD="well-known name"
32030
32031  windows_path="$WIN_SDK_BASE"
32032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32033    unix_path=`$CYGPATH -u "$windows_path"`
32034    WIN_SDK_BASE="$unix_path"
32035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32037    WIN_SDK_BASE="$unix_path"
32038  fi
32039
32040    if test -d "$WIN_SDK_BASE"; then
32041      # There have been cases of partial or broken SDK installations. A missing
32042      # lib dir is not going to work.
32043      if test ! -d "$WIN_SDK_BASE/lib"; then
32044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32045$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32046        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32047$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32048      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32052        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32053          VS_ENV_ARGS="/x86"
32054        else
32055          VS_ENV_ARGS="/x64"
32056        fi
32057        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32058        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32059        # TODO: improve detection for other versions of SDK
32060        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32061      else
32062        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32063$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32064        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32065$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32066      fi
32067    fi
32068  fi
32069
32070    fi
32071    if test "x$PROGRAMFILES" != x; then
32072
32073  if test "x$VS_ENV_CMD" = x; then
32074    VS_VERSION="${VS_VERSION}"
32075    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32076    METHOD="well-known name"
32077
32078  windows_path="$WIN_SDK_BASE"
32079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32080    unix_path=`$CYGPATH -u "$windows_path"`
32081    WIN_SDK_BASE="$unix_path"
32082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32084    WIN_SDK_BASE="$unix_path"
32085  fi
32086
32087    if test -d "$WIN_SDK_BASE"; then
32088      # There have been cases of partial or broken SDK installations. A missing
32089      # lib dir is not going to work.
32090      if test ! -d "$WIN_SDK_BASE/lib"; then
32091        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32092$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32093        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32094$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32095      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32099        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32100          VS_ENV_ARGS="/x86"
32101        else
32102          VS_ENV_ARGS="/x64"
32103        fi
32104        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32105        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32106        # TODO: improve detection for other versions of SDK
32107        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32108      else
32109        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32110$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32111        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32112$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32113      fi
32114    fi
32115  fi
32116
32117    fi
32118
32119  if test "x$VS_ENV_CMD" = x; then
32120    VS_VERSION="${VS_VERSION}"
32121    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32122    METHOD="well-known name"
32123
32124  windows_path="$WIN_SDK_BASE"
32125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32126    unix_path=`$CYGPATH -u "$windows_path"`
32127    WIN_SDK_BASE="$unix_path"
32128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32130    WIN_SDK_BASE="$unix_path"
32131  fi
32132
32133    if test -d "$WIN_SDK_BASE"; then
32134      # There have been cases of partial or broken SDK installations. A missing
32135      # lib dir is not going to work.
32136      if test ! -d "$WIN_SDK_BASE/lib"; then
32137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32139        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32140$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32141      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32145        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32146          VS_ENV_ARGS="/x86"
32147        else
32148          VS_ENV_ARGS="/x64"
32149        fi
32150        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32151        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32152        # TODO: improve detection for other versions of SDK
32153        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32154      else
32155        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32156$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32157        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32158$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32159      fi
32160    fi
32161  fi
32162
32163
32164  if test "x$VS_ENV_CMD" = x; then
32165    VS_VERSION="${VS_VERSION}"
32166    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32167    METHOD="well-known name"
32168
32169  windows_path="$WIN_SDK_BASE"
32170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32171    unix_path=`$CYGPATH -u "$windows_path"`
32172    WIN_SDK_BASE="$unix_path"
32173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32175    WIN_SDK_BASE="$unix_path"
32176  fi
32177
32178    if test -d "$WIN_SDK_BASE"; then
32179      # There have been cases of partial or broken SDK installations. A missing
32180      # lib dir is not going to work.
32181      if test ! -d "$WIN_SDK_BASE/lib"; then
32182        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32183$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32184        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32185$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32186      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32190        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32191          VS_ENV_ARGS="/x86"
32192        else
32193          VS_ENV_ARGS="/x64"
32194        fi
32195        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32196        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32197        # TODO: improve detection for other versions of SDK
32198        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32199      else
32200        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32201$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32202        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32203$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32204      fi
32205    fi
32206  fi
32207
32208  fi
32209
32210    if test "x$VS_ENV_CMD" != x; then
32211      TOOLCHAIN_VERSION=$VS_VERSION
32212      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32213      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32214      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32215      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32216      # The rest of the variables are already evaled while probing
32217      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32218$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32219      break
32220    fi
32221  done
32222
32223
32224  # If we have a devkit, skip all of the below.
32225  if test "x$DEVKIT_VS_VERSION" = x; then
32226    if test "x$VS_ENV_CMD" != x; then
32227      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32228
32229  # Only process if variable expands to non-empty
32230
32231  if test "x$VS_ENV_CMD" != x; then
32232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32233
32234  # First separate the path from the arguments. This will split at the first
32235  # space.
32236  complete="$VS_ENV_CMD"
32237  path="${complete%% *}"
32238  tmp="$complete EOL"
32239  arguments="${tmp#* }"
32240
32241  # Input might be given as Windows format, start by converting to
32242  # unix format.
32243  new_path=`$CYGPATH -u "$path"`
32244
32245  # Now try to locate executable using which
32246  new_path=`$WHICH "$new_path" 2> /dev/null`
32247  # bat and cmd files are not always considered executable in cygwin causing which
32248  # to not find them
32249  if test "x$new_path" = x \
32250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32252    new_path=`$CYGPATH -u "$path"`
32253  fi
32254  if test "x$new_path" = x; then
32255    # Oops. Which didn't find the executable.
32256    # The splitting of arguments from the executable at a space might have been incorrect,
32257    # since paths with space are more likely in Windows. Give it another try with the whole
32258    # argument.
32259    path="$complete"
32260    arguments="EOL"
32261    new_path=`$CYGPATH -u "$path"`
32262    new_path=`$WHICH "$new_path" 2> /dev/null`
32263    # bat and cmd files are not always considered executable in cygwin causing which
32264    # to not find them
32265    if test "x$new_path" = x \
32266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32268      new_path=`$CYGPATH -u "$path"`
32269    fi
32270    if test "x$new_path" = x; then
32271      # It's still not found. Now this is an unrecoverable error.
32272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32273$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32274      has_space=`$ECHO "$complete" | $GREP " "`
32275      if test "x$has_space" != x; then
32276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32278      fi
32279      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32280    fi
32281  fi
32282
32283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32286  # "foo.exe" is OK but "foo" is an error.
32287  #
32288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32289  # It is also a way to make sure we got the proper file name for the real test later on.
32290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32291  if test "x$test_shortpath" = x; then
32292    # Short path failed, file does not exist as specified.
32293    # Try adding .exe or .cmd
32294    if test -f "${new_path}.exe"; then
32295      input_to_shortpath="${new_path}.exe"
32296    elif test -f "${new_path}.cmd"; then
32297      input_to_shortpath="${new_path}.cmd"
32298    else
32299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32300$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32303      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32304    fi
32305  else
32306    input_to_shortpath="$new_path"
32307  fi
32308
32309  # Call helper function which possibly converts this using DOS-style short mode.
32310  # If so, the updated path is stored in $new_path.
32311  new_path="$input_to_shortpath"
32312
32313  input_path="$input_to_shortpath"
32314  # Check if we need to convert this using DOS-style short mode. If the path
32315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32316  # take no chances and rewrite it.
32317  # Note: m4 eats our [], so we need to use [ and ] instead.
32318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32319  if test "x$has_forbidden_chars" != x; then
32320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32324      # Going to short mode and back again did indeed matter. Since short mode is
32325      # case insensitive, let's make it lowercase to improve readability.
32326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32327      # Now convert it back to Unix-style (cygpath)
32328      input_path=`$CYGPATH -u "$shortmode_path"`
32329      new_path="$input_path"
32330    fi
32331  fi
32332
32333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32334  if test "x$test_cygdrive_prefix" = x; then
32335    # As a simple fix, exclude /usr/bin since it's not a real path.
32336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32338      # a path prefixed by /cygdrive for fixpath to work.
32339      new_path="$CYGWIN_ROOT_PATH$input_path"
32340    fi
32341  fi
32342
32343  # remove trailing .exe if any
32344  new_path="${new_path/%.exe/}"
32345
32346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32347
32348  # First separate the path from the arguments. This will split at the first
32349  # space.
32350  complete="$VS_ENV_CMD"
32351  path="${complete%% *}"
32352  tmp="$complete EOL"
32353  arguments="${tmp#* }"
32354
32355  # Input might be given as Windows format, start by converting to
32356  # unix format.
32357  new_path="$path"
32358
32359  windows_path="$new_path"
32360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32361    unix_path=`$CYGPATH -u "$windows_path"`
32362    new_path="$unix_path"
32363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32365    new_path="$unix_path"
32366  fi
32367
32368
32369  # Now try to locate executable using which
32370  new_path=`$WHICH "$new_path" 2> /dev/null`
32371
32372  if test "x$new_path" = x; then
32373    # Oops. Which didn't find the executable.
32374    # The splitting of arguments from the executable at a space might have been incorrect,
32375    # since paths with space are more likely in Windows. Give it another try with the whole
32376    # argument.
32377    path="$complete"
32378    arguments="EOL"
32379    new_path="$path"
32380
32381  windows_path="$new_path"
32382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32383    unix_path=`$CYGPATH -u "$windows_path"`
32384    new_path="$unix_path"
32385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32387    new_path="$unix_path"
32388  fi
32389
32390
32391    new_path=`$WHICH "$new_path" 2> /dev/null`
32392    # bat and cmd files are not always considered executable in MSYS causing which
32393    # to not find them
32394    if test "x$new_path" = x \
32395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32397      new_path="$path"
32398
32399  windows_path="$new_path"
32400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32401    unix_path=`$CYGPATH -u "$windows_path"`
32402    new_path="$unix_path"
32403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32405    new_path="$unix_path"
32406  fi
32407
32408    fi
32409
32410    if test "x$new_path" = x; then
32411      # It's still not found. Now this is an unrecoverable error.
32412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32413$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32414      has_space=`$ECHO "$complete" | $GREP " "`
32415      if test "x$has_space" != x; then
32416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32418      fi
32419      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32420    fi
32421  fi
32422
32423  # Now new_path has a complete unix path to the binary
32424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32425    # Keep paths in /bin as-is, but remove trailing .exe if any
32426    new_path="${new_path/%.exe/}"
32427    # Do not save /bin paths to all_fixpath_prefixes!
32428  else
32429    # Not in mixed or Windows style, start by that.
32430    new_path=`cmd //c echo $new_path`
32431
32432  input_path="$new_path"
32433  # Check if we need to convert this using DOS-style short mode. If the path
32434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32435  # take no chances and rewrite it.
32436  # Note: m4 eats our [], so we need to use [ and ] instead.
32437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32438  if test "x$has_forbidden_chars" != x; then
32439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32441  fi
32442
32443    # Output is in $new_path
32444
32445  windows_path="$new_path"
32446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32447    unix_path=`$CYGPATH -u "$windows_path"`
32448    new_path="$unix_path"
32449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32451    new_path="$unix_path"
32452  fi
32453
32454    # remove trailing .exe if any
32455    new_path="${new_path/%.exe/}"
32456
32457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32459  fi
32460
32461    else
32462      # We're on a unix platform. Hooray! :)
32463      # First separate the path from the arguments. This will split at the first
32464      # space.
32465      complete="$VS_ENV_CMD"
32466      path="${complete%% *}"
32467      tmp="$complete EOL"
32468      arguments="${tmp#* }"
32469
32470      # Cannot rely on the command "which" here since it doesn't always work.
32471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32472      if test -z "$is_absolute_path"; then
32473        # Path to executable is not absolute. Find it.
32474        IFS_save="$IFS"
32475        IFS=:
32476        for p in $PATH; do
32477          if test -f "$p/$path" && test -x "$p/$path"; then
32478            new_path="$p/$path"
32479            break
32480          fi
32481        done
32482        IFS="$IFS_save"
32483      else
32484        # This is an absolute path, we can use it without further modifications.
32485        new_path="$path"
32486      fi
32487
32488      if test "x$new_path" = x; then
32489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32490$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32491        has_space=`$ECHO "$complete" | $GREP " "`
32492        if test "x$has_space" != x; then
32493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32495        fi
32496        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32497      fi
32498    fi
32499
32500    # Now join together the path and the arguments once again
32501    if test "x$arguments" != xEOL; then
32502      new_complete="$new_path ${arguments% *}"
32503    else
32504      new_complete="$new_path"
32505    fi
32506
32507    if test "x$complete" != "x$new_complete"; then
32508      VS_ENV_CMD="$new_complete"
32509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32510$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32511    fi
32512  fi
32513
32514
32515      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32516      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32517$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32518
32519      # We need to create a couple of temporary files.
32520      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32521      $MKDIR -p $VS_ENV_TMP_DIR
32522
32523      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32524      # Instead create a shell script which will set the relevant variables when run.
32525      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32526
32527  unix_path="$WINPATH_VS_ENV_CMD"
32528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32529    windows_path=`$CYGPATH -m "$unix_path"`
32530    WINPATH_VS_ENV_CMD="$windows_path"
32531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32532    windows_path=`cmd //c echo $unix_path`
32533    WINPATH_VS_ENV_CMD="$windows_path"
32534  fi
32535
32536      WINPATH_BASH="$BASH"
32537
32538  unix_path="$WINPATH_BASH"
32539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32540    windows_path=`$CYGPATH -m "$unix_path"`
32541    WINPATH_BASH="$windows_path"
32542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32543    windows_path=`cmd //c echo $unix_path`
32544    WINPATH_BASH="$windows_path"
32545  fi
32546
32547
32548      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32549      # script (executable by bash) that will setup the important variables.
32550      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32551      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32552      # This will end up something like:
32553      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32554      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32555      # These will end up something like:
32556      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32557      # The trailing space for everyone except PATH is no typo, but is needed due
32558      # to trailing \ in the Windows paths. These will be stripped later.
32559      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32560          >> $EXTRACT_VC_ENV_BAT_FILE
32561      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32562          >> $EXTRACT_VC_ENV_BAT_FILE
32563      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32564          >> $EXTRACT_VC_ENV_BAT_FILE
32565      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32566          >> $EXTRACT_VC_ENV_BAT_FILE
32567      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32568          >> $EXTRACT_VC_ENV_BAT_FILE
32569      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32570          >> $EXTRACT_VC_ENV_BAT_FILE
32571
32572      # Now execute the newly created bat file.
32573      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32574      # Change directory so we don't need to mess with Windows paths in redirects.
32575      cd $VS_ENV_TMP_DIR
32576      cmd /c extract-vs-env.bat | $CAT
32577      cd $CURDIR
32578
32579      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32580        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32581$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32582        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32583$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32584        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32585$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32586        as_fn_error $? "Cannot continue" "$LINENO" 5
32587      fi
32588
32589      # Now set all paths and other env variables. This will allow the rest of
32590      # the configure script to find and run the compiler in the proper way.
32591      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32592$as_echo "$as_me: Setting extracted environment variables" >&6;}
32593      . $VS_ENV_TMP_DIR/set-vs-env.sh
32594      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32595      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32596    else
32597      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32599$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32600    fi
32601  fi
32602
32603  # At this point, we should have correct variables in the environment, or we can't continue.
32604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32605$as_echo_n "checking for Visual Studio variables... " >&6; }
32606
32607  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32608      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32609    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32611$as_echo "present but broken" >&6; }
32612      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32613    else
32614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32615$as_echo "ok" >&6; }
32616      # Remove any trailing "\" ";" and " " from the variables.
32617      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32618      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32619      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32620      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32621      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32622      # Remove any paths containing # (typically F#) as that messes up make. This
32623      # is needed if visual studio was installed with F# support.
32624      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32625
32626
32627
32628
32629
32630      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32631      OLDIFS="$IFS"
32632      IFS=";"
32633      for i in $VS_INCLUDE; do
32634        ipath=$i
32635        # Only process non-empty elements
32636        if test "x$ipath" != x; then
32637          IFS="$OLDIFS"
32638          # Check that directory exists before calling fixup_path
32639          testpath=$ipath
32640
32641  windows_path="$testpath"
32642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32643    unix_path=`$CYGPATH -u "$windows_path"`
32644    testpath="$unix_path"
32645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32647    testpath="$unix_path"
32648  fi
32649
32650          if test -d "$testpath"; then
32651
32652  # Only process if variable expands to non-empty
32653
32654  if test "x$ipath" != x; then
32655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32656
32657  # Input might be given as Windows format, start by converting to
32658  # unix format.
32659  path="$ipath"
32660  new_path=`$CYGPATH -u "$path"`
32661
32662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32665  # "foo.exe" is OK but "foo" is an error.
32666  #
32667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32668  # It is also a way to make sure we got the proper file name for the real test later on.
32669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32670  if test "x$test_shortpath" = x; then
32671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32672$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32673    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32674  fi
32675
32676  # Call helper function which possibly converts this using DOS-style short mode.
32677  # If so, the updated path is stored in $new_path.
32678
32679  input_path="$new_path"
32680  # Check if we need to convert this using DOS-style short mode. If the path
32681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32682  # take no chances and rewrite it.
32683  # Note: m4 eats our [], so we need to use [ and ] instead.
32684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32685  if test "x$has_forbidden_chars" != x; then
32686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32690      # Going to short mode and back again did indeed matter. Since short mode is
32691      # case insensitive, let's make it lowercase to improve readability.
32692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32693      # Now convert it back to Unix-style (cygpath)
32694      input_path=`$CYGPATH -u "$shortmode_path"`
32695      new_path="$input_path"
32696    fi
32697  fi
32698
32699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32700  if test "x$test_cygdrive_prefix" = x; then
32701    # As a simple fix, exclude /usr/bin since it's not a real path.
32702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32704      # a path prefixed by /cygdrive for fixpath to work.
32705      new_path="$CYGWIN_ROOT_PATH$input_path"
32706    fi
32707  fi
32708
32709
32710  if test "x$path" != "x$new_path"; then
32711    ipath="$new_path"
32712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32713$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32714  fi
32715
32716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32717
32718  path="$ipath"
32719  has_colon=`$ECHO $path | $GREP ^.:`
32720  new_path="$path"
32721  if test "x$has_colon" = x; then
32722    # Not in mixed or Windows style, start by that.
32723    new_path=`cmd //c echo $path`
32724  fi
32725
32726
32727  input_path="$new_path"
32728  # Check if we need to convert this using DOS-style short mode. If the path
32729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32730  # take no chances and rewrite it.
32731  # Note: m4 eats our [], so we need to use [ and ] instead.
32732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32733  if test "x$has_forbidden_chars" != x; then
32734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32736  fi
32737
32738
32739  windows_path="$new_path"
32740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32741    unix_path=`$CYGPATH -u "$windows_path"`
32742    new_path="$unix_path"
32743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32745    new_path="$unix_path"
32746  fi
32747
32748  if test "x$path" != "x$new_path"; then
32749    ipath="$new_path"
32750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32751$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32752  fi
32753
32754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32756
32757    else
32758      # We're on a unix platform. Hooray! :)
32759      path="$ipath"
32760      has_space=`$ECHO "$path" | $GREP " "`
32761      if test "x$has_space" != x; then
32762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32763$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32765      fi
32766
32767      # Use eval to expand a potential ~
32768      eval path="$path"
32769      if test ! -f "$path" && test ! -d "$path"; then
32770        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32771      fi
32772
32773      if test -d "$path"; then
32774        ipath="`cd "$path"; $THEPWDCMD -L`"
32775      else
32776        dir="`$DIRNAME "$path"`"
32777        base="`$BASENAME "$path"`"
32778        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32779      fi
32780    fi
32781  fi
32782
32783            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32784          fi
32785          IFS=";"
32786        fi
32787      done
32788      # Convert VS_LIB into SYSROOT_LDFLAGS
32789      for i in $VS_LIB; do
32790        libpath=$i
32791        # Only process non-empty elements
32792        if test "x$libpath" != x; then
32793          IFS="$OLDIFS"
32794          # Check that directory exists before calling fixup_path
32795          testpath=$libpath
32796
32797  windows_path="$testpath"
32798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32799    unix_path=`$CYGPATH -u "$windows_path"`
32800    testpath="$unix_path"
32801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32803    testpath="$unix_path"
32804  fi
32805
32806          if test -d "$testpath"; then
32807
32808  # Only process if variable expands to non-empty
32809
32810  if test "x$libpath" != x; then
32811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32812
32813  # Input might be given as Windows format, start by converting to
32814  # unix format.
32815  path="$libpath"
32816  new_path=`$CYGPATH -u "$path"`
32817
32818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32821  # "foo.exe" is OK but "foo" is an error.
32822  #
32823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32824  # It is also a way to make sure we got the proper file name for the real test later on.
32825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32826  if test "x$test_shortpath" = x; then
32827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32828$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32829    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32830  fi
32831
32832  # Call helper function which possibly converts this using DOS-style short mode.
32833  # If so, the updated path is stored in $new_path.
32834
32835  input_path="$new_path"
32836  # Check if we need to convert this using DOS-style short mode. If the path
32837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32838  # take no chances and rewrite it.
32839  # Note: m4 eats our [], so we need to use [ and ] instead.
32840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32841  if test "x$has_forbidden_chars" != x; then
32842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32846      # Going to short mode and back again did indeed matter. Since short mode is
32847      # case insensitive, let's make it lowercase to improve readability.
32848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32849      # Now convert it back to Unix-style (cygpath)
32850      input_path=`$CYGPATH -u "$shortmode_path"`
32851      new_path="$input_path"
32852    fi
32853  fi
32854
32855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32856  if test "x$test_cygdrive_prefix" = x; then
32857    # As a simple fix, exclude /usr/bin since it's not a real path.
32858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32860      # a path prefixed by /cygdrive for fixpath to work.
32861      new_path="$CYGWIN_ROOT_PATH$input_path"
32862    fi
32863  fi
32864
32865
32866  if test "x$path" != "x$new_path"; then
32867    libpath="$new_path"
32868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32869$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32870  fi
32871
32872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32873
32874  path="$libpath"
32875  has_colon=`$ECHO $path | $GREP ^.:`
32876  new_path="$path"
32877  if test "x$has_colon" = x; then
32878    # Not in mixed or Windows style, start by that.
32879    new_path=`cmd //c echo $path`
32880  fi
32881
32882
32883  input_path="$new_path"
32884  # Check if we need to convert this using DOS-style short mode. If the path
32885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32886  # take no chances and rewrite it.
32887  # Note: m4 eats our [], so we need to use [ and ] instead.
32888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32889  if test "x$has_forbidden_chars" != x; then
32890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32892  fi
32893
32894
32895  windows_path="$new_path"
32896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32897    unix_path=`$CYGPATH -u "$windows_path"`
32898    new_path="$unix_path"
32899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32901    new_path="$unix_path"
32902  fi
32903
32904  if test "x$path" != "x$new_path"; then
32905    libpath="$new_path"
32906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32907$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32908  fi
32909
32910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32912
32913    else
32914      # We're on a unix platform. Hooray! :)
32915      path="$libpath"
32916      has_space=`$ECHO "$path" | $GREP " "`
32917      if test "x$has_space" != x; then
32918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32919$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32921      fi
32922
32923      # Use eval to expand a potential ~
32924      eval path="$path"
32925      if test ! -f "$path" && test ! -d "$path"; then
32926        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32927      fi
32928
32929      if test -d "$path"; then
32930        libpath="`cd "$path"; $THEPWDCMD -L`"
32931      else
32932        dir="`$DIRNAME "$path"`"
32933        base="`$BASENAME "$path"`"
32934        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32935      fi
32936    fi
32937  fi
32938
32939            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32940          fi
32941          IFS=";"
32942        fi
32943      done
32944      IFS="$OLDIFS"
32945    fi
32946  else
32947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32948$as_echo "not found" >&6; }
32949
32950    if test "x$VS_ENV_CMD" = x; then
32951      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32952$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32953      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32954$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32955    else
32956      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32957$as_echo "$as_me: Running the extraction script failed." >&6;}
32958    fi
32959    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32960$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32961    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32962$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32963    as_fn_error $? "Cannot continue" "$LINENO" 5
32964  fi
32965
32966    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32967    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32968    PATH="$VS_PATH"
32969    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32970    export INCLUDE="$VS_INCLUDE"
32971    export LIB="$VS_LIB"
32972  else
32973    if test "x$XCODE_VERSION_OUTPUT" != x; then
32974      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32975      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32976      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32977    else
32978      # Currently we do not define this for other toolchains. This might change as the need arise.
32979      TOOLCHAIN_VERSION=
32980    fi
32981  fi
32982
32983
32984  # For solaris we really need solaris tools, and not the GNU equivalent.
32985  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32986  # so add that to path before starting to probe.
32987  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32988  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32989    PATH="/usr/ccs/bin:$PATH"
32990  fi
32991
32992  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32993  # override all other locations.
32994  if test "x$TOOLCHAIN_PATH" != x; then
32995    PATH=$TOOLCHAIN_PATH:$PATH
32996  fi
32997
32998
32999  #
33000  # Setup the compilers (CC and CXX)
33001  #
33002
33003  COMPILER_NAME=C
33004  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33005
33006  if test "x$CC" != x; then
33007    # User has supplied compiler name already, always let that override.
33008    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33009$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33010    if test "x`basename $CC`" = "x$CC"; then
33011      # A command without a complete path is provided, search $PATH.
33012
33013      for ac_prog in $CC
33014do
33015  # Extract the first word of "$ac_prog", so it can be a program name with args.
33016set dummy $ac_prog; ac_word=$2
33017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33018$as_echo_n "checking for $ac_word... " >&6; }
33019if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33020  $as_echo_n "(cached) " >&6
33021else
33022  case $POTENTIAL_CC in
33023  [\\/]* | ?:[\\/]*)
33024  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33025  ;;
33026  *)
33027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33028for as_dir in $PATH
33029do
33030  IFS=$as_save_IFS
33031  test -z "$as_dir" && as_dir=.
33032    for ac_exec_ext in '' $ac_executable_extensions; do
33033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33034    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33036    break 2
33037  fi
33038done
33039  done
33040IFS=$as_save_IFS
33041
33042  ;;
33043esac
33044fi
33045POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33046if test -n "$POTENTIAL_CC"; then
33047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33048$as_echo "$POTENTIAL_CC" >&6; }
33049else
33050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33051$as_echo "no" >&6; }
33052fi
33053
33054
33055  test -n "$POTENTIAL_CC" && break
33056done
33057
33058      if test "x$POTENTIAL_CC" != x; then
33059        CC=$POTENTIAL_CC
33060      else
33061        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33062      fi
33063    else
33064      # Otherwise it might already be a complete path
33065      if test ! -x "$CC"; then
33066        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33067      fi
33068    fi
33069  else
33070    # No user supplied value. Locate compiler ourselves.
33071
33072    # If we are cross compiling, assume cross compilation tools follows the
33073    # cross compilation standard where they are prefixed with the autoconf
33074    # standard name for the target. For example the binary
33075    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33076    # If we are not cross compiling, then the default compiler name will be
33077    # used.
33078
33079    CC=
33080    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33081    # before checking the rest of the PATH.
33082    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33083    # step, this should not be necessary.
33084    if test -n "$TOOLCHAIN_PATH"; then
33085      PATH_save="$PATH"
33086      PATH="$TOOLCHAIN_PATH"
33087      for ac_prog in $SEARCH_LIST
33088do
33089  # Extract the first word of "$ac_prog", so it can be a program name with args.
33090set dummy $ac_prog; ac_word=$2
33091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33092$as_echo_n "checking for $ac_word... " >&6; }
33093if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33094  $as_echo_n "(cached) " >&6
33095else
33096  case $TOOLCHAIN_PATH_CC in
33097  [\\/]* | ?:[\\/]*)
33098  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33099  ;;
33100  *)
33101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33102for as_dir in $PATH
33103do
33104  IFS=$as_save_IFS
33105  test -z "$as_dir" && as_dir=.
33106    for ac_exec_ext in '' $ac_executable_extensions; do
33107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33108    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33110    break 2
33111  fi
33112done
33113  done
33114IFS=$as_save_IFS
33115
33116  ;;
33117esac
33118fi
33119TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33120if test -n "$TOOLCHAIN_PATH_CC"; then
33121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33122$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33123else
33124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33125$as_echo "no" >&6; }
33126fi
33127
33128
33129  test -n "$TOOLCHAIN_PATH_CC" && break
33130done
33131
33132      CC=$TOOLCHAIN_PATH_CC
33133      PATH="$PATH_save"
33134    fi
33135
33136    # AC_PATH_PROGS can't be run multiple times with the same variable,
33137    # so create a new name for this run.
33138    if test "x$CC" = x; then
33139      for ac_prog in $SEARCH_LIST
33140do
33141  # Extract the first word of "$ac_prog", so it can be a program name with args.
33142set dummy $ac_prog; ac_word=$2
33143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33144$as_echo_n "checking for $ac_word... " >&6; }
33145if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33146  $as_echo_n "(cached) " >&6
33147else
33148  case $POTENTIAL_CC in
33149  [\\/]* | ?:[\\/]*)
33150  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33151  ;;
33152  *)
33153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33154for as_dir in $PATH
33155do
33156  IFS=$as_save_IFS
33157  test -z "$as_dir" && as_dir=.
33158    for ac_exec_ext in '' $ac_executable_extensions; do
33159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33160    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33162    break 2
33163  fi
33164done
33165  done
33166IFS=$as_save_IFS
33167
33168  ;;
33169esac
33170fi
33171POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33172if test -n "$POTENTIAL_CC"; then
33173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33174$as_echo "$POTENTIAL_CC" >&6; }
33175else
33176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33177$as_echo "no" >&6; }
33178fi
33179
33180
33181  test -n "$POTENTIAL_CC" && break
33182done
33183
33184      CC=$POTENTIAL_CC
33185    fi
33186
33187    if test "x$CC" = x; then
33188
33189  # Print a helpful message on how to acquire the necessary build dependency.
33190  # devkit is the help tag: freetype, cups, alsa etc
33191  MISSING_DEPENDENCY=devkit
33192
33193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33194    cygwin_help $MISSING_DEPENDENCY
33195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33196    msys_help $MISSING_DEPENDENCY
33197  else
33198    PKGHANDLER_COMMAND=
33199
33200    case $PKGHANDLER in
33201      apt-get)
33202        apt_help     $MISSING_DEPENDENCY ;;
33203      yum)
33204        yum_help     $MISSING_DEPENDENCY ;;
33205      port)
33206        port_help    $MISSING_DEPENDENCY ;;
33207      pkgutil)
33208        pkgutil_help $MISSING_DEPENDENCY ;;
33209      pkgadd)
33210        pkgadd_help  $MISSING_DEPENDENCY ;;
33211    esac
33212
33213    if test "x$PKGHANDLER_COMMAND" != x; then
33214      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33215    fi
33216  fi
33217
33218      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33219    fi
33220  fi
33221
33222  # Now we have a compiler binary in CC. Make sure it's okay.
33223
33224  # Only process if variable expands to non-empty
33225
33226  if test "x$CC" != x; then
33227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33228
33229  # First separate the path from the arguments. This will split at the first
33230  # space.
33231  complete="$CC"
33232  path="${complete%% *}"
33233  tmp="$complete EOL"
33234  arguments="${tmp#* }"
33235
33236  # Input might be given as Windows format, start by converting to
33237  # unix format.
33238  new_path=`$CYGPATH -u "$path"`
33239
33240  # Now try to locate executable using which
33241  new_path=`$WHICH "$new_path" 2> /dev/null`
33242  # bat and cmd files are not always considered executable in cygwin causing which
33243  # to not find them
33244  if test "x$new_path" = x \
33245      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33246      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33247    new_path=`$CYGPATH -u "$path"`
33248  fi
33249  if test "x$new_path" = x; then
33250    # Oops. Which didn't find the executable.
33251    # The splitting of arguments from the executable at a space might have been incorrect,
33252    # since paths with space are more likely in Windows. Give it another try with the whole
33253    # argument.
33254    path="$complete"
33255    arguments="EOL"
33256    new_path=`$CYGPATH -u "$path"`
33257    new_path=`$WHICH "$new_path" 2> /dev/null`
33258    # bat and cmd files are not always considered executable in cygwin causing which
33259    # to not find them
33260    if test "x$new_path" = x \
33261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33263      new_path=`$CYGPATH -u "$path"`
33264    fi
33265    if test "x$new_path" = x; then
33266      # It's still not found. Now this is an unrecoverable error.
33267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33268$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33269      has_space=`$ECHO "$complete" | $GREP " "`
33270      if test "x$has_space" != x; then
33271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33273      fi
33274      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33275    fi
33276  fi
33277
33278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33281  # "foo.exe" is OK but "foo" is an error.
33282  #
33283  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33284  # It is also a way to make sure we got the proper file name for the real test later on.
33285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33286  if test "x$test_shortpath" = x; then
33287    # Short path failed, file does not exist as specified.
33288    # Try adding .exe or .cmd
33289    if test -f "${new_path}.exe"; then
33290      input_to_shortpath="${new_path}.exe"
33291    elif test -f "${new_path}.cmd"; then
33292      input_to_shortpath="${new_path}.cmd"
33293    else
33294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33295$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33298      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33299    fi
33300  else
33301    input_to_shortpath="$new_path"
33302  fi
33303
33304  # Call helper function which possibly converts this using DOS-style short mode.
33305  # If so, the updated path is stored in $new_path.
33306  new_path="$input_to_shortpath"
33307
33308  input_path="$input_to_shortpath"
33309  # Check if we need to convert this using DOS-style short mode. If the path
33310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33311  # take no chances and rewrite it.
33312  # Note: m4 eats our [], so we need to use [ and ] instead.
33313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33314  if test "x$has_forbidden_chars" != x; then
33315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33319      # Going to short mode and back again did indeed matter. Since short mode is
33320      # case insensitive, let's make it lowercase to improve readability.
33321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33322      # Now convert it back to Unix-style (cygpath)
33323      input_path=`$CYGPATH -u "$shortmode_path"`
33324      new_path="$input_path"
33325    fi
33326  fi
33327
33328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33329  if test "x$test_cygdrive_prefix" = x; then
33330    # As a simple fix, exclude /usr/bin since it's not a real path.
33331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33333      # a path prefixed by /cygdrive for fixpath to work.
33334      new_path="$CYGWIN_ROOT_PATH$input_path"
33335    fi
33336  fi
33337
33338  # remove trailing .exe if any
33339  new_path="${new_path/%.exe/}"
33340
33341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33342
33343  # First separate the path from the arguments. This will split at the first
33344  # space.
33345  complete="$CC"
33346  path="${complete%% *}"
33347  tmp="$complete EOL"
33348  arguments="${tmp#* }"
33349
33350  # Input might be given as Windows format, start by converting to
33351  # unix format.
33352  new_path="$path"
33353
33354  windows_path="$new_path"
33355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33356    unix_path=`$CYGPATH -u "$windows_path"`
33357    new_path="$unix_path"
33358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33360    new_path="$unix_path"
33361  fi
33362
33363
33364  # Now try to locate executable using which
33365  new_path=`$WHICH "$new_path" 2> /dev/null`
33366
33367  if test "x$new_path" = x; then
33368    # Oops. Which didn't find the executable.
33369    # The splitting of arguments from the executable at a space might have been incorrect,
33370    # since paths with space are more likely in Windows. Give it another try with the whole
33371    # argument.
33372    path="$complete"
33373    arguments="EOL"
33374    new_path="$path"
33375
33376  windows_path="$new_path"
33377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33378    unix_path=`$CYGPATH -u "$windows_path"`
33379    new_path="$unix_path"
33380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33382    new_path="$unix_path"
33383  fi
33384
33385
33386    new_path=`$WHICH "$new_path" 2> /dev/null`
33387    # bat and cmd files are not always considered executable in MSYS causing which
33388    # to not find them
33389    if test "x$new_path" = x \
33390        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33391        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33392      new_path="$path"
33393
33394  windows_path="$new_path"
33395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33396    unix_path=`$CYGPATH -u "$windows_path"`
33397    new_path="$unix_path"
33398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33400    new_path="$unix_path"
33401  fi
33402
33403    fi
33404
33405    if test "x$new_path" = x; then
33406      # It's still not found. Now this is an unrecoverable error.
33407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33408$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33409      has_space=`$ECHO "$complete" | $GREP " "`
33410      if test "x$has_space" != x; then
33411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33413      fi
33414      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33415    fi
33416  fi
33417
33418  # Now new_path has a complete unix path to the binary
33419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33420    # Keep paths in /bin as-is, but remove trailing .exe if any
33421    new_path="${new_path/%.exe/}"
33422    # Do not save /bin paths to all_fixpath_prefixes!
33423  else
33424    # Not in mixed or Windows style, start by that.
33425    new_path=`cmd //c echo $new_path`
33426
33427  input_path="$new_path"
33428  # Check if we need to convert this using DOS-style short mode. If the path
33429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33430  # take no chances and rewrite it.
33431  # Note: m4 eats our [], so we need to use [ and ] instead.
33432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33433  if test "x$has_forbidden_chars" != x; then
33434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33436  fi
33437
33438    # Output is in $new_path
33439
33440  windows_path="$new_path"
33441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33442    unix_path=`$CYGPATH -u "$windows_path"`
33443    new_path="$unix_path"
33444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33446    new_path="$unix_path"
33447  fi
33448
33449    # remove trailing .exe if any
33450    new_path="${new_path/%.exe/}"
33451
33452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33454  fi
33455
33456    else
33457      # We're on a unix platform. Hooray! :)
33458      # First separate the path from the arguments. This will split at the first
33459      # space.
33460      complete="$CC"
33461      path="${complete%% *}"
33462      tmp="$complete EOL"
33463      arguments="${tmp#* }"
33464
33465      # Cannot rely on the command "which" here since it doesn't always work.
33466      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33467      if test -z "$is_absolute_path"; then
33468        # Path to executable is not absolute. Find it.
33469        IFS_save="$IFS"
33470        IFS=:
33471        for p in $PATH; do
33472          if test -f "$p/$path" && test -x "$p/$path"; then
33473            new_path="$p/$path"
33474            break
33475          fi
33476        done
33477        IFS="$IFS_save"
33478      else
33479        # This is an absolute path, we can use it without further modifications.
33480        new_path="$path"
33481      fi
33482
33483      if test "x$new_path" = x; then
33484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33485$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33486        has_space=`$ECHO "$complete" | $GREP " "`
33487        if test "x$has_space" != x; then
33488          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33490        fi
33491        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33492      fi
33493    fi
33494
33495    # Now join together the path and the arguments once again
33496    if test "x$arguments" != xEOL; then
33497      new_complete="$new_path ${arguments% *}"
33498    else
33499      new_complete="$new_path"
33500    fi
33501
33502    if test "x$complete" != "x$new_complete"; then
33503      CC="$new_complete"
33504      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33505$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33506    fi
33507  fi
33508
33509  TEST_COMPILER="$CC"
33510
33511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33512$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33513  SYMLINK_ORIGINAL="$TEST_COMPILER"
33514
33515  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33516    # Follow a chain of symbolic links. Use readlink
33517    # where it exists, else fall back to horribly
33518    # complicated shell code.
33519    if test "x$READLINK_TESTED" != yes; then
33520      # On MacOSX there is a readlink tool with a different
33521      # purpose than the GNU readlink tool. Check the found readlink.
33522      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33523      if test "x$ISGNU" = x; then
33524        # A readlink that we do not know how to use.
33525        # Are there other non-GNU readlinks out there?
33526        READLINK_TESTED=yes
33527        READLINK=
33528      fi
33529    fi
33530
33531    if test "x$READLINK" != x; then
33532      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33533    else
33534      # Save the current directory for restoring afterwards
33535      STARTDIR=$PWD
33536      COUNTER=0
33537      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33538      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33539      cd $sym_link_dir
33540      # Use -P flag to resolve symlinks in directories.
33541      cd `$THEPWDCMD -P`
33542      sym_link_dir=`$THEPWDCMD -P`
33543      # Resolve file symlinks
33544      while test $COUNTER -lt 20; do
33545        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33546        if test "x$ISLINK" == x; then
33547          # This is not a symbolic link! We are done!
33548          break
33549        fi
33550        # Again resolve directory symlinks since the target of the just found
33551        # link could be in a different directory
33552        cd `$DIRNAME $ISLINK`
33553        sym_link_dir=`$THEPWDCMD -P`
33554        sym_link_file=`$BASENAME $ISLINK`
33555        let COUNTER=COUNTER+1
33556      done
33557      cd $STARTDIR
33558      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33559    fi
33560  fi
33561
33562  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33564$as_echo "no symlink" >&6; }
33565  else
33566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33567$as_echo "$SYMLINK_ORIGINAL" >&6; }
33568
33569    # We can't handle ccache by gcc wrappers, since we need to know if we're
33570    # using ccache. Instead ccache usage must be controlled by a configure option.
33571    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33572    if test "x$COMPILER_BASENAME" = "xccache"; then
33573      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33574$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33575      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33576    fi
33577  fi
33578
33579
33580  COMPILER=$CC
33581  COMPILER_NAME=$COMPILER_NAME
33582
33583  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33584    # cc -V output typically looks like
33585    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33586    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33587    # Check that this is likely to be the Solaris Studio cc.
33588    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33589    if test $? -ne 0; then
33590      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33591      { $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
33592$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33593      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33594$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33595      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33596$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33597      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33598    fi
33599    # Remove usage instructions (if present), and
33600    # collapse compiler output into a single line
33601    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33602        $SED -e 's/ *[Uu]sage:.*//'`
33603    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33604        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33605  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33606    # xlc -qversion output typically looks like
33607    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33608    #     Version: 11.01.0000.0015
33609    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33610    # Check that this is likely to be the IBM XL C compiler.
33611    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33612    if test $? -ne 0; then
33613      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33614      { $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
33615$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33616      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33617$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33618      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33619$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33620      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33621    fi
33622    # Collapse compiler output into a single line
33623    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33624    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33625        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33626  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33627    # There is no specific version flag, but all output starts with a version string.
33628    # First line typically looks something like:
33629    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33630    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33631    # Check that this is likely to be Microsoft CL.EXE.
33632    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33633    if test $? -ne 0; then
33634      { $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
33635$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33636      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33637$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33638      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33639    fi
33640    # Collapse compiler output into a single line
33641    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33642    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33643        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33644  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33645    # gcc --version output typically looks like
33646    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33647    #     Copyright (C) 2013 Free Software Foundation, Inc.
33648    #     This is free software; see the source for copying conditions.  There is NO
33649    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33650    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33651    # Check that this is likely to be GCC.
33652    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33653    if test $? -ne 0; then
33654      { $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
33655$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33656      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33657$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33658      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33659    fi
33660    # Remove Copyright and legalese from version string, and
33661    # collapse into a single line
33662    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33663        $SED -e 's/ *Copyright .*//'`
33664    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33665        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33666  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33667    # clang --version output typically looks like
33668    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33669    #    clang version 3.3 (tags/RELEASE_33/final)
33670    # or
33671    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33672    #    Target: x86_64-pc-linux-gnu
33673    #    Thread model: posix
33674    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33675    # Check that this is likely to be clang
33676    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33677    if test $? -ne 0; then
33678      { $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
33679$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33680      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33681$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33682      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33683    fi
33684    # Collapse compiler output into a single line
33685    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33686    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33687        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33688  else
33689      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33690  fi
33691  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33692  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33693  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33694  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33695
33696  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33697$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33698
33699
33700  # Now that we have resolved CC ourself, let autoconf have its go at it
33701  ac_ext=c
33702ac_cpp='$CPP $CPPFLAGS'
33703ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33704ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33705ac_compiler_gnu=$ac_cv_c_compiler_gnu
33706if test -n "$ac_tool_prefix"; then
33707  for ac_prog in $CC
33708  do
33709    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33710set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33712$as_echo_n "checking for $ac_word... " >&6; }
33713if ${ac_cv_prog_CC+:} false; then :
33714  $as_echo_n "(cached) " >&6
33715else
33716  if test -n "$CC"; then
33717  ac_cv_prog_CC="$CC" # Let the user override the test.
33718else
33719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33720for as_dir in $PATH
33721do
33722  IFS=$as_save_IFS
33723  test -z "$as_dir" && as_dir=.
33724    for ac_exec_ext in '' $ac_executable_extensions; do
33725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33726    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33728    break 2
33729  fi
33730done
33731  done
33732IFS=$as_save_IFS
33733
33734fi
33735fi
33736CC=$ac_cv_prog_CC
33737if test -n "$CC"; then
33738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33739$as_echo "$CC" >&6; }
33740else
33741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33742$as_echo "no" >&6; }
33743fi
33744
33745
33746    test -n "$CC" && break
33747  done
33748fi
33749if test -z "$CC"; then
33750  ac_ct_CC=$CC
33751  for ac_prog in $CC
33752do
33753  # Extract the first word of "$ac_prog", so it can be a program name with args.
33754set dummy $ac_prog; ac_word=$2
33755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33756$as_echo_n "checking for $ac_word... " >&6; }
33757if ${ac_cv_prog_ac_ct_CC+:} false; then :
33758  $as_echo_n "(cached) " >&6
33759else
33760  if test -n "$ac_ct_CC"; then
33761  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33762else
33763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33764for as_dir in $PATH
33765do
33766  IFS=$as_save_IFS
33767  test -z "$as_dir" && as_dir=.
33768    for ac_exec_ext in '' $ac_executable_extensions; do
33769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33770    ac_cv_prog_ac_ct_CC="$ac_prog"
33771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33772    break 2
33773  fi
33774done
33775  done
33776IFS=$as_save_IFS
33777
33778fi
33779fi
33780ac_ct_CC=$ac_cv_prog_ac_ct_CC
33781if test -n "$ac_ct_CC"; then
33782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33783$as_echo "$ac_ct_CC" >&6; }
33784else
33785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33786$as_echo "no" >&6; }
33787fi
33788
33789
33790  test -n "$ac_ct_CC" && break
33791done
33792
33793  if test "x$ac_ct_CC" = x; then
33794    CC=""
33795  else
33796    case $cross_compiling:$ac_tool_warned in
33797yes:)
33798{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33799$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33800ac_tool_warned=yes ;;
33801esac
33802    CC=$ac_ct_CC
33803  fi
33804fi
33805
33806
33807test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33809as_fn_error $? "no acceptable C compiler found in \$PATH
33810See \`config.log' for more details" "$LINENO" 5; }
33811
33812# Provide some information about the compiler.
33813$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33814set X $ac_compile
33815ac_compiler=$2
33816for ac_option in --version -v -V -qversion; do
33817  { { ac_try="$ac_compiler $ac_option >&5"
33818case "(($ac_try" in
33819  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33820  *) ac_try_echo=$ac_try;;
33821esac
33822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33823$as_echo "$ac_try_echo"; } >&5
33824  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33825  ac_status=$?
33826  if test -s conftest.err; then
33827    sed '10a\
33828... rest of stderr output deleted ...
33829         10q' conftest.err >conftest.er1
33830    cat conftest.er1 >&5
33831  fi
33832  rm -f conftest.er1 conftest.err
33833  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33834  test $ac_status = 0; }
33835done
33836
33837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33838/* end confdefs.h.  */
33839
33840int
33841main ()
33842{
33843
33844  ;
33845  return 0;
33846}
33847_ACEOF
33848ac_clean_files_save=$ac_clean_files
33849ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33850# Try to create an executable without -o first, disregard a.out.
33851# It will help us diagnose broken compilers, and finding out an intuition
33852# of exeext.
33853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33854$as_echo_n "checking whether the C compiler works... " >&6; }
33855ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33856
33857# The possible output files:
33858ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33859
33860ac_rmfiles=
33861for ac_file in $ac_files
33862do
33863  case $ac_file in
33864    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33865    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33866  esac
33867done
33868rm -f $ac_rmfiles
33869
33870if { { ac_try="$ac_link_default"
33871case "(($ac_try" in
33872  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33873  *) ac_try_echo=$ac_try;;
33874esac
33875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33876$as_echo "$ac_try_echo"; } >&5
33877  (eval "$ac_link_default") 2>&5
33878  ac_status=$?
33879  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33880  test $ac_status = 0; }; then :
33881  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33882# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33883# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33884# so that the user can short-circuit this test for compilers unknown to
33885# Autoconf.
33886for ac_file in $ac_files ''
33887do
33888  test -f "$ac_file" || continue
33889  case $ac_file in
33890    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33891	;;
33892    [ab].out )
33893	# We found the default executable, but exeext='' is most
33894	# certainly right.
33895	break;;
33896    *.* )
33897	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33898	then :; else
33899	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33900	fi
33901	# We set ac_cv_exeext here because the later test for it is not
33902	# safe: cross compilers may not add the suffix if given an `-o'
33903	# argument, so we may need to know it at that point already.
33904	# Even if this section looks crufty: it has the advantage of
33905	# actually working.
33906	break;;
33907    * )
33908	break;;
33909  esac
33910done
33911test "$ac_cv_exeext" = no && ac_cv_exeext=
33912
33913else
33914  ac_file=''
33915fi
33916if test -z "$ac_file"; then :
33917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33918$as_echo "no" >&6; }
33919$as_echo "$as_me: failed program was:" >&5
33920sed 's/^/| /' conftest.$ac_ext >&5
33921
33922{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33924as_fn_error 77 "C compiler cannot create executables
33925See \`config.log' for more details" "$LINENO" 5; }
33926else
33927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33928$as_echo "yes" >&6; }
33929fi
33930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33931$as_echo_n "checking for C compiler default output file name... " >&6; }
33932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33933$as_echo "$ac_file" >&6; }
33934ac_exeext=$ac_cv_exeext
33935
33936rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33937ac_clean_files=$ac_clean_files_save
33938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33939$as_echo_n "checking for suffix of executables... " >&6; }
33940if { { ac_try="$ac_link"
33941case "(($ac_try" in
33942  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33943  *) ac_try_echo=$ac_try;;
33944esac
33945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33946$as_echo "$ac_try_echo"; } >&5
33947  (eval "$ac_link") 2>&5
33948  ac_status=$?
33949  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33950  test $ac_status = 0; }; then :
33951  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33952# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33953# work properly (i.e., refer to `conftest.exe'), while it won't with
33954# `rm'.
33955for ac_file in conftest.exe conftest conftest.*; do
33956  test -f "$ac_file" || continue
33957  case $ac_file in
33958    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33959    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33960	  break;;
33961    * ) break;;
33962  esac
33963done
33964else
33965  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33967as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33968See \`config.log' for more details" "$LINENO" 5; }
33969fi
33970rm -f conftest conftest$ac_cv_exeext
33971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33972$as_echo "$ac_cv_exeext" >&6; }
33973
33974rm -f conftest.$ac_ext
33975EXEEXT=$ac_cv_exeext
33976ac_exeext=$EXEEXT
33977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33978/* end confdefs.h.  */
33979#include <stdio.h>
33980int
33981main ()
33982{
33983FILE *f = fopen ("conftest.out", "w");
33984 return ferror (f) || fclose (f) != 0;
33985
33986  ;
33987  return 0;
33988}
33989_ACEOF
33990ac_clean_files="$ac_clean_files conftest.out"
33991# Check that the compiler produces executables we can run.  If not, either
33992# the compiler is broken, or we cross compile.
33993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33994$as_echo_n "checking whether we are cross compiling... " >&6; }
33995if test "$cross_compiling" != yes; then
33996  { { ac_try="$ac_link"
33997case "(($ac_try" in
33998  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33999  *) ac_try_echo=$ac_try;;
34000esac
34001eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34002$as_echo "$ac_try_echo"; } >&5
34003  (eval "$ac_link") 2>&5
34004  ac_status=$?
34005  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34006  test $ac_status = 0; }
34007  if { ac_try='./conftest$ac_cv_exeext'
34008  { { case "(($ac_try" in
34009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34010  *) ac_try_echo=$ac_try;;
34011esac
34012eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34013$as_echo "$ac_try_echo"; } >&5
34014  (eval "$ac_try") 2>&5
34015  ac_status=$?
34016  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34017  test $ac_status = 0; }; }; then
34018    cross_compiling=no
34019  else
34020    if test "$cross_compiling" = maybe; then
34021	cross_compiling=yes
34022    else
34023	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34025as_fn_error $? "cannot run C compiled programs.
34026If you meant to cross compile, use \`--host'.
34027See \`config.log' for more details" "$LINENO" 5; }
34028    fi
34029  fi
34030fi
34031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34032$as_echo "$cross_compiling" >&6; }
34033
34034rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34035ac_clean_files=$ac_clean_files_save
34036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34037$as_echo_n "checking for suffix of object files... " >&6; }
34038if ${ac_cv_objext+:} false; then :
34039  $as_echo_n "(cached) " >&6
34040else
34041  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34042/* end confdefs.h.  */
34043
34044int
34045main ()
34046{
34047
34048  ;
34049  return 0;
34050}
34051_ACEOF
34052rm -f conftest.o conftest.obj
34053if { { ac_try="$ac_compile"
34054case "(($ac_try" in
34055  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34056  *) ac_try_echo=$ac_try;;
34057esac
34058eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34059$as_echo "$ac_try_echo"; } >&5
34060  (eval "$ac_compile") 2>&5
34061  ac_status=$?
34062  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34063  test $ac_status = 0; }; then :
34064  for ac_file in conftest.o conftest.obj conftest.*; do
34065  test -f "$ac_file" || continue;
34066  case $ac_file in
34067    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34068    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34069       break;;
34070  esac
34071done
34072else
34073  $as_echo "$as_me: failed program was:" >&5
34074sed 's/^/| /' conftest.$ac_ext >&5
34075
34076{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34078as_fn_error $? "cannot compute suffix of object files: cannot compile
34079See \`config.log' for more details" "$LINENO" 5; }
34080fi
34081rm -f conftest.$ac_cv_objext conftest.$ac_ext
34082fi
34083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34084$as_echo "$ac_cv_objext" >&6; }
34085OBJEXT=$ac_cv_objext
34086ac_objext=$OBJEXT
34087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34088$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34089if ${ac_cv_c_compiler_gnu+:} false; then :
34090  $as_echo_n "(cached) " >&6
34091else
34092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34093/* end confdefs.h.  */
34094
34095int
34096main ()
34097{
34098#ifndef __GNUC__
34099       choke me
34100#endif
34101
34102  ;
34103  return 0;
34104}
34105_ACEOF
34106if ac_fn_c_try_compile "$LINENO"; then :
34107  ac_compiler_gnu=yes
34108else
34109  ac_compiler_gnu=no
34110fi
34111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34112ac_cv_c_compiler_gnu=$ac_compiler_gnu
34113
34114fi
34115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34116$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34117if test $ac_compiler_gnu = yes; then
34118  GCC=yes
34119else
34120  GCC=
34121fi
34122ac_test_CFLAGS=${CFLAGS+set}
34123ac_save_CFLAGS=$CFLAGS
34124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34125$as_echo_n "checking whether $CC accepts -g... " >&6; }
34126if ${ac_cv_prog_cc_g+:} false; then :
34127  $as_echo_n "(cached) " >&6
34128else
34129  ac_save_c_werror_flag=$ac_c_werror_flag
34130   ac_c_werror_flag=yes
34131   ac_cv_prog_cc_g=no
34132   CFLAGS="-g"
34133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34134/* end confdefs.h.  */
34135
34136int
34137main ()
34138{
34139
34140  ;
34141  return 0;
34142}
34143_ACEOF
34144if ac_fn_c_try_compile "$LINENO"; then :
34145  ac_cv_prog_cc_g=yes
34146else
34147  CFLAGS=""
34148      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34149/* end confdefs.h.  */
34150
34151int
34152main ()
34153{
34154
34155  ;
34156  return 0;
34157}
34158_ACEOF
34159if ac_fn_c_try_compile "$LINENO"; then :
34160
34161else
34162  ac_c_werror_flag=$ac_save_c_werror_flag
34163	 CFLAGS="-g"
34164	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34165/* end confdefs.h.  */
34166
34167int
34168main ()
34169{
34170
34171  ;
34172  return 0;
34173}
34174_ACEOF
34175if ac_fn_c_try_compile "$LINENO"; then :
34176  ac_cv_prog_cc_g=yes
34177fi
34178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34179fi
34180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34181fi
34182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34183   ac_c_werror_flag=$ac_save_c_werror_flag
34184fi
34185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34186$as_echo "$ac_cv_prog_cc_g" >&6; }
34187if test "$ac_test_CFLAGS" = set; then
34188  CFLAGS=$ac_save_CFLAGS
34189elif test $ac_cv_prog_cc_g = yes; then
34190  if test "$GCC" = yes; then
34191    CFLAGS="-g -O2"
34192  else
34193    CFLAGS="-g"
34194  fi
34195else
34196  if test "$GCC" = yes; then
34197    CFLAGS="-O2"
34198  else
34199    CFLAGS=
34200  fi
34201fi
34202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34203$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34204if ${ac_cv_prog_cc_c89+:} false; then :
34205  $as_echo_n "(cached) " >&6
34206else
34207  ac_cv_prog_cc_c89=no
34208ac_save_CC=$CC
34209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34210/* end confdefs.h.  */
34211#include <stdarg.h>
34212#include <stdio.h>
34213struct stat;
34214/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34215struct buf { int x; };
34216FILE * (*rcsopen) (struct buf *, struct stat *, int);
34217static char *e (p, i)
34218     char **p;
34219     int i;
34220{
34221  return p[i];
34222}
34223static char *f (char * (*g) (char **, int), char **p, ...)
34224{
34225  char *s;
34226  va_list v;
34227  va_start (v,p);
34228  s = g (p, va_arg (v,int));
34229  va_end (v);
34230  return s;
34231}
34232
34233/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34234   function prototypes and stuff, but not '\xHH' hex character constants.
34235   These don't provoke an error unfortunately, instead are silently treated
34236   as 'x'.  The following induces an error, until -std is added to get
34237   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34238   array size at least.  It's necessary to write '\x00'==0 to get something
34239   that's true only with -std.  */
34240int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34241
34242/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34243   inside strings and character constants.  */
34244#define FOO(x) 'x'
34245int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34246
34247int test (int i, double x);
34248struct s1 {int (*f) (int a);};
34249struct s2 {int (*f) (double a);};
34250int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34251int argc;
34252char **argv;
34253int
34254main ()
34255{
34256return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34257  ;
34258  return 0;
34259}
34260_ACEOF
34261for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34262	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34263do
34264  CC="$ac_save_CC $ac_arg"
34265  if ac_fn_c_try_compile "$LINENO"; then :
34266  ac_cv_prog_cc_c89=$ac_arg
34267fi
34268rm -f core conftest.err conftest.$ac_objext
34269  test "x$ac_cv_prog_cc_c89" != "xno" && break
34270done
34271rm -f conftest.$ac_ext
34272CC=$ac_save_CC
34273
34274fi
34275# AC_CACHE_VAL
34276case "x$ac_cv_prog_cc_c89" in
34277  x)
34278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34279$as_echo "none needed" >&6; } ;;
34280  xno)
34281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34282$as_echo "unsupported" >&6; } ;;
34283  *)
34284    CC="$CC $ac_cv_prog_cc_c89"
34285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34286$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34287esac
34288if test "x$ac_cv_prog_cc_c89" != xno; then :
34289
34290fi
34291
34292ac_ext=cpp
34293ac_cpp='$CXXCPP $CPPFLAGS'
34294ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34295ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34296ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34297
34298
34299
34300  COMPILER_NAME=C++
34301  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34302
34303  if test "x$CXX" != x; then
34304    # User has supplied compiler name already, always let that override.
34305    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34306$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34307    if test "x`basename $CXX`" = "x$CXX"; then
34308      # A command without a complete path is provided, search $PATH.
34309
34310      for ac_prog in $CXX
34311do
34312  # Extract the first word of "$ac_prog", so it can be a program name with args.
34313set dummy $ac_prog; ac_word=$2
34314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34315$as_echo_n "checking for $ac_word... " >&6; }
34316if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34317  $as_echo_n "(cached) " >&6
34318else
34319  case $POTENTIAL_CXX in
34320  [\\/]* | ?:[\\/]*)
34321  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34322  ;;
34323  *)
34324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34325for as_dir in $PATH
34326do
34327  IFS=$as_save_IFS
34328  test -z "$as_dir" && as_dir=.
34329    for ac_exec_ext in '' $ac_executable_extensions; do
34330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34331    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34333    break 2
34334  fi
34335done
34336  done
34337IFS=$as_save_IFS
34338
34339  ;;
34340esac
34341fi
34342POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34343if test -n "$POTENTIAL_CXX"; then
34344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34345$as_echo "$POTENTIAL_CXX" >&6; }
34346else
34347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34348$as_echo "no" >&6; }
34349fi
34350
34351
34352  test -n "$POTENTIAL_CXX" && break
34353done
34354
34355      if test "x$POTENTIAL_CXX" != x; then
34356        CXX=$POTENTIAL_CXX
34357      else
34358        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34359      fi
34360    else
34361      # Otherwise it might already be a complete path
34362      if test ! -x "$CXX"; then
34363        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34364      fi
34365    fi
34366  else
34367    # No user supplied value. Locate compiler ourselves.
34368
34369    # If we are cross compiling, assume cross compilation tools follows the
34370    # cross compilation standard where they are prefixed with the autoconf
34371    # standard name for the target. For example the binary
34372    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34373    # If we are not cross compiling, then the default compiler name will be
34374    # used.
34375
34376    CXX=
34377    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34378    # before checking the rest of the PATH.
34379    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34380    # step, this should not be necessary.
34381    if test -n "$TOOLCHAIN_PATH"; then
34382      PATH_save="$PATH"
34383      PATH="$TOOLCHAIN_PATH"
34384      for ac_prog in $SEARCH_LIST
34385do
34386  # Extract the first word of "$ac_prog", so it can be a program name with args.
34387set dummy $ac_prog; ac_word=$2
34388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34389$as_echo_n "checking for $ac_word... " >&6; }
34390if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34391  $as_echo_n "(cached) " >&6
34392else
34393  case $TOOLCHAIN_PATH_CXX in
34394  [\\/]* | ?:[\\/]*)
34395  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34396  ;;
34397  *)
34398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34399for as_dir in $PATH
34400do
34401  IFS=$as_save_IFS
34402  test -z "$as_dir" && as_dir=.
34403    for ac_exec_ext in '' $ac_executable_extensions; do
34404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34405    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34407    break 2
34408  fi
34409done
34410  done
34411IFS=$as_save_IFS
34412
34413  ;;
34414esac
34415fi
34416TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34417if test -n "$TOOLCHAIN_PATH_CXX"; then
34418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34419$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34420else
34421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34422$as_echo "no" >&6; }
34423fi
34424
34425
34426  test -n "$TOOLCHAIN_PATH_CXX" && break
34427done
34428
34429      CXX=$TOOLCHAIN_PATH_CXX
34430      PATH="$PATH_save"
34431    fi
34432
34433    # AC_PATH_PROGS can't be run multiple times with the same variable,
34434    # so create a new name for this run.
34435    if test "x$CXX" = x; then
34436      for ac_prog in $SEARCH_LIST
34437do
34438  # Extract the first word of "$ac_prog", so it can be a program name with args.
34439set dummy $ac_prog; ac_word=$2
34440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34441$as_echo_n "checking for $ac_word... " >&6; }
34442if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34443  $as_echo_n "(cached) " >&6
34444else
34445  case $POTENTIAL_CXX in
34446  [\\/]* | ?:[\\/]*)
34447  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34448  ;;
34449  *)
34450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34451for as_dir in $PATH
34452do
34453  IFS=$as_save_IFS
34454  test -z "$as_dir" && as_dir=.
34455    for ac_exec_ext in '' $ac_executable_extensions; do
34456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34457    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34459    break 2
34460  fi
34461done
34462  done
34463IFS=$as_save_IFS
34464
34465  ;;
34466esac
34467fi
34468POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34469if test -n "$POTENTIAL_CXX"; then
34470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34471$as_echo "$POTENTIAL_CXX" >&6; }
34472else
34473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34474$as_echo "no" >&6; }
34475fi
34476
34477
34478  test -n "$POTENTIAL_CXX" && break
34479done
34480
34481      CXX=$POTENTIAL_CXX
34482    fi
34483
34484    if test "x$CXX" = x; then
34485
34486  # Print a helpful message on how to acquire the necessary build dependency.
34487  # devkit is the help tag: freetype, cups, alsa etc
34488  MISSING_DEPENDENCY=devkit
34489
34490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34491    cygwin_help $MISSING_DEPENDENCY
34492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34493    msys_help $MISSING_DEPENDENCY
34494  else
34495    PKGHANDLER_COMMAND=
34496
34497    case $PKGHANDLER in
34498      apt-get)
34499        apt_help     $MISSING_DEPENDENCY ;;
34500      yum)
34501        yum_help     $MISSING_DEPENDENCY ;;
34502      port)
34503        port_help    $MISSING_DEPENDENCY ;;
34504      pkgutil)
34505        pkgutil_help $MISSING_DEPENDENCY ;;
34506      pkgadd)
34507        pkgadd_help  $MISSING_DEPENDENCY ;;
34508    esac
34509
34510    if test "x$PKGHANDLER_COMMAND" != x; then
34511      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34512    fi
34513  fi
34514
34515      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34516    fi
34517  fi
34518
34519  # Now we have a compiler binary in CXX. Make sure it's okay.
34520
34521  # Only process if variable expands to non-empty
34522
34523  if test "x$CXX" != x; then
34524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34525
34526  # First separate the path from the arguments. This will split at the first
34527  # space.
34528  complete="$CXX"
34529  path="${complete%% *}"
34530  tmp="$complete EOL"
34531  arguments="${tmp#* }"
34532
34533  # Input might be given as Windows format, start by converting to
34534  # unix format.
34535  new_path=`$CYGPATH -u "$path"`
34536
34537  # Now try to locate executable using which
34538  new_path=`$WHICH "$new_path" 2> /dev/null`
34539  # bat and cmd files are not always considered executable in cygwin causing which
34540  # to not find them
34541  if test "x$new_path" = x \
34542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34544    new_path=`$CYGPATH -u "$path"`
34545  fi
34546  if test "x$new_path" = x; then
34547    # Oops. Which didn't find the executable.
34548    # The splitting of arguments from the executable at a space might have been incorrect,
34549    # since paths with space are more likely in Windows. Give it another try with the whole
34550    # argument.
34551    path="$complete"
34552    arguments="EOL"
34553    new_path=`$CYGPATH -u "$path"`
34554    new_path=`$WHICH "$new_path" 2> /dev/null`
34555    # bat and cmd files are not always considered executable in cygwin causing which
34556    # to not find them
34557    if test "x$new_path" = x \
34558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34560      new_path=`$CYGPATH -u "$path"`
34561    fi
34562    if test "x$new_path" = x; then
34563      # It's still not found. Now this is an unrecoverable error.
34564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34565$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34566      has_space=`$ECHO "$complete" | $GREP " "`
34567      if test "x$has_space" != x; then
34568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34570      fi
34571      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34572    fi
34573  fi
34574
34575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34578  # "foo.exe" is OK but "foo" is an error.
34579  #
34580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34581  # It is also a way to make sure we got the proper file name for the real test later on.
34582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34583  if test "x$test_shortpath" = x; then
34584    # Short path failed, file does not exist as specified.
34585    # Try adding .exe or .cmd
34586    if test -f "${new_path}.exe"; then
34587      input_to_shortpath="${new_path}.exe"
34588    elif test -f "${new_path}.cmd"; then
34589      input_to_shortpath="${new_path}.cmd"
34590    else
34591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34592$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34595      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34596    fi
34597  else
34598    input_to_shortpath="$new_path"
34599  fi
34600
34601  # Call helper function which possibly converts this using DOS-style short mode.
34602  # If so, the updated path is stored in $new_path.
34603  new_path="$input_to_shortpath"
34604
34605  input_path="$input_to_shortpath"
34606  # Check if we need to convert this using DOS-style short mode. If the path
34607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34608  # take no chances and rewrite it.
34609  # Note: m4 eats our [], so we need to use [ and ] instead.
34610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34611  if test "x$has_forbidden_chars" != x; then
34612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34616      # Going to short mode and back again did indeed matter. Since short mode is
34617      # case insensitive, let's make it lowercase to improve readability.
34618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34619      # Now convert it back to Unix-style (cygpath)
34620      input_path=`$CYGPATH -u "$shortmode_path"`
34621      new_path="$input_path"
34622    fi
34623  fi
34624
34625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34626  if test "x$test_cygdrive_prefix" = x; then
34627    # As a simple fix, exclude /usr/bin since it's not a real path.
34628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34630      # a path prefixed by /cygdrive for fixpath to work.
34631      new_path="$CYGWIN_ROOT_PATH$input_path"
34632    fi
34633  fi
34634
34635  # remove trailing .exe if any
34636  new_path="${new_path/%.exe/}"
34637
34638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34639
34640  # First separate the path from the arguments. This will split at the first
34641  # space.
34642  complete="$CXX"
34643  path="${complete%% *}"
34644  tmp="$complete EOL"
34645  arguments="${tmp#* }"
34646
34647  # Input might be given as Windows format, start by converting to
34648  # unix format.
34649  new_path="$path"
34650
34651  windows_path="$new_path"
34652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34653    unix_path=`$CYGPATH -u "$windows_path"`
34654    new_path="$unix_path"
34655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34657    new_path="$unix_path"
34658  fi
34659
34660
34661  # Now try to locate executable using which
34662  new_path=`$WHICH "$new_path" 2> /dev/null`
34663
34664  if test "x$new_path" = x; then
34665    # Oops. Which didn't find the executable.
34666    # The splitting of arguments from the executable at a space might have been incorrect,
34667    # since paths with space are more likely in Windows. Give it another try with the whole
34668    # argument.
34669    path="$complete"
34670    arguments="EOL"
34671    new_path="$path"
34672
34673  windows_path="$new_path"
34674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34675    unix_path=`$CYGPATH -u "$windows_path"`
34676    new_path="$unix_path"
34677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34679    new_path="$unix_path"
34680  fi
34681
34682
34683    new_path=`$WHICH "$new_path" 2> /dev/null`
34684    # bat and cmd files are not always considered executable in MSYS causing which
34685    # to not find them
34686    if test "x$new_path" = x \
34687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34689      new_path="$path"
34690
34691  windows_path="$new_path"
34692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34693    unix_path=`$CYGPATH -u "$windows_path"`
34694    new_path="$unix_path"
34695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34697    new_path="$unix_path"
34698  fi
34699
34700    fi
34701
34702    if test "x$new_path" = x; then
34703      # It's still not found. Now this is an unrecoverable error.
34704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34705$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34706      has_space=`$ECHO "$complete" | $GREP " "`
34707      if test "x$has_space" != x; then
34708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34710      fi
34711      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34712    fi
34713  fi
34714
34715  # Now new_path has a complete unix path to the binary
34716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34717    # Keep paths in /bin as-is, but remove trailing .exe if any
34718    new_path="${new_path/%.exe/}"
34719    # Do not save /bin paths to all_fixpath_prefixes!
34720  else
34721    # Not in mixed or Windows style, start by that.
34722    new_path=`cmd //c echo $new_path`
34723
34724  input_path="$new_path"
34725  # Check if we need to convert this using DOS-style short mode. If the path
34726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34727  # take no chances and rewrite it.
34728  # Note: m4 eats our [], so we need to use [ and ] instead.
34729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34730  if test "x$has_forbidden_chars" != x; then
34731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34733  fi
34734
34735    # Output is in $new_path
34736
34737  windows_path="$new_path"
34738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34739    unix_path=`$CYGPATH -u "$windows_path"`
34740    new_path="$unix_path"
34741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34743    new_path="$unix_path"
34744  fi
34745
34746    # remove trailing .exe if any
34747    new_path="${new_path/%.exe/}"
34748
34749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34751  fi
34752
34753    else
34754      # We're on a unix platform. Hooray! :)
34755      # First separate the path from the arguments. This will split at the first
34756      # space.
34757      complete="$CXX"
34758      path="${complete%% *}"
34759      tmp="$complete EOL"
34760      arguments="${tmp#* }"
34761
34762      # Cannot rely on the command "which" here since it doesn't always work.
34763      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34764      if test -z "$is_absolute_path"; then
34765        # Path to executable is not absolute. Find it.
34766        IFS_save="$IFS"
34767        IFS=:
34768        for p in $PATH; do
34769          if test -f "$p/$path" && test -x "$p/$path"; then
34770            new_path="$p/$path"
34771            break
34772          fi
34773        done
34774        IFS="$IFS_save"
34775      else
34776        # This is an absolute path, we can use it without further modifications.
34777        new_path="$path"
34778      fi
34779
34780      if test "x$new_path" = x; then
34781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34782$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34783        has_space=`$ECHO "$complete" | $GREP " "`
34784        if test "x$has_space" != x; then
34785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34787        fi
34788        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34789      fi
34790    fi
34791
34792    # Now join together the path and the arguments once again
34793    if test "x$arguments" != xEOL; then
34794      new_complete="$new_path ${arguments% *}"
34795    else
34796      new_complete="$new_path"
34797    fi
34798
34799    if test "x$complete" != "x$new_complete"; then
34800      CXX="$new_complete"
34801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34802$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34803    fi
34804  fi
34805
34806  TEST_COMPILER="$CXX"
34807
34808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34809$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34810  SYMLINK_ORIGINAL="$TEST_COMPILER"
34811
34812  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34813    # Follow a chain of symbolic links. Use readlink
34814    # where it exists, else fall back to horribly
34815    # complicated shell code.
34816    if test "x$READLINK_TESTED" != yes; then
34817      # On MacOSX there is a readlink tool with a different
34818      # purpose than the GNU readlink tool. Check the found readlink.
34819      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34820      if test "x$ISGNU" = x; then
34821        # A readlink that we do not know how to use.
34822        # Are there other non-GNU readlinks out there?
34823        READLINK_TESTED=yes
34824        READLINK=
34825      fi
34826    fi
34827
34828    if test "x$READLINK" != x; then
34829      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34830    else
34831      # Save the current directory for restoring afterwards
34832      STARTDIR=$PWD
34833      COUNTER=0
34834      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34835      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34836      cd $sym_link_dir
34837      # Use -P flag to resolve symlinks in directories.
34838      cd `$THEPWDCMD -P`
34839      sym_link_dir=`$THEPWDCMD -P`
34840      # Resolve file symlinks
34841      while test $COUNTER -lt 20; do
34842        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34843        if test "x$ISLINK" == x; then
34844          # This is not a symbolic link! We are done!
34845          break
34846        fi
34847        # Again resolve directory symlinks since the target of the just found
34848        # link could be in a different directory
34849        cd `$DIRNAME $ISLINK`
34850        sym_link_dir=`$THEPWDCMD -P`
34851        sym_link_file=`$BASENAME $ISLINK`
34852        let COUNTER=COUNTER+1
34853      done
34854      cd $STARTDIR
34855      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34856    fi
34857  fi
34858
34859  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34861$as_echo "no symlink" >&6; }
34862  else
34863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34864$as_echo "$SYMLINK_ORIGINAL" >&6; }
34865
34866    # We can't handle ccache by gcc wrappers, since we need to know if we're
34867    # using ccache. Instead ccache usage must be controlled by a configure option.
34868    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34869    if test "x$COMPILER_BASENAME" = "xccache"; then
34870      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34871$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34872      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34873    fi
34874  fi
34875
34876
34877  COMPILER=$CXX
34878  COMPILER_NAME=$COMPILER_NAME
34879
34880  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34881    # cc -V output typically looks like
34882    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34883    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34884    # Check that this is likely to be the Solaris Studio cc.
34885    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34886    if test $? -ne 0; then
34887      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34888      { $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
34889$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34890      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34891$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34892      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34893$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34894      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34895    fi
34896    # Remove usage instructions (if present), and
34897    # collapse compiler output into a single line
34898    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34899        $SED -e 's/ *[Uu]sage:.*//'`
34900    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34901        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34902  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34903    # xlc -qversion output typically looks like
34904    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34905    #     Version: 11.01.0000.0015
34906    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34907    # Check that this is likely to be the IBM XL C compiler.
34908    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34909    if test $? -ne 0; then
34910      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34911      { $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
34912$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34913      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34914$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34915      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34916$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34917      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34918    fi
34919    # Collapse compiler output into a single line
34920    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34921    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34922        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34923  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34924    # There is no specific version flag, but all output starts with a version string.
34925    # First line typically looks something like:
34926    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34927    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34928    # Check that this is likely to be Microsoft CL.EXE.
34929    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34930    if test $? -ne 0; then
34931      { $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
34932$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34933      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34934$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34935      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34936    fi
34937    # Collapse compiler output into a single line
34938    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34939    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34940        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34941  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34942    # gcc --version output typically looks like
34943    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34944    #     Copyright (C) 2013 Free Software Foundation, Inc.
34945    #     This is free software; see the source for copying conditions.  There is NO
34946    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34947    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34948    # Check that this is likely to be GCC.
34949    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34950    if test $? -ne 0; then
34951      { $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
34952$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34953      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34954$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34955      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34956    fi
34957    # Remove Copyright and legalese from version string, and
34958    # collapse into a single line
34959    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34960        $SED -e 's/ *Copyright .*//'`
34961    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34962        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34963  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34964    # clang --version output typically looks like
34965    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34966    #    clang version 3.3 (tags/RELEASE_33/final)
34967    # or
34968    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34969    #    Target: x86_64-pc-linux-gnu
34970    #    Thread model: posix
34971    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34972    # Check that this is likely to be clang
34973    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34974    if test $? -ne 0; then
34975      { $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
34976$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34977      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34978$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34979      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34980    fi
34981    # Collapse compiler output into a single line
34982    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34983    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34984        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34985  else
34986      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34987  fi
34988  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34989  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34990  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34991  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34992
34993  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34994$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34995
34996
34997  # Now that we have resolved CXX ourself, let autoconf have its go at it
34998  ac_ext=cpp
34999ac_cpp='$CXXCPP $CPPFLAGS'
35000ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35001ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35002ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35003if test -z "$CXX"; then
35004  if test -n "$CCC"; then
35005    CXX=$CCC
35006  else
35007    if test -n "$ac_tool_prefix"; then
35008  for ac_prog in $CXX
35009  do
35010    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35011set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35013$as_echo_n "checking for $ac_word... " >&6; }
35014if ${ac_cv_prog_CXX+:} false; then :
35015  $as_echo_n "(cached) " >&6
35016else
35017  if test -n "$CXX"; then
35018  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35019else
35020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35021for as_dir in $PATH
35022do
35023  IFS=$as_save_IFS
35024  test -z "$as_dir" && as_dir=.
35025    for ac_exec_ext in '' $ac_executable_extensions; do
35026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35027    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35029    break 2
35030  fi
35031done
35032  done
35033IFS=$as_save_IFS
35034
35035fi
35036fi
35037CXX=$ac_cv_prog_CXX
35038if test -n "$CXX"; then
35039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35040$as_echo "$CXX" >&6; }
35041else
35042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35043$as_echo "no" >&6; }
35044fi
35045
35046
35047    test -n "$CXX" && break
35048  done
35049fi
35050if test -z "$CXX"; then
35051  ac_ct_CXX=$CXX
35052  for ac_prog in $CXX
35053do
35054  # Extract the first word of "$ac_prog", so it can be a program name with args.
35055set dummy $ac_prog; ac_word=$2
35056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35057$as_echo_n "checking for $ac_word... " >&6; }
35058if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35059  $as_echo_n "(cached) " >&6
35060else
35061  if test -n "$ac_ct_CXX"; then
35062  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35063else
35064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35065for as_dir in $PATH
35066do
35067  IFS=$as_save_IFS
35068  test -z "$as_dir" && as_dir=.
35069    for ac_exec_ext in '' $ac_executable_extensions; do
35070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35071    ac_cv_prog_ac_ct_CXX="$ac_prog"
35072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35073    break 2
35074  fi
35075done
35076  done
35077IFS=$as_save_IFS
35078
35079fi
35080fi
35081ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35082if test -n "$ac_ct_CXX"; then
35083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35084$as_echo "$ac_ct_CXX" >&6; }
35085else
35086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35087$as_echo "no" >&6; }
35088fi
35089
35090
35091  test -n "$ac_ct_CXX" && break
35092done
35093
35094  if test "x$ac_ct_CXX" = x; then
35095    CXX="g++"
35096  else
35097    case $cross_compiling:$ac_tool_warned in
35098yes:)
35099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35101ac_tool_warned=yes ;;
35102esac
35103    CXX=$ac_ct_CXX
35104  fi
35105fi
35106
35107  fi
35108fi
35109# Provide some information about the compiler.
35110$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35111set X $ac_compile
35112ac_compiler=$2
35113for ac_option in --version -v -V -qversion; do
35114  { { ac_try="$ac_compiler $ac_option >&5"
35115case "(($ac_try" in
35116  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35117  *) ac_try_echo=$ac_try;;
35118esac
35119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35120$as_echo "$ac_try_echo"; } >&5
35121  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35122  ac_status=$?
35123  if test -s conftest.err; then
35124    sed '10a\
35125... rest of stderr output deleted ...
35126         10q' conftest.err >conftest.er1
35127    cat conftest.er1 >&5
35128  fi
35129  rm -f conftest.er1 conftest.err
35130  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35131  test $ac_status = 0; }
35132done
35133
35134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35135$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35136if ${ac_cv_cxx_compiler_gnu+:} false; then :
35137  $as_echo_n "(cached) " >&6
35138else
35139  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35140/* end confdefs.h.  */
35141
35142int
35143main ()
35144{
35145#ifndef __GNUC__
35146       choke me
35147#endif
35148
35149  ;
35150  return 0;
35151}
35152_ACEOF
35153if ac_fn_cxx_try_compile "$LINENO"; then :
35154  ac_compiler_gnu=yes
35155else
35156  ac_compiler_gnu=no
35157fi
35158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35159ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35160
35161fi
35162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35163$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35164if test $ac_compiler_gnu = yes; then
35165  GXX=yes
35166else
35167  GXX=
35168fi
35169ac_test_CXXFLAGS=${CXXFLAGS+set}
35170ac_save_CXXFLAGS=$CXXFLAGS
35171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35172$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35173if ${ac_cv_prog_cxx_g+:} false; then :
35174  $as_echo_n "(cached) " >&6
35175else
35176  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35177   ac_cxx_werror_flag=yes
35178   ac_cv_prog_cxx_g=no
35179   CXXFLAGS="-g"
35180   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35181/* end confdefs.h.  */
35182
35183int
35184main ()
35185{
35186
35187  ;
35188  return 0;
35189}
35190_ACEOF
35191if ac_fn_cxx_try_compile "$LINENO"; then :
35192  ac_cv_prog_cxx_g=yes
35193else
35194  CXXFLAGS=""
35195      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35196/* end confdefs.h.  */
35197
35198int
35199main ()
35200{
35201
35202  ;
35203  return 0;
35204}
35205_ACEOF
35206if ac_fn_cxx_try_compile "$LINENO"; then :
35207
35208else
35209  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35210	 CXXFLAGS="-g"
35211	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35212/* end confdefs.h.  */
35213
35214int
35215main ()
35216{
35217
35218  ;
35219  return 0;
35220}
35221_ACEOF
35222if ac_fn_cxx_try_compile "$LINENO"; then :
35223  ac_cv_prog_cxx_g=yes
35224fi
35225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35226fi
35227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35228fi
35229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35230   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35231fi
35232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35233$as_echo "$ac_cv_prog_cxx_g" >&6; }
35234if test "$ac_test_CXXFLAGS" = set; then
35235  CXXFLAGS=$ac_save_CXXFLAGS
35236elif test $ac_cv_prog_cxx_g = yes; then
35237  if test "$GXX" = yes; then
35238    CXXFLAGS="-g -O2"
35239  else
35240    CXXFLAGS="-g"
35241  fi
35242else
35243  if test "$GXX" = yes; then
35244    CXXFLAGS="-O2"
35245  else
35246    CXXFLAGS=
35247  fi
35248fi
35249ac_ext=cpp
35250ac_cpp='$CXXCPP $CPPFLAGS'
35251ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35252ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35253ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35254
35255
35256  # This is the compiler version number on the form X.Y[.Z]
35257
35258
35259
35260
35261  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35262    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35263$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35264    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35265$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35266  fi
35267
35268  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35269  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35270    { $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
35271$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;}
35272  fi
35273
35274  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35275    { $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
35276$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35277  fi
35278
35279  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35280
35281
35282  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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
35330
35331
35332    # Execute function body
35333
35334  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35335  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35336
35337  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35338    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35339  fi
35340
35341  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35342    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35343  fi
35344
35345  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35346  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35347
35348  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35349    :
35350
35351  else
35352    :
35353
35354          { $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
35355$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35356
35357
35358  fi
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373  fi
35374
35375  #
35376  # Setup the preprocessor (CPP and CXXCPP)
35377  #
35378  ac_ext=c
35379ac_cpp='$CPP $CPPFLAGS'
35380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35382ac_compiler_gnu=$ac_cv_c_compiler_gnu
35383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35384$as_echo_n "checking how to run the C preprocessor... " >&6; }
35385# On Suns, sometimes $CPP names a directory.
35386if test -n "$CPP" && test -d "$CPP"; then
35387  CPP=
35388fi
35389if test -z "$CPP"; then
35390  if ${ac_cv_prog_CPP+:} false; then :
35391  $as_echo_n "(cached) " >&6
35392else
35393      # Double quotes because CPP needs to be expanded
35394    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35395    do
35396      ac_preproc_ok=false
35397for ac_c_preproc_warn_flag in '' yes
35398do
35399  # Use a header file that comes with gcc, so configuring glibc
35400  # with a fresh cross-compiler works.
35401  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35402  # <limits.h> exists even on freestanding compilers.
35403  # On the NeXT, cc -E runs the code through the compiler's parser,
35404  # not just through cpp. "Syntax error" is here to catch this case.
35405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35406/* end confdefs.h.  */
35407#ifdef __STDC__
35408# include <limits.h>
35409#else
35410# include <assert.h>
35411#endif
35412		     Syntax error
35413_ACEOF
35414if ac_fn_c_try_cpp "$LINENO"; then :
35415
35416else
35417  # Broken: fails on valid input.
35418continue
35419fi
35420rm -f conftest.err conftest.i conftest.$ac_ext
35421
35422  # OK, works on sane cases.  Now check whether nonexistent headers
35423  # can be detected and how.
35424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35425/* end confdefs.h.  */
35426#include <ac_nonexistent.h>
35427_ACEOF
35428if ac_fn_c_try_cpp "$LINENO"; then :
35429  # Broken: success on invalid input.
35430continue
35431else
35432  # Passes both tests.
35433ac_preproc_ok=:
35434break
35435fi
35436rm -f conftest.err conftest.i conftest.$ac_ext
35437
35438done
35439# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35440rm -f conftest.i conftest.err conftest.$ac_ext
35441if $ac_preproc_ok; then :
35442  break
35443fi
35444
35445    done
35446    ac_cv_prog_CPP=$CPP
35447
35448fi
35449  CPP=$ac_cv_prog_CPP
35450else
35451  ac_cv_prog_CPP=$CPP
35452fi
35453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35454$as_echo "$CPP" >&6; }
35455ac_preproc_ok=false
35456for ac_c_preproc_warn_flag in '' yes
35457do
35458  # Use a header file that comes with gcc, so configuring glibc
35459  # with a fresh cross-compiler works.
35460  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35461  # <limits.h> exists even on freestanding compilers.
35462  # On the NeXT, cc -E runs the code through the compiler's parser,
35463  # not just through cpp. "Syntax error" is here to catch this case.
35464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35465/* end confdefs.h.  */
35466#ifdef __STDC__
35467# include <limits.h>
35468#else
35469# include <assert.h>
35470#endif
35471		     Syntax error
35472_ACEOF
35473if ac_fn_c_try_cpp "$LINENO"; then :
35474
35475else
35476  # Broken: fails on valid input.
35477continue
35478fi
35479rm -f conftest.err conftest.i conftest.$ac_ext
35480
35481  # OK, works on sane cases.  Now check whether nonexistent headers
35482  # can be detected and how.
35483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35484/* end confdefs.h.  */
35485#include <ac_nonexistent.h>
35486_ACEOF
35487if ac_fn_c_try_cpp "$LINENO"; then :
35488  # Broken: success on invalid input.
35489continue
35490else
35491  # Passes both tests.
35492ac_preproc_ok=:
35493break
35494fi
35495rm -f conftest.err conftest.i conftest.$ac_ext
35496
35497done
35498# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35499rm -f conftest.i conftest.err conftest.$ac_ext
35500if $ac_preproc_ok; then :
35501
35502else
35503  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35505as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35506See \`config.log' for more details" "$LINENO" 5; }
35507fi
35508
35509ac_ext=cpp
35510ac_cpp='$CXXCPP $CPPFLAGS'
35511ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35512ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35513ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35514
35515
35516  # Only process if variable expands to non-empty
35517
35518  if test "x$CPP" != x; then
35519    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35520
35521  # First separate the path from the arguments. This will split at the first
35522  # space.
35523  complete="$CPP"
35524  path="${complete%% *}"
35525  tmp="$complete EOL"
35526  arguments="${tmp#* }"
35527
35528  # Input might be given as Windows format, start by converting to
35529  # unix format.
35530  new_path=`$CYGPATH -u "$path"`
35531
35532  # Now try to locate executable using which
35533  new_path=`$WHICH "$new_path" 2> /dev/null`
35534  # bat and cmd files are not always considered executable in cygwin causing which
35535  # to not find them
35536  if test "x$new_path" = x \
35537      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35538      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35539    new_path=`$CYGPATH -u "$path"`
35540  fi
35541  if test "x$new_path" = x; then
35542    # Oops. Which didn't find the executable.
35543    # The splitting of arguments from the executable at a space might have been incorrect,
35544    # since paths with space are more likely in Windows. Give it another try with the whole
35545    # argument.
35546    path="$complete"
35547    arguments="EOL"
35548    new_path=`$CYGPATH -u "$path"`
35549    new_path=`$WHICH "$new_path" 2> /dev/null`
35550    # bat and cmd files are not always considered executable in cygwin causing which
35551    # to not find them
35552    if test "x$new_path" = x \
35553        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35554        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35555      new_path=`$CYGPATH -u "$path"`
35556    fi
35557    if test "x$new_path" = x; then
35558      # It's still not found. Now this is an unrecoverable error.
35559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35560$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35561      has_space=`$ECHO "$complete" | $GREP " "`
35562      if test "x$has_space" != x; then
35563        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35564$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35565      fi
35566      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35567    fi
35568  fi
35569
35570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35573  # "foo.exe" is OK but "foo" is an error.
35574  #
35575  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35576  # It is also a way to make sure we got the proper file name for the real test later on.
35577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35578  if test "x$test_shortpath" = x; then
35579    # Short path failed, file does not exist as specified.
35580    # Try adding .exe or .cmd
35581    if test -f "${new_path}.exe"; then
35582      input_to_shortpath="${new_path}.exe"
35583    elif test -f "${new_path}.cmd"; then
35584      input_to_shortpath="${new_path}.cmd"
35585    else
35586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35587$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35588      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35589$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35590      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35591    fi
35592  else
35593    input_to_shortpath="$new_path"
35594  fi
35595
35596  # Call helper function which possibly converts this using DOS-style short mode.
35597  # If so, the updated path is stored in $new_path.
35598  new_path="$input_to_shortpath"
35599
35600  input_path="$input_to_shortpath"
35601  # Check if we need to convert this using DOS-style short mode. If the path
35602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35603  # take no chances and rewrite it.
35604  # Note: m4 eats our [], so we need to use [ and ] instead.
35605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35606  if test "x$has_forbidden_chars" != x; then
35607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35611      # Going to short mode and back again did indeed matter. Since short mode is
35612      # case insensitive, let's make it lowercase to improve readability.
35613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35614      # Now convert it back to Unix-style (cygpath)
35615      input_path=`$CYGPATH -u "$shortmode_path"`
35616      new_path="$input_path"
35617    fi
35618  fi
35619
35620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35621  if test "x$test_cygdrive_prefix" = x; then
35622    # As a simple fix, exclude /usr/bin since it's not a real path.
35623    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35625      # a path prefixed by /cygdrive for fixpath to work.
35626      new_path="$CYGWIN_ROOT_PATH$input_path"
35627    fi
35628  fi
35629
35630  # remove trailing .exe if any
35631  new_path="${new_path/%.exe/}"
35632
35633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35634
35635  # First separate the path from the arguments. This will split at the first
35636  # space.
35637  complete="$CPP"
35638  path="${complete%% *}"
35639  tmp="$complete EOL"
35640  arguments="${tmp#* }"
35641
35642  # Input might be given as Windows format, start by converting to
35643  # unix format.
35644  new_path="$path"
35645
35646  windows_path="$new_path"
35647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35648    unix_path=`$CYGPATH -u "$windows_path"`
35649    new_path="$unix_path"
35650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35652    new_path="$unix_path"
35653  fi
35654
35655
35656  # Now try to locate executable using which
35657  new_path=`$WHICH "$new_path" 2> /dev/null`
35658
35659  if test "x$new_path" = x; then
35660    # Oops. Which didn't find the executable.
35661    # The splitting of arguments from the executable at a space might have been incorrect,
35662    # since paths with space are more likely in Windows. Give it another try with the whole
35663    # argument.
35664    path="$complete"
35665    arguments="EOL"
35666    new_path="$path"
35667
35668  windows_path="$new_path"
35669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35670    unix_path=`$CYGPATH -u "$windows_path"`
35671    new_path="$unix_path"
35672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35674    new_path="$unix_path"
35675  fi
35676
35677
35678    new_path=`$WHICH "$new_path" 2> /dev/null`
35679    # bat and cmd files are not always considered executable in MSYS causing which
35680    # to not find them
35681    if test "x$new_path" = x \
35682        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35683        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35684      new_path="$path"
35685
35686  windows_path="$new_path"
35687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35688    unix_path=`$CYGPATH -u "$windows_path"`
35689    new_path="$unix_path"
35690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35692    new_path="$unix_path"
35693  fi
35694
35695    fi
35696
35697    if test "x$new_path" = x; then
35698      # It's still not found. Now this is an unrecoverable error.
35699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35700$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35701      has_space=`$ECHO "$complete" | $GREP " "`
35702      if test "x$has_space" != x; then
35703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35705      fi
35706      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35707    fi
35708  fi
35709
35710  # Now new_path has a complete unix path to the binary
35711  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35712    # Keep paths in /bin as-is, but remove trailing .exe if any
35713    new_path="${new_path/%.exe/}"
35714    # Do not save /bin paths to all_fixpath_prefixes!
35715  else
35716    # Not in mixed or Windows style, start by that.
35717    new_path=`cmd //c echo $new_path`
35718
35719  input_path="$new_path"
35720  # Check if we need to convert this using DOS-style short mode. If the path
35721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35722  # take no chances and rewrite it.
35723  # Note: m4 eats our [], so we need to use [ and ] instead.
35724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35725  if test "x$has_forbidden_chars" != x; then
35726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35728  fi
35729
35730    # Output is in $new_path
35731
35732  windows_path="$new_path"
35733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35734    unix_path=`$CYGPATH -u "$windows_path"`
35735    new_path="$unix_path"
35736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35738    new_path="$unix_path"
35739  fi
35740
35741    # remove trailing .exe if any
35742    new_path="${new_path/%.exe/}"
35743
35744    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35745    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35746  fi
35747
35748    else
35749      # We're on a unix platform. Hooray! :)
35750      # First separate the path from the arguments. This will split at the first
35751      # space.
35752      complete="$CPP"
35753      path="${complete%% *}"
35754      tmp="$complete EOL"
35755      arguments="${tmp#* }"
35756
35757      # Cannot rely on the command "which" here since it doesn't always work.
35758      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35759      if test -z "$is_absolute_path"; then
35760        # Path to executable is not absolute. Find it.
35761        IFS_save="$IFS"
35762        IFS=:
35763        for p in $PATH; do
35764          if test -f "$p/$path" && test -x "$p/$path"; then
35765            new_path="$p/$path"
35766            break
35767          fi
35768        done
35769        IFS="$IFS_save"
35770      else
35771        # This is an absolute path, we can use it without further modifications.
35772        new_path="$path"
35773      fi
35774
35775      if test "x$new_path" = x; then
35776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35777$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35778        has_space=`$ECHO "$complete" | $GREP " "`
35779        if test "x$has_space" != x; then
35780          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35781$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35782        fi
35783        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35784      fi
35785    fi
35786
35787    # Now join together the path and the arguments once again
35788    if test "x$arguments" != xEOL; then
35789      new_complete="$new_path ${arguments% *}"
35790    else
35791      new_complete="$new_path"
35792    fi
35793
35794    if test "x$complete" != "x$new_complete"; then
35795      CPP="$new_complete"
35796      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35797$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35798    fi
35799  fi
35800
35801  ac_ext=cpp
35802ac_cpp='$CXXCPP $CPPFLAGS'
35803ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35804ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35805ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35807$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35808if test -z "$CXXCPP"; then
35809  if ${ac_cv_prog_CXXCPP+:} false; then :
35810  $as_echo_n "(cached) " >&6
35811else
35812      # Double quotes because CXXCPP needs to be expanded
35813    for CXXCPP in "$CXX -E" "/lib/cpp"
35814    do
35815      ac_preproc_ok=false
35816for ac_cxx_preproc_warn_flag in '' yes
35817do
35818  # Use a header file that comes with gcc, so configuring glibc
35819  # with a fresh cross-compiler works.
35820  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35821  # <limits.h> exists even on freestanding compilers.
35822  # On the NeXT, cc -E runs the code through the compiler's parser,
35823  # not just through cpp. "Syntax error" is here to catch this case.
35824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35825/* end confdefs.h.  */
35826#ifdef __STDC__
35827# include <limits.h>
35828#else
35829# include <assert.h>
35830#endif
35831		     Syntax error
35832_ACEOF
35833if ac_fn_cxx_try_cpp "$LINENO"; then :
35834
35835else
35836  # Broken: fails on valid input.
35837continue
35838fi
35839rm -f conftest.err conftest.i conftest.$ac_ext
35840
35841  # OK, works on sane cases.  Now check whether nonexistent headers
35842  # can be detected and how.
35843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35844/* end confdefs.h.  */
35845#include <ac_nonexistent.h>
35846_ACEOF
35847if ac_fn_cxx_try_cpp "$LINENO"; then :
35848  # Broken: success on invalid input.
35849continue
35850else
35851  # Passes both tests.
35852ac_preproc_ok=:
35853break
35854fi
35855rm -f conftest.err conftest.i conftest.$ac_ext
35856
35857done
35858# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35859rm -f conftest.i conftest.err conftest.$ac_ext
35860if $ac_preproc_ok; then :
35861  break
35862fi
35863
35864    done
35865    ac_cv_prog_CXXCPP=$CXXCPP
35866
35867fi
35868  CXXCPP=$ac_cv_prog_CXXCPP
35869else
35870  ac_cv_prog_CXXCPP=$CXXCPP
35871fi
35872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35873$as_echo "$CXXCPP" >&6; }
35874ac_preproc_ok=false
35875for ac_cxx_preproc_warn_flag in '' yes
35876do
35877  # Use a header file that comes with gcc, so configuring glibc
35878  # with a fresh cross-compiler works.
35879  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35880  # <limits.h> exists even on freestanding compilers.
35881  # On the NeXT, cc -E runs the code through the compiler's parser,
35882  # not just through cpp. "Syntax error" is here to catch this case.
35883  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35884/* end confdefs.h.  */
35885#ifdef __STDC__
35886# include <limits.h>
35887#else
35888# include <assert.h>
35889#endif
35890		     Syntax error
35891_ACEOF
35892if ac_fn_cxx_try_cpp "$LINENO"; then :
35893
35894else
35895  # Broken: fails on valid input.
35896continue
35897fi
35898rm -f conftest.err conftest.i conftest.$ac_ext
35899
35900  # OK, works on sane cases.  Now check whether nonexistent headers
35901  # can be detected and how.
35902  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35903/* end confdefs.h.  */
35904#include <ac_nonexistent.h>
35905_ACEOF
35906if ac_fn_cxx_try_cpp "$LINENO"; then :
35907  # Broken: success on invalid input.
35908continue
35909else
35910  # Passes both tests.
35911ac_preproc_ok=:
35912break
35913fi
35914rm -f conftest.err conftest.i conftest.$ac_ext
35915
35916done
35917# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35918rm -f conftest.i conftest.err conftest.$ac_ext
35919if $ac_preproc_ok; then :
35920
35921else
35922  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35924as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35925See \`config.log' for more details" "$LINENO" 5; }
35926fi
35927
35928ac_ext=cpp
35929ac_cpp='$CXXCPP $CPPFLAGS'
35930ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35931ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35932ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35933
35934
35935  # Only process if variable expands to non-empty
35936
35937  if test "x$CXXCPP" != x; then
35938    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35939
35940  # First separate the path from the arguments. This will split at the first
35941  # space.
35942  complete="$CXXCPP"
35943  path="${complete%% *}"
35944  tmp="$complete EOL"
35945  arguments="${tmp#* }"
35946
35947  # Input might be given as Windows format, start by converting to
35948  # unix format.
35949  new_path=`$CYGPATH -u "$path"`
35950
35951  # Now try to locate executable using which
35952  new_path=`$WHICH "$new_path" 2> /dev/null`
35953  # bat and cmd files are not always considered executable in cygwin causing which
35954  # to not find them
35955  if test "x$new_path" = x \
35956      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35957      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35958    new_path=`$CYGPATH -u "$path"`
35959  fi
35960  if test "x$new_path" = x; then
35961    # Oops. Which didn't find the executable.
35962    # The splitting of arguments from the executable at a space might have been incorrect,
35963    # since paths with space are more likely in Windows. Give it another try with the whole
35964    # argument.
35965    path="$complete"
35966    arguments="EOL"
35967    new_path=`$CYGPATH -u "$path"`
35968    new_path=`$WHICH "$new_path" 2> /dev/null`
35969    # bat and cmd files are not always considered executable in cygwin causing which
35970    # to not find them
35971    if test "x$new_path" = x \
35972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35974      new_path=`$CYGPATH -u "$path"`
35975    fi
35976    if test "x$new_path" = x; then
35977      # It's still not found. Now this is an unrecoverable error.
35978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35979$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35980      has_space=`$ECHO "$complete" | $GREP " "`
35981      if test "x$has_space" != x; then
35982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35984      fi
35985      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35986    fi
35987  fi
35988
35989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35992  # "foo.exe" is OK but "foo" is an error.
35993  #
35994  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35995  # It is also a way to make sure we got the proper file name for the real test later on.
35996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35997  if test "x$test_shortpath" = x; then
35998    # Short path failed, file does not exist as specified.
35999    # Try adding .exe or .cmd
36000    if test -f "${new_path}.exe"; then
36001      input_to_shortpath="${new_path}.exe"
36002    elif test -f "${new_path}.cmd"; then
36003      input_to_shortpath="${new_path}.cmd"
36004    else
36005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36006$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36007      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36008$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36009      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36010    fi
36011  else
36012    input_to_shortpath="$new_path"
36013  fi
36014
36015  # Call helper function which possibly converts this using DOS-style short mode.
36016  # If so, the updated path is stored in $new_path.
36017  new_path="$input_to_shortpath"
36018
36019  input_path="$input_to_shortpath"
36020  # Check if we need to convert this using DOS-style short mode. If the path
36021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36022  # take no chances and rewrite it.
36023  # Note: m4 eats our [], so we need to use [ and ] instead.
36024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36025  if test "x$has_forbidden_chars" != x; then
36026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36030      # Going to short mode and back again did indeed matter. Since short mode is
36031      # case insensitive, let's make it lowercase to improve readability.
36032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36033      # Now convert it back to Unix-style (cygpath)
36034      input_path=`$CYGPATH -u "$shortmode_path"`
36035      new_path="$input_path"
36036    fi
36037  fi
36038
36039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36040  if test "x$test_cygdrive_prefix" = x; then
36041    # As a simple fix, exclude /usr/bin since it's not a real path.
36042    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36044      # a path prefixed by /cygdrive for fixpath to work.
36045      new_path="$CYGWIN_ROOT_PATH$input_path"
36046    fi
36047  fi
36048
36049  # remove trailing .exe if any
36050  new_path="${new_path/%.exe/}"
36051
36052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36053
36054  # First separate the path from the arguments. This will split at the first
36055  # space.
36056  complete="$CXXCPP"
36057  path="${complete%% *}"
36058  tmp="$complete EOL"
36059  arguments="${tmp#* }"
36060
36061  # Input might be given as Windows format, start by converting to
36062  # unix format.
36063  new_path="$path"
36064
36065  windows_path="$new_path"
36066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36067    unix_path=`$CYGPATH -u "$windows_path"`
36068    new_path="$unix_path"
36069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36071    new_path="$unix_path"
36072  fi
36073
36074
36075  # Now try to locate executable using which
36076  new_path=`$WHICH "$new_path" 2> /dev/null`
36077
36078  if test "x$new_path" = x; then
36079    # Oops. Which didn't find the executable.
36080    # The splitting of arguments from the executable at a space might have been incorrect,
36081    # since paths with space are more likely in Windows. Give it another try with the whole
36082    # argument.
36083    path="$complete"
36084    arguments="EOL"
36085    new_path="$path"
36086
36087  windows_path="$new_path"
36088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36089    unix_path=`$CYGPATH -u "$windows_path"`
36090    new_path="$unix_path"
36091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36093    new_path="$unix_path"
36094  fi
36095
36096
36097    new_path=`$WHICH "$new_path" 2> /dev/null`
36098    # bat and cmd files are not always considered executable in MSYS causing which
36099    # to not find them
36100    if test "x$new_path" = x \
36101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36103      new_path="$path"
36104
36105  windows_path="$new_path"
36106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36107    unix_path=`$CYGPATH -u "$windows_path"`
36108    new_path="$unix_path"
36109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36111    new_path="$unix_path"
36112  fi
36113
36114    fi
36115
36116    if test "x$new_path" = x; then
36117      # It's still not found. Now this is an unrecoverable error.
36118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36119$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36120      has_space=`$ECHO "$complete" | $GREP " "`
36121      if test "x$has_space" != x; then
36122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36124      fi
36125      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36126    fi
36127  fi
36128
36129  # Now new_path has a complete unix path to the binary
36130  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36131    # Keep paths in /bin as-is, but remove trailing .exe if any
36132    new_path="${new_path/%.exe/}"
36133    # Do not save /bin paths to all_fixpath_prefixes!
36134  else
36135    # Not in mixed or Windows style, start by that.
36136    new_path=`cmd //c echo $new_path`
36137
36138  input_path="$new_path"
36139  # Check if we need to convert this using DOS-style short mode. If the path
36140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36141  # take no chances and rewrite it.
36142  # Note: m4 eats our [], so we need to use [ and ] instead.
36143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36144  if test "x$has_forbidden_chars" != x; then
36145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36147  fi
36148
36149    # Output is in $new_path
36150
36151  windows_path="$new_path"
36152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36153    unix_path=`$CYGPATH -u "$windows_path"`
36154    new_path="$unix_path"
36155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36157    new_path="$unix_path"
36158  fi
36159
36160    # remove trailing .exe if any
36161    new_path="${new_path/%.exe/}"
36162
36163    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36164    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36165  fi
36166
36167    else
36168      # We're on a unix platform. Hooray! :)
36169      # First separate the path from the arguments. This will split at the first
36170      # space.
36171      complete="$CXXCPP"
36172      path="${complete%% *}"
36173      tmp="$complete EOL"
36174      arguments="${tmp#* }"
36175
36176      # Cannot rely on the command "which" here since it doesn't always work.
36177      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36178      if test -z "$is_absolute_path"; then
36179        # Path to executable is not absolute. Find it.
36180        IFS_save="$IFS"
36181        IFS=:
36182        for p in $PATH; do
36183          if test -f "$p/$path" && test -x "$p/$path"; then
36184            new_path="$p/$path"
36185            break
36186          fi
36187        done
36188        IFS="$IFS_save"
36189      else
36190        # This is an absolute path, we can use it without further modifications.
36191        new_path="$path"
36192      fi
36193
36194      if test "x$new_path" = x; then
36195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36196$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36197        has_space=`$ECHO "$complete" | $GREP " "`
36198        if test "x$has_space" != x; then
36199          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36200$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36201        fi
36202        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36203      fi
36204    fi
36205
36206    # Now join together the path and the arguments once again
36207    if test "x$arguments" != xEOL; then
36208      new_complete="$new_path ${arguments% *}"
36209    else
36210      new_complete="$new_path"
36211    fi
36212
36213    if test "x$complete" != "x$new_complete"; then
36214      CXXCPP="$new_complete"
36215      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36216$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36217    fi
36218  fi
36219
36220
36221  #
36222  # Setup the linker (LD)
36223  #
36224  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36225    # In the Microsoft toolchain we have a separate LD command "link".
36226    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36227    # a cygwin program for something completely different.
36228    # Extract the first word of "link", so it can be a program name with args.
36229set dummy link; ac_word=$2
36230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36231$as_echo_n "checking for $ac_word... " >&6; }
36232if ${ac_cv_prog_LD+:} false; then :
36233  $as_echo_n "(cached) " >&6
36234else
36235  if test -n "$LD"; then
36236  ac_cv_prog_LD="$LD" # Let the user override the test.
36237else
36238  ac_prog_rejected=no
36239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36240for as_dir in $PATH
36241do
36242  IFS=$as_save_IFS
36243  test -z "$as_dir" && as_dir=.
36244    for ac_exec_ext in '' $ac_executable_extensions; do
36245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36246    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36247       ac_prog_rejected=yes
36248       continue
36249     fi
36250    ac_cv_prog_LD="link"
36251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36252    break 2
36253  fi
36254done
36255  done
36256IFS=$as_save_IFS
36257
36258if test $ac_prog_rejected = yes; then
36259  # We found a bogon in the path, so make sure we never use it.
36260  set dummy $ac_cv_prog_LD
36261  shift
36262  if test $# != 0; then
36263    # We chose a different compiler from the bogus one.
36264    # However, it has the same basename, so the bogon will be chosen
36265    # first if we set LD to just the basename; use the full file name.
36266    shift
36267    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36268  fi
36269fi
36270fi
36271fi
36272LD=$ac_cv_prog_LD
36273if test -n "$LD"; then
36274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36275$as_echo "$LD" >&6; }
36276else
36277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36278$as_echo "no" >&6; }
36279fi
36280
36281
36282
36283  # Only process if variable expands to non-empty
36284
36285  if test "x$LD" != x; then
36286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36287
36288  # First separate the path from the arguments. This will split at the first
36289  # space.
36290  complete="$LD"
36291  path="${complete%% *}"
36292  tmp="$complete EOL"
36293  arguments="${tmp#* }"
36294
36295  # Input might be given as Windows format, start by converting to
36296  # unix format.
36297  new_path=`$CYGPATH -u "$path"`
36298
36299  # Now try to locate executable using which
36300  new_path=`$WHICH "$new_path" 2> /dev/null`
36301  # bat and cmd files are not always considered executable in cygwin causing which
36302  # to not find them
36303  if test "x$new_path" = x \
36304      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36305      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36306    new_path=`$CYGPATH -u "$path"`
36307  fi
36308  if test "x$new_path" = x; then
36309    # Oops. Which didn't find the executable.
36310    # The splitting of arguments from the executable at a space might have been incorrect,
36311    # since paths with space are more likely in Windows. Give it another try with the whole
36312    # argument.
36313    path="$complete"
36314    arguments="EOL"
36315    new_path=`$CYGPATH -u "$path"`
36316    new_path=`$WHICH "$new_path" 2> /dev/null`
36317    # bat and cmd files are not always considered executable in cygwin causing which
36318    # to not find them
36319    if test "x$new_path" = x \
36320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36322      new_path=`$CYGPATH -u "$path"`
36323    fi
36324    if test "x$new_path" = x; then
36325      # It's still not found. Now this is an unrecoverable error.
36326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36327$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36328      has_space=`$ECHO "$complete" | $GREP " "`
36329      if test "x$has_space" != x; then
36330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36332      fi
36333      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36334    fi
36335  fi
36336
36337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36340  # "foo.exe" is OK but "foo" is an error.
36341  #
36342  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36343  # It is also a way to make sure we got the proper file name for the real test later on.
36344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36345  if test "x$test_shortpath" = x; then
36346    # Short path failed, file does not exist as specified.
36347    # Try adding .exe or .cmd
36348    if test -f "${new_path}.exe"; then
36349      input_to_shortpath="${new_path}.exe"
36350    elif test -f "${new_path}.cmd"; then
36351      input_to_shortpath="${new_path}.cmd"
36352    else
36353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36354$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36357      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36358    fi
36359  else
36360    input_to_shortpath="$new_path"
36361  fi
36362
36363  # Call helper function which possibly converts this using DOS-style short mode.
36364  # If so, the updated path is stored in $new_path.
36365  new_path="$input_to_shortpath"
36366
36367  input_path="$input_to_shortpath"
36368  # Check if we need to convert this using DOS-style short mode. If the path
36369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36370  # take no chances and rewrite it.
36371  # Note: m4 eats our [], so we need to use [ and ] instead.
36372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36373  if test "x$has_forbidden_chars" != x; then
36374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36378      # Going to short mode and back again did indeed matter. Since short mode is
36379      # case insensitive, let's make it lowercase to improve readability.
36380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36381      # Now convert it back to Unix-style (cygpath)
36382      input_path=`$CYGPATH -u "$shortmode_path"`
36383      new_path="$input_path"
36384    fi
36385  fi
36386
36387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36388  if test "x$test_cygdrive_prefix" = x; then
36389    # As a simple fix, exclude /usr/bin since it's not a real path.
36390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36392      # a path prefixed by /cygdrive for fixpath to work.
36393      new_path="$CYGWIN_ROOT_PATH$input_path"
36394    fi
36395  fi
36396
36397  # remove trailing .exe if any
36398  new_path="${new_path/%.exe/}"
36399
36400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36401
36402  # First separate the path from the arguments. This will split at the first
36403  # space.
36404  complete="$LD"
36405  path="${complete%% *}"
36406  tmp="$complete EOL"
36407  arguments="${tmp#* }"
36408
36409  # Input might be given as Windows format, start by converting to
36410  # unix format.
36411  new_path="$path"
36412
36413  windows_path="$new_path"
36414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36415    unix_path=`$CYGPATH -u "$windows_path"`
36416    new_path="$unix_path"
36417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36419    new_path="$unix_path"
36420  fi
36421
36422
36423  # Now try to locate executable using which
36424  new_path=`$WHICH "$new_path" 2> /dev/null`
36425
36426  if test "x$new_path" = x; then
36427    # Oops. Which didn't find the executable.
36428    # The splitting of arguments from the executable at a space might have been incorrect,
36429    # since paths with space are more likely in Windows. Give it another try with the whole
36430    # argument.
36431    path="$complete"
36432    arguments="EOL"
36433    new_path="$path"
36434
36435  windows_path="$new_path"
36436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36437    unix_path=`$CYGPATH -u "$windows_path"`
36438    new_path="$unix_path"
36439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36441    new_path="$unix_path"
36442  fi
36443
36444
36445    new_path=`$WHICH "$new_path" 2> /dev/null`
36446    # bat and cmd files are not always considered executable in MSYS causing which
36447    # to not find them
36448    if test "x$new_path" = x \
36449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36451      new_path="$path"
36452
36453  windows_path="$new_path"
36454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36455    unix_path=`$CYGPATH -u "$windows_path"`
36456    new_path="$unix_path"
36457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36459    new_path="$unix_path"
36460  fi
36461
36462    fi
36463
36464    if test "x$new_path" = x; then
36465      # It's still not found. Now this is an unrecoverable error.
36466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36467$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36468      has_space=`$ECHO "$complete" | $GREP " "`
36469      if test "x$has_space" != x; then
36470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36472      fi
36473      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36474    fi
36475  fi
36476
36477  # Now new_path has a complete unix path to the binary
36478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36479    # Keep paths in /bin as-is, but remove trailing .exe if any
36480    new_path="${new_path/%.exe/}"
36481    # Do not save /bin paths to all_fixpath_prefixes!
36482  else
36483    # Not in mixed or Windows style, start by that.
36484    new_path=`cmd //c echo $new_path`
36485
36486  input_path="$new_path"
36487  # Check if we need to convert this using DOS-style short mode. If the path
36488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36489  # take no chances and rewrite it.
36490  # Note: m4 eats our [], so we need to use [ and ] instead.
36491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36492  if test "x$has_forbidden_chars" != x; then
36493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36495  fi
36496
36497    # Output is in $new_path
36498
36499  windows_path="$new_path"
36500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36501    unix_path=`$CYGPATH -u "$windows_path"`
36502    new_path="$unix_path"
36503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36505    new_path="$unix_path"
36506  fi
36507
36508    # remove trailing .exe if any
36509    new_path="${new_path/%.exe/}"
36510
36511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36513  fi
36514
36515    else
36516      # We're on a unix platform. Hooray! :)
36517      # First separate the path from the arguments. This will split at the first
36518      # space.
36519      complete="$LD"
36520      path="${complete%% *}"
36521      tmp="$complete EOL"
36522      arguments="${tmp#* }"
36523
36524      # Cannot rely on the command "which" here since it doesn't always work.
36525      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36526      if test -z "$is_absolute_path"; then
36527        # Path to executable is not absolute. Find it.
36528        IFS_save="$IFS"
36529        IFS=:
36530        for p in $PATH; do
36531          if test -f "$p/$path" && test -x "$p/$path"; then
36532            new_path="$p/$path"
36533            break
36534          fi
36535        done
36536        IFS="$IFS_save"
36537      else
36538        # This is an absolute path, we can use it without further modifications.
36539        new_path="$path"
36540      fi
36541
36542      if test "x$new_path" = x; then
36543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36544$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36545        has_space=`$ECHO "$complete" | $GREP " "`
36546        if test "x$has_space" != x; then
36547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36549        fi
36550        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36551      fi
36552    fi
36553
36554    # Now join together the path and the arguments once again
36555    if test "x$arguments" != xEOL; then
36556      new_complete="$new_path ${arguments% *}"
36557    else
36558      new_complete="$new_path"
36559    fi
36560
36561    if test "x$complete" != "x$new_complete"; then
36562      LD="$new_complete"
36563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36564$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36565    fi
36566  fi
36567
36568    # Verify that we indeed succeeded with this trick.
36569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36570$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36571    "$LD" --version > /dev/null
36572    if test $? -eq 0 ; then
36573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36574$as_echo "no" >&6; }
36575      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36576    else
36577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36578$as_echo "yes" >&6; }
36579    fi
36580    LDCXX="$LD"
36581  else
36582    # All other toolchains use the compiler to link.
36583    LD="$CC"
36584    LDCXX="$CXX"
36585  fi
36586
36587  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36588
36589
36590  #
36591  # Setup the assembler (AS)
36592  #
36593  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36594    # FIXME: should this really be solaris, or solstudio?
36595
36596
36597  # Publish this variable in the help.
36598
36599
36600  if [ -z "${AS+x}" ]; then
36601    # The variable is not set by user, try to locate tool using the code snippet
36602    for ac_prog in as
36603do
36604  # Extract the first word of "$ac_prog", so it can be a program name with args.
36605set dummy $ac_prog; ac_word=$2
36606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36607$as_echo_n "checking for $ac_word... " >&6; }
36608if ${ac_cv_path_AS+:} false; then :
36609  $as_echo_n "(cached) " >&6
36610else
36611  case $AS in
36612  [\\/]* | ?:[\\/]*)
36613  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36614  ;;
36615  *)
36616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36617for as_dir in $PATH
36618do
36619  IFS=$as_save_IFS
36620  test -z "$as_dir" && as_dir=.
36621    for ac_exec_ext in '' $ac_executable_extensions; do
36622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36623    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36625    break 2
36626  fi
36627done
36628  done
36629IFS=$as_save_IFS
36630
36631  ;;
36632esac
36633fi
36634AS=$ac_cv_path_AS
36635if test -n "$AS"; then
36636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36637$as_echo "$AS" >&6; }
36638else
36639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36640$as_echo "no" >&6; }
36641fi
36642
36643
36644  test -n "$AS" && break
36645done
36646
36647  else
36648    # The variable is set, but is it from the command line or the environment?
36649
36650    # Try to remove the string !AS! from our list.
36651    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36652    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36653      # If it failed, the variable was not from the command line. Ignore it,
36654      # but warn the user (except for BASH, which is always set by the calling BASH).
36655      if test "xAS" != xBASH; then
36656        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36657$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36658      fi
36659      # Try to locate tool using the code snippet
36660      for ac_prog in as
36661do
36662  # Extract the first word of "$ac_prog", so it can be a program name with args.
36663set dummy $ac_prog; ac_word=$2
36664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36665$as_echo_n "checking for $ac_word... " >&6; }
36666if ${ac_cv_path_AS+:} false; then :
36667  $as_echo_n "(cached) " >&6
36668else
36669  case $AS in
36670  [\\/]* | ?:[\\/]*)
36671  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36672  ;;
36673  *)
36674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36675for as_dir in $PATH
36676do
36677  IFS=$as_save_IFS
36678  test -z "$as_dir" && as_dir=.
36679    for ac_exec_ext in '' $ac_executable_extensions; do
36680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36681    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36683    break 2
36684  fi
36685done
36686  done
36687IFS=$as_save_IFS
36688
36689  ;;
36690esac
36691fi
36692AS=$ac_cv_path_AS
36693if test -n "$AS"; then
36694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36695$as_echo "$AS" >&6; }
36696else
36697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36698$as_echo "no" >&6; }
36699fi
36700
36701
36702  test -n "$AS" && break
36703done
36704
36705    else
36706      # If it succeeded, then it was overridden by the user. We will use it
36707      # for the tool.
36708
36709      # First remove it from the list of overridden variables, so we can test
36710      # for unknown variables in the end.
36711      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36712
36713      # Check if we try to supply an empty value
36714      if test "x$AS" = x; then
36715        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36716$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36718$as_echo_n "checking for AS... " >&6; }
36719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36720$as_echo "disabled" >&6; }
36721      else
36722        # Check if the provided tool contains a complete path.
36723        tool_specified="$AS"
36724        tool_basename="${tool_specified##*/}"
36725        if test "x$tool_basename" = "x$tool_specified"; then
36726          # A command without a complete path is provided, search $PATH.
36727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36728$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36729          # Extract the first word of "$tool_basename", so it can be a program name with args.
36730set dummy $tool_basename; ac_word=$2
36731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36732$as_echo_n "checking for $ac_word... " >&6; }
36733if ${ac_cv_path_AS+:} false; then :
36734  $as_echo_n "(cached) " >&6
36735else
36736  case $AS in
36737  [\\/]* | ?:[\\/]*)
36738  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36739  ;;
36740  *)
36741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36742for as_dir in $PATH
36743do
36744  IFS=$as_save_IFS
36745  test -z "$as_dir" && as_dir=.
36746    for ac_exec_ext in '' $ac_executable_extensions; do
36747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36748    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36750    break 2
36751  fi
36752done
36753  done
36754IFS=$as_save_IFS
36755
36756  ;;
36757esac
36758fi
36759AS=$ac_cv_path_AS
36760if test -n "$AS"; then
36761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36762$as_echo "$AS" >&6; }
36763else
36764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36765$as_echo "no" >&6; }
36766fi
36767
36768
36769          if test "x$AS" = x; then
36770            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36771          fi
36772        else
36773          # Otherwise we believe it is a complete path. Use it as it is.
36774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36775$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36776          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36777$as_echo_n "checking for AS... " >&6; }
36778          if test ! -x "$tool_specified"; then
36779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36780$as_echo "not found" >&6; }
36781            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36782          fi
36783          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36784$as_echo "$tool_specified" >&6; }
36785        fi
36786      fi
36787    fi
36788
36789  fi
36790
36791
36792
36793  # Only process if variable expands to non-empty
36794
36795  if test "x$AS" != x; then
36796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36797
36798  # First separate the path from the arguments. This will split at the first
36799  # space.
36800  complete="$AS"
36801  path="${complete%% *}"
36802  tmp="$complete EOL"
36803  arguments="${tmp#* }"
36804
36805  # Input might be given as Windows format, start by converting to
36806  # unix format.
36807  new_path=`$CYGPATH -u "$path"`
36808
36809  # Now try to locate executable using which
36810  new_path=`$WHICH "$new_path" 2> /dev/null`
36811  # bat and cmd files are not always considered executable in cygwin causing which
36812  # to not find them
36813  if test "x$new_path" = x \
36814      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36815      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36816    new_path=`$CYGPATH -u "$path"`
36817  fi
36818  if test "x$new_path" = x; then
36819    # Oops. Which didn't find the executable.
36820    # The splitting of arguments from the executable at a space might have been incorrect,
36821    # since paths with space are more likely in Windows. Give it another try with the whole
36822    # argument.
36823    path="$complete"
36824    arguments="EOL"
36825    new_path=`$CYGPATH -u "$path"`
36826    new_path=`$WHICH "$new_path" 2> /dev/null`
36827    # bat and cmd files are not always considered executable in cygwin causing which
36828    # to not find them
36829    if test "x$new_path" = x \
36830        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36831        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36832      new_path=`$CYGPATH -u "$path"`
36833    fi
36834    if test "x$new_path" = x; then
36835      # It's still not found. Now this is an unrecoverable error.
36836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36837$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36838      has_space=`$ECHO "$complete" | $GREP " "`
36839      if test "x$has_space" != x; then
36840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36842      fi
36843      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36844    fi
36845  fi
36846
36847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36850  # "foo.exe" is OK but "foo" is an error.
36851  #
36852  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36853  # It is also a way to make sure we got the proper file name for the real test later on.
36854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36855  if test "x$test_shortpath" = x; then
36856    # Short path failed, file does not exist as specified.
36857    # Try adding .exe or .cmd
36858    if test -f "${new_path}.exe"; then
36859      input_to_shortpath="${new_path}.exe"
36860    elif test -f "${new_path}.cmd"; then
36861      input_to_shortpath="${new_path}.cmd"
36862    else
36863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36864$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36865      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36866$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36867      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36868    fi
36869  else
36870    input_to_shortpath="$new_path"
36871  fi
36872
36873  # Call helper function which possibly converts this using DOS-style short mode.
36874  # If so, the updated path is stored in $new_path.
36875  new_path="$input_to_shortpath"
36876
36877  input_path="$input_to_shortpath"
36878  # Check if we need to convert this using DOS-style short mode. If the path
36879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36880  # take no chances and rewrite it.
36881  # Note: m4 eats our [], so we need to use [ and ] instead.
36882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36883  if test "x$has_forbidden_chars" != x; then
36884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36888      # Going to short mode and back again did indeed matter. Since short mode is
36889      # case insensitive, let's make it lowercase to improve readability.
36890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36891      # Now convert it back to Unix-style (cygpath)
36892      input_path=`$CYGPATH -u "$shortmode_path"`
36893      new_path="$input_path"
36894    fi
36895  fi
36896
36897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36898  if test "x$test_cygdrive_prefix" = x; then
36899    # As a simple fix, exclude /usr/bin since it's not a real path.
36900    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36902      # a path prefixed by /cygdrive for fixpath to work.
36903      new_path="$CYGWIN_ROOT_PATH$input_path"
36904    fi
36905  fi
36906
36907  # remove trailing .exe if any
36908  new_path="${new_path/%.exe/}"
36909
36910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36911
36912  # First separate the path from the arguments. This will split at the first
36913  # space.
36914  complete="$AS"
36915  path="${complete%% *}"
36916  tmp="$complete EOL"
36917  arguments="${tmp#* }"
36918
36919  # Input might be given as Windows format, start by converting to
36920  # unix format.
36921  new_path="$path"
36922
36923  windows_path="$new_path"
36924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36925    unix_path=`$CYGPATH -u "$windows_path"`
36926    new_path="$unix_path"
36927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36929    new_path="$unix_path"
36930  fi
36931
36932
36933  # Now try to locate executable using which
36934  new_path=`$WHICH "$new_path" 2> /dev/null`
36935
36936  if test "x$new_path" = x; then
36937    # Oops. Which didn't find the executable.
36938    # The splitting of arguments from the executable at a space might have been incorrect,
36939    # since paths with space are more likely in Windows. Give it another try with the whole
36940    # argument.
36941    path="$complete"
36942    arguments="EOL"
36943    new_path="$path"
36944
36945  windows_path="$new_path"
36946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36947    unix_path=`$CYGPATH -u "$windows_path"`
36948    new_path="$unix_path"
36949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36951    new_path="$unix_path"
36952  fi
36953
36954
36955    new_path=`$WHICH "$new_path" 2> /dev/null`
36956    # bat and cmd files are not always considered executable in MSYS causing which
36957    # to not find them
36958    if test "x$new_path" = x \
36959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36961      new_path="$path"
36962
36963  windows_path="$new_path"
36964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36965    unix_path=`$CYGPATH -u "$windows_path"`
36966    new_path="$unix_path"
36967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36969    new_path="$unix_path"
36970  fi
36971
36972    fi
36973
36974    if test "x$new_path" = x; then
36975      # It's still not found. Now this is an unrecoverable error.
36976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36977$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36978      has_space=`$ECHO "$complete" | $GREP " "`
36979      if test "x$has_space" != x; then
36980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36982      fi
36983      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36984    fi
36985  fi
36986
36987  # Now new_path has a complete unix path to the binary
36988  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36989    # Keep paths in /bin as-is, but remove trailing .exe if any
36990    new_path="${new_path/%.exe/}"
36991    # Do not save /bin paths to all_fixpath_prefixes!
36992  else
36993    # Not in mixed or Windows style, start by that.
36994    new_path=`cmd //c echo $new_path`
36995
36996  input_path="$new_path"
36997  # Check if we need to convert this using DOS-style short mode. If the path
36998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36999  # take no chances and rewrite it.
37000  # Note: m4 eats our [], so we need to use [ and ] instead.
37001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37002  if test "x$has_forbidden_chars" != x; then
37003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37005  fi
37006
37007    # Output is in $new_path
37008
37009  windows_path="$new_path"
37010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37011    unix_path=`$CYGPATH -u "$windows_path"`
37012    new_path="$unix_path"
37013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37015    new_path="$unix_path"
37016  fi
37017
37018    # remove trailing .exe if any
37019    new_path="${new_path/%.exe/}"
37020
37021    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37022    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37023  fi
37024
37025    else
37026      # We're on a unix platform. Hooray! :)
37027      # First separate the path from the arguments. This will split at the first
37028      # space.
37029      complete="$AS"
37030      path="${complete%% *}"
37031      tmp="$complete EOL"
37032      arguments="${tmp#* }"
37033
37034      # Cannot rely on the command "which" here since it doesn't always work.
37035      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37036      if test -z "$is_absolute_path"; then
37037        # Path to executable is not absolute. Find it.
37038        IFS_save="$IFS"
37039        IFS=:
37040        for p in $PATH; do
37041          if test -f "$p/$path" && test -x "$p/$path"; then
37042            new_path="$p/$path"
37043            break
37044          fi
37045        done
37046        IFS="$IFS_save"
37047      else
37048        # This is an absolute path, we can use it without further modifications.
37049        new_path="$path"
37050      fi
37051
37052      if test "x$new_path" = x; then
37053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37054$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37055        has_space=`$ECHO "$complete" | $GREP " "`
37056        if test "x$has_space" != x; then
37057          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37058$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37059        fi
37060        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37061      fi
37062    fi
37063
37064    # Now join together the path and the arguments once again
37065    if test "x$arguments" != xEOL; then
37066      new_complete="$new_path ${arguments% *}"
37067    else
37068      new_complete="$new_path"
37069    fi
37070
37071    if test "x$complete" != "x$new_complete"; then
37072      AS="$new_complete"
37073      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37074$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37075    fi
37076  fi
37077
37078  else
37079    # FIXME: is this correct for microsoft?
37080    AS="$CC -c"
37081  fi
37082
37083
37084  #
37085  # Setup the archiver (AR)
37086  #
37087  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37088    # The corresponding ar tool is lib.exe (used to create static libraries)
37089    # Extract the first word of "lib", so it can be a program name with args.
37090set dummy lib; ac_word=$2
37091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37092$as_echo_n "checking for $ac_word... " >&6; }
37093if ${ac_cv_prog_AR+:} false; then :
37094  $as_echo_n "(cached) " >&6
37095else
37096  if test -n "$AR"; then
37097  ac_cv_prog_AR="$AR" # Let the user override the test.
37098else
37099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37100for as_dir in $PATH
37101do
37102  IFS=$as_save_IFS
37103  test -z "$as_dir" && as_dir=.
37104    for ac_exec_ext in '' $ac_executable_extensions; do
37105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37106    ac_cv_prog_AR="lib"
37107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37108    break 2
37109  fi
37110done
37111  done
37112IFS=$as_save_IFS
37113
37114fi
37115fi
37116AR=$ac_cv_prog_AR
37117if test -n "$AR"; then
37118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37119$as_echo "$AR" >&6; }
37120else
37121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37122$as_echo "no" >&6; }
37123fi
37124
37125
37126  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37127
37128
37129  # Publish this variable in the help.
37130
37131
37132  if [ -z "${AR+x}" ]; then
37133    # The variable is not set by user, try to locate tool using the code snippet
37134    if test -n "$ac_tool_prefix"; then
37135  for ac_prog in ar gcc-ar
37136  do
37137    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37138set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37140$as_echo_n "checking for $ac_word... " >&6; }
37141if ${ac_cv_prog_AR+:} false; then :
37142  $as_echo_n "(cached) " >&6
37143else
37144  if test -n "$AR"; then
37145  ac_cv_prog_AR="$AR" # Let the user override the test.
37146else
37147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37148for as_dir in $PATH
37149do
37150  IFS=$as_save_IFS
37151  test -z "$as_dir" && as_dir=.
37152    for ac_exec_ext in '' $ac_executable_extensions; do
37153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37154    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37156    break 2
37157  fi
37158done
37159  done
37160IFS=$as_save_IFS
37161
37162fi
37163fi
37164AR=$ac_cv_prog_AR
37165if test -n "$AR"; then
37166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37167$as_echo "$AR" >&6; }
37168else
37169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37170$as_echo "no" >&6; }
37171fi
37172
37173
37174    test -n "$AR" && break
37175  done
37176fi
37177if test -z "$AR"; then
37178  ac_ct_AR=$AR
37179  for ac_prog in ar gcc-ar
37180do
37181  # Extract the first word of "$ac_prog", so it can be a program name with args.
37182set dummy $ac_prog; ac_word=$2
37183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37184$as_echo_n "checking for $ac_word... " >&6; }
37185if ${ac_cv_prog_ac_ct_AR+:} false; then :
37186  $as_echo_n "(cached) " >&6
37187else
37188  if test -n "$ac_ct_AR"; then
37189  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37190else
37191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37192for as_dir in $PATH
37193do
37194  IFS=$as_save_IFS
37195  test -z "$as_dir" && as_dir=.
37196    for ac_exec_ext in '' $ac_executable_extensions; do
37197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37198    ac_cv_prog_ac_ct_AR="$ac_prog"
37199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37200    break 2
37201  fi
37202done
37203  done
37204IFS=$as_save_IFS
37205
37206fi
37207fi
37208ac_ct_AR=$ac_cv_prog_ac_ct_AR
37209if test -n "$ac_ct_AR"; then
37210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37211$as_echo "$ac_ct_AR" >&6; }
37212else
37213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37214$as_echo "no" >&6; }
37215fi
37216
37217
37218  test -n "$ac_ct_AR" && break
37219done
37220
37221  if test "x$ac_ct_AR" = x; then
37222    AR=""
37223  else
37224    case $cross_compiling:$ac_tool_warned in
37225yes:)
37226{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37227$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37228ac_tool_warned=yes ;;
37229esac
37230    AR=$ac_ct_AR
37231  fi
37232fi
37233
37234  else
37235    # The variable is set, but is it from the command line or the environment?
37236
37237    # Try to remove the string !AR! from our list.
37238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37240      # If it failed, the variable was not from the command line. Ignore it,
37241      # but warn the user (except for BASH, which is always set by the calling BASH).
37242      if test "xAR" != xBASH; then
37243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37244$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37245      fi
37246      # Try to locate tool using the code snippet
37247      if test -n "$ac_tool_prefix"; then
37248  for ac_prog in ar gcc-ar
37249  do
37250    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37251set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37253$as_echo_n "checking for $ac_word... " >&6; }
37254if ${ac_cv_prog_AR+:} false; then :
37255  $as_echo_n "(cached) " >&6
37256else
37257  if test -n "$AR"; then
37258  ac_cv_prog_AR="$AR" # Let the user override the test.
37259else
37260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37261for as_dir in $PATH
37262do
37263  IFS=$as_save_IFS
37264  test -z "$as_dir" && as_dir=.
37265    for ac_exec_ext in '' $ac_executable_extensions; do
37266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37267    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37269    break 2
37270  fi
37271done
37272  done
37273IFS=$as_save_IFS
37274
37275fi
37276fi
37277AR=$ac_cv_prog_AR
37278if test -n "$AR"; then
37279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37280$as_echo "$AR" >&6; }
37281else
37282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37283$as_echo "no" >&6; }
37284fi
37285
37286
37287    test -n "$AR" && break
37288  done
37289fi
37290if test -z "$AR"; then
37291  ac_ct_AR=$AR
37292  for ac_prog in ar gcc-ar
37293do
37294  # Extract the first word of "$ac_prog", so it can be a program name with args.
37295set dummy $ac_prog; ac_word=$2
37296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37297$as_echo_n "checking for $ac_word... " >&6; }
37298if ${ac_cv_prog_ac_ct_AR+:} false; then :
37299  $as_echo_n "(cached) " >&6
37300else
37301  if test -n "$ac_ct_AR"; then
37302  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37303else
37304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37305for as_dir in $PATH
37306do
37307  IFS=$as_save_IFS
37308  test -z "$as_dir" && as_dir=.
37309    for ac_exec_ext in '' $ac_executable_extensions; do
37310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37311    ac_cv_prog_ac_ct_AR="$ac_prog"
37312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37313    break 2
37314  fi
37315done
37316  done
37317IFS=$as_save_IFS
37318
37319fi
37320fi
37321ac_ct_AR=$ac_cv_prog_ac_ct_AR
37322if test -n "$ac_ct_AR"; then
37323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37324$as_echo "$ac_ct_AR" >&6; }
37325else
37326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37327$as_echo "no" >&6; }
37328fi
37329
37330
37331  test -n "$ac_ct_AR" && break
37332done
37333
37334  if test "x$ac_ct_AR" = x; then
37335    AR=""
37336  else
37337    case $cross_compiling:$ac_tool_warned in
37338yes:)
37339{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37340$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37341ac_tool_warned=yes ;;
37342esac
37343    AR=$ac_ct_AR
37344  fi
37345fi
37346
37347    else
37348      # If it succeeded, then it was overridden by the user. We will use it
37349      # for the tool.
37350
37351      # First remove it from the list of overridden variables, so we can test
37352      # for unknown variables in the end.
37353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37354
37355      # Check if we try to supply an empty value
37356      if test "x$AR" = x; then
37357        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37358$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37360$as_echo_n "checking for AR... " >&6; }
37361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37362$as_echo "disabled" >&6; }
37363      else
37364        # Check if the provided tool contains a complete path.
37365        tool_specified="$AR"
37366        tool_basename="${tool_specified##*/}"
37367        if test "x$tool_basename" = "x$tool_specified"; then
37368          # A command without a complete path is provided, search $PATH.
37369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37370$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37371          # Extract the first word of "$tool_basename", so it can be a program name with args.
37372set dummy $tool_basename; ac_word=$2
37373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37374$as_echo_n "checking for $ac_word... " >&6; }
37375if ${ac_cv_path_AR+:} false; then :
37376  $as_echo_n "(cached) " >&6
37377else
37378  case $AR in
37379  [\\/]* | ?:[\\/]*)
37380  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37381  ;;
37382  *)
37383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37384for as_dir in $PATH
37385do
37386  IFS=$as_save_IFS
37387  test -z "$as_dir" && as_dir=.
37388    for ac_exec_ext in '' $ac_executable_extensions; do
37389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37390    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37392    break 2
37393  fi
37394done
37395  done
37396IFS=$as_save_IFS
37397
37398  ;;
37399esac
37400fi
37401AR=$ac_cv_path_AR
37402if test -n "$AR"; then
37403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37404$as_echo "$AR" >&6; }
37405else
37406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37407$as_echo "no" >&6; }
37408fi
37409
37410
37411          if test "x$AR" = x; then
37412            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37413          fi
37414        else
37415          # Otherwise we believe it is a complete path. Use it as it is.
37416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37417$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37418          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37419$as_echo_n "checking for AR... " >&6; }
37420          if test ! -x "$tool_specified"; then
37421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37422$as_echo "not found" >&6; }
37423            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37424          fi
37425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37426$as_echo "$tool_specified" >&6; }
37427        fi
37428      fi
37429    fi
37430
37431  fi
37432
37433
37434  else
37435
37436
37437  # Publish this variable in the help.
37438
37439
37440  if [ -z "${AR+x}" ]; then
37441    # The variable is not set by user, try to locate tool using the code snippet
37442    if test -n "$ac_tool_prefix"; then
37443  for ac_prog in ar
37444  do
37445    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37446set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37448$as_echo_n "checking for $ac_word... " >&6; }
37449if ${ac_cv_prog_AR+:} false; then :
37450  $as_echo_n "(cached) " >&6
37451else
37452  if test -n "$AR"; then
37453  ac_cv_prog_AR="$AR" # Let the user override the test.
37454else
37455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37456for as_dir in $PATH
37457do
37458  IFS=$as_save_IFS
37459  test -z "$as_dir" && as_dir=.
37460    for ac_exec_ext in '' $ac_executable_extensions; do
37461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37462    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37464    break 2
37465  fi
37466done
37467  done
37468IFS=$as_save_IFS
37469
37470fi
37471fi
37472AR=$ac_cv_prog_AR
37473if test -n "$AR"; then
37474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37475$as_echo "$AR" >&6; }
37476else
37477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37478$as_echo "no" >&6; }
37479fi
37480
37481
37482    test -n "$AR" && break
37483  done
37484fi
37485if test -z "$AR"; then
37486  ac_ct_AR=$AR
37487  for ac_prog in ar
37488do
37489  # Extract the first word of "$ac_prog", so it can be a program name with args.
37490set dummy $ac_prog; ac_word=$2
37491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37492$as_echo_n "checking for $ac_word... " >&6; }
37493if ${ac_cv_prog_ac_ct_AR+:} false; then :
37494  $as_echo_n "(cached) " >&6
37495else
37496  if test -n "$ac_ct_AR"; then
37497  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37498else
37499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37500for as_dir in $PATH
37501do
37502  IFS=$as_save_IFS
37503  test -z "$as_dir" && as_dir=.
37504    for ac_exec_ext in '' $ac_executable_extensions; do
37505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37506    ac_cv_prog_ac_ct_AR="$ac_prog"
37507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37508    break 2
37509  fi
37510done
37511  done
37512IFS=$as_save_IFS
37513
37514fi
37515fi
37516ac_ct_AR=$ac_cv_prog_ac_ct_AR
37517if test -n "$ac_ct_AR"; then
37518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37519$as_echo "$ac_ct_AR" >&6; }
37520else
37521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37522$as_echo "no" >&6; }
37523fi
37524
37525
37526  test -n "$ac_ct_AR" && break
37527done
37528
37529  if test "x$ac_ct_AR" = x; then
37530    AR=""
37531  else
37532    case $cross_compiling:$ac_tool_warned in
37533yes:)
37534{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37535$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37536ac_tool_warned=yes ;;
37537esac
37538    AR=$ac_ct_AR
37539  fi
37540fi
37541
37542  else
37543    # The variable is set, but is it from the command line or the environment?
37544
37545    # Try to remove the string !AR! from our list.
37546    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37547    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37548      # If it failed, the variable was not from the command line. Ignore it,
37549      # but warn the user (except for BASH, which is always set by the calling BASH).
37550      if test "xAR" != xBASH; then
37551        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37552$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37553      fi
37554      # Try to locate tool using the code snippet
37555      if test -n "$ac_tool_prefix"; then
37556  for ac_prog in ar
37557  do
37558    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37559set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37561$as_echo_n "checking for $ac_word... " >&6; }
37562if ${ac_cv_prog_AR+:} false; then :
37563  $as_echo_n "(cached) " >&6
37564else
37565  if test -n "$AR"; then
37566  ac_cv_prog_AR="$AR" # Let the user override the test.
37567else
37568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37569for as_dir in $PATH
37570do
37571  IFS=$as_save_IFS
37572  test -z "$as_dir" && as_dir=.
37573    for ac_exec_ext in '' $ac_executable_extensions; do
37574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37575    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37577    break 2
37578  fi
37579done
37580  done
37581IFS=$as_save_IFS
37582
37583fi
37584fi
37585AR=$ac_cv_prog_AR
37586if test -n "$AR"; then
37587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37588$as_echo "$AR" >&6; }
37589else
37590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37591$as_echo "no" >&6; }
37592fi
37593
37594
37595    test -n "$AR" && break
37596  done
37597fi
37598if test -z "$AR"; then
37599  ac_ct_AR=$AR
37600  for ac_prog in ar
37601do
37602  # Extract the first word of "$ac_prog", so it can be a program name with args.
37603set dummy $ac_prog; ac_word=$2
37604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37605$as_echo_n "checking for $ac_word... " >&6; }
37606if ${ac_cv_prog_ac_ct_AR+:} false; then :
37607  $as_echo_n "(cached) " >&6
37608else
37609  if test -n "$ac_ct_AR"; then
37610  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37611else
37612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37613for as_dir in $PATH
37614do
37615  IFS=$as_save_IFS
37616  test -z "$as_dir" && as_dir=.
37617    for ac_exec_ext in '' $ac_executable_extensions; do
37618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37619    ac_cv_prog_ac_ct_AR="$ac_prog"
37620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37621    break 2
37622  fi
37623done
37624  done
37625IFS=$as_save_IFS
37626
37627fi
37628fi
37629ac_ct_AR=$ac_cv_prog_ac_ct_AR
37630if test -n "$ac_ct_AR"; then
37631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37632$as_echo "$ac_ct_AR" >&6; }
37633else
37634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37635$as_echo "no" >&6; }
37636fi
37637
37638
37639  test -n "$ac_ct_AR" && break
37640done
37641
37642  if test "x$ac_ct_AR" = x; then
37643    AR=""
37644  else
37645    case $cross_compiling:$ac_tool_warned in
37646yes:)
37647{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37648$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37649ac_tool_warned=yes ;;
37650esac
37651    AR=$ac_ct_AR
37652  fi
37653fi
37654
37655    else
37656      # If it succeeded, then it was overridden by the user. We will use it
37657      # for the tool.
37658
37659      # First remove it from the list of overridden variables, so we can test
37660      # for unknown variables in the end.
37661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37662
37663      # Check if we try to supply an empty value
37664      if test "x$AR" = x; then
37665        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37666$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37668$as_echo_n "checking for AR... " >&6; }
37669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37670$as_echo "disabled" >&6; }
37671      else
37672        # Check if the provided tool contains a complete path.
37673        tool_specified="$AR"
37674        tool_basename="${tool_specified##*/}"
37675        if test "x$tool_basename" = "x$tool_specified"; then
37676          # A command without a complete path is provided, search $PATH.
37677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37678$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37679          # Extract the first word of "$tool_basename", so it can be a program name with args.
37680set dummy $tool_basename; ac_word=$2
37681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37682$as_echo_n "checking for $ac_word... " >&6; }
37683if ${ac_cv_path_AR+:} false; then :
37684  $as_echo_n "(cached) " >&6
37685else
37686  case $AR in
37687  [\\/]* | ?:[\\/]*)
37688  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37689  ;;
37690  *)
37691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37692for as_dir in $PATH
37693do
37694  IFS=$as_save_IFS
37695  test -z "$as_dir" && as_dir=.
37696    for ac_exec_ext in '' $ac_executable_extensions; do
37697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37698    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37700    break 2
37701  fi
37702done
37703  done
37704IFS=$as_save_IFS
37705
37706  ;;
37707esac
37708fi
37709AR=$ac_cv_path_AR
37710if test -n "$AR"; then
37711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37712$as_echo "$AR" >&6; }
37713else
37714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37715$as_echo "no" >&6; }
37716fi
37717
37718
37719          if test "x$AR" = x; then
37720            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37721          fi
37722        else
37723          # Otherwise we believe it is a complete path. Use it as it is.
37724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37725$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37726          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37727$as_echo_n "checking for AR... " >&6; }
37728          if test ! -x "$tool_specified"; then
37729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37730$as_echo "not found" >&6; }
37731            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37732          fi
37733          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37734$as_echo "$tool_specified" >&6; }
37735        fi
37736      fi
37737    fi
37738
37739  fi
37740
37741
37742  fi
37743
37744  # Only process if variable expands to non-empty
37745
37746  if test "x$AR" != x; then
37747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37748
37749  # First separate the path from the arguments. This will split at the first
37750  # space.
37751  complete="$AR"
37752  path="${complete%% *}"
37753  tmp="$complete EOL"
37754  arguments="${tmp#* }"
37755
37756  # Input might be given as Windows format, start by converting to
37757  # unix format.
37758  new_path=`$CYGPATH -u "$path"`
37759
37760  # Now try to locate executable using which
37761  new_path=`$WHICH "$new_path" 2> /dev/null`
37762  # bat and cmd files are not always considered executable in cygwin causing which
37763  # to not find them
37764  if test "x$new_path" = x \
37765      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37766      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37767    new_path=`$CYGPATH -u "$path"`
37768  fi
37769  if test "x$new_path" = x; then
37770    # Oops. Which didn't find the executable.
37771    # The splitting of arguments from the executable at a space might have been incorrect,
37772    # since paths with space are more likely in Windows. Give it another try with the whole
37773    # argument.
37774    path="$complete"
37775    arguments="EOL"
37776    new_path=`$CYGPATH -u "$path"`
37777    new_path=`$WHICH "$new_path" 2> /dev/null`
37778    # bat and cmd files are not always considered executable in cygwin causing which
37779    # to not find them
37780    if test "x$new_path" = x \
37781        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37782        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37783      new_path=`$CYGPATH -u "$path"`
37784    fi
37785    if test "x$new_path" = x; then
37786      # It's still not found. Now this is an unrecoverable error.
37787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37788$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37789      has_space=`$ECHO "$complete" | $GREP " "`
37790      if test "x$has_space" != x; then
37791        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37792$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37793      fi
37794      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37795    fi
37796  fi
37797
37798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37801  # "foo.exe" is OK but "foo" is an error.
37802  #
37803  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37804  # It is also a way to make sure we got the proper file name for the real test later on.
37805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37806  if test "x$test_shortpath" = x; then
37807    # Short path failed, file does not exist as specified.
37808    # Try adding .exe or .cmd
37809    if test -f "${new_path}.exe"; then
37810      input_to_shortpath="${new_path}.exe"
37811    elif test -f "${new_path}.cmd"; then
37812      input_to_shortpath="${new_path}.cmd"
37813    else
37814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37815$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37816      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37817$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37818      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37819    fi
37820  else
37821    input_to_shortpath="$new_path"
37822  fi
37823
37824  # Call helper function which possibly converts this using DOS-style short mode.
37825  # If so, the updated path is stored in $new_path.
37826  new_path="$input_to_shortpath"
37827
37828  input_path="$input_to_shortpath"
37829  # Check if we need to convert this using DOS-style short mode. If the path
37830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37831  # take no chances and rewrite it.
37832  # Note: m4 eats our [], so we need to use [ and ] instead.
37833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37834  if test "x$has_forbidden_chars" != x; then
37835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37839      # Going to short mode and back again did indeed matter. Since short mode is
37840      # case insensitive, let's make it lowercase to improve readability.
37841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37842      # Now convert it back to Unix-style (cygpath)
37843      input_path=`$CYGPATH -u "$shortmode_path"`
37844      new_path="$input_path"
37845    fi
37846  fi
37847
37848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37849  if test "x$test_cygdrive_prefix" = x; then
37850    # As a simple fix, exclude /usr/bin since it's not a real path.
37851    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37853      # a path prefixed by /cygdrive for fixpath to work.
37854      new_path="$CYGWIN_ROOT_PATH$input_path"
37855    fi
37856  fi
37857
37858  # remove trailing .exe if any
37859  new_path="${new_path/%.exe/}"
37860
37861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37862
37863  # First separate the path from the arguments. This will split at the first
37864  # space.
37865  complete="$AR"
37866  path="${complete%% *}"
37867  tmp="$complete EOL"
37868  arguments="${tmp#* }"
37869
37870  # Input might be given as Windows format, start by converting to
37871  # unix format.
37872  new_path="$path"
37873
37874  windows_path="$new_path"
37875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37876    unix_path=`$CYGPATH -u "$windows_path"`
37877    new_path="$unix_path"
37878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37880    new_path="$unix_path"
37881  fi
37882
37883
37884  # Now try to locate executable using which
37885  new_path=`$WHICH "$new_path" 2> /dev/null`
37886
37887  if test "x$new_path" = x; then
37888    # Oops. Which didn't find the executable.
37889    # The splitting of arguments from the executable at a space might have been incorrect,
37890    # since paths with space are more likely in Windows. Give it another try with the whole
37891    # argument.
37892    path="$complete"
37893    arguments="EOL"
37894    new_path="$path"
37895
37896  windows_path="$new_path"
37897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37898    unix_path=`$CYGPATH -u "$windows_path"`
37899    new_path="$unix_path"
37900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37902    new_path="$unix_path"
37903  fi
37904
37905
37906    new_path=`$WHICH "$new_path" 2> /dev/null`
37907    # bat and cmd files are not always considered executable in MSYS causing which
37908    # to not find them
37909    if test "x$new_path" = x \
37910        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37911        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37912      new_path="$path"
37913
37914  windows_path="$new_path"
37915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37916    unix_path=`$CYGPATH -u "$windows_path"`
37917    new_path="$unix_path"
37918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37920    new_path="$unix_path"
37921  fi
37922
37923    fi
37924
37925    if test "x$new_path" = x; then
37926      # It's still not found. Now this is an unrecoverable error.
37927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37928$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37929      has_space=`$ECHO "$complete" | $GREP " "`
37930      if test "x$has_space" != x; then
37931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37933      fi
37934      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37935    fi
37936  fi
37937
37938  # Now new_path has a complete unix path to the binary
37939  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37940    # Keep paths in /bin as-is, but remove trailing .exe if any
37941    new_path="${new_path/%.exe/}"
37942    # Do not save /bin paths to all_fixpath_prefixes!
37943  else
37944    # Not in mixed or Windows style, start by that.
37945    new_path=`cmd //c echo $new_path`
37946
37947  input_path="$new_path"
37948  # Check if we need to convert this using DOS-style short mode. If the path
37949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37950  # take no chances and rewrite it.
37951  # Note: m4 eats our [], so we need to use [ and ] instead.
37952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37953  if test "x$has_forbidden_chars" != x; then
37954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37956  fi
37957
37958    # Output is in $new_path
37959
37960  windows_path="$new_path"
37961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37962    unix_path=`$CYGPATH -u "$windows_path"`
37963    new_path="$unix_path"
37964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37966    new_path="$unix_path"
37967  fi
37968
37969    # remove trailing .exe if any
37970    new_path="${new_path/%.exe/}"
37971
37972    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37973    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37974  fi
37975
37976    else
37977      # We're on a unix platform. Hooray! :)
37978      # First separate the path from the arguments. This will split at the first
37979      # space.
37980      complete="$AR"
37981      path="${complete%% *}"
37982      tmp="$complete EOL"
37983      arguments="${tmp#* }"
37984
37985      # Cannot rely on the command "which" here since it doesn't always work.
37986      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37987      if test -z "$is_absolute_path"; then
37988        # Path to executable is not absolute. Find it.
37989        IFS_save="$IFS"
37990        IFS=:
37991        for p in $PATH; do
37992          if test -f "$p/$path" && test -x "$p/$path"; then
37993            new_path="$p/$path"
37994            break
37995          fi
37996        done
37997        IFS="$IFS_save"
37998      else
37999        # This is an absolute path, we can use it without further modifications.
38000        new_path="$path"
38001      fi
38002
38003      if test "x$new_path" = x; then
38004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38005$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38006        has_space=`$ECHO "$complete" | $GREP " "`
38007        if test "x$has_space" != x; then
38008          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38009$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38010        fi
38011        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38012      fi
38013    fi
38014
38015    # Now join together the path and the arguments once again
38016    if test "x$arguments" != xEOL; then
38017      new_complete="$new_path ${arguments% *}"
38018    else
38019      new_complete="$new_path"
38020    fi
38021
38022    if test "x$complete" != "x$new_complete"; then
38023      AR="$new_complete"
38024      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38025$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38026    fi
38027  fi
38028
38029
38030
38031  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38032
38033
38034  # Publish this variable in the help.
38035
38036
38037  if [ -z "${LIPO+x}" ]; then
38038    # The variable is not set by user, try to locate tool using the code snippet
38039    for ac_prog in lipo
38040do
38041  # Extract the first word of "$ac_prog", so it can be a program name with args.
38042set dummy $ac_prog; ac_word=$2
38043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38044$as_echo_n "checking for $ac_word... " >&6; }
38045if ${ac_cv_path_LIPO+:} false; then :
38046  $as_echo_n "(cached) " >&6
38047else
38048  case $LIPO in
38049  [\\/]* | ?:[\\/]*)
38050  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38051  ;;
38052  *)
38053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38054for as_dir in $PATH
38055do
38056  IFS=$as_save_IFS
38057  test -z "$as_dir" && as_dir=.
38058    for ac_exec_ext in '' $ac_executable_extensions; do
38059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38060    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38062    break 2
38063  fi
38064done
38065  done
38066IFS=$as_save_IFS
38067
38068  ;;
38069esac
38070fi
38071LIPO=$ac_cv_path_LIPO
38072if test -n "$LIPO"; then
38073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38074$as_echo "$LIPO" >&6; }
38075else
38076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38077$as_echo "no" >&6; }
38078fi
38079
38080
38081  test -n "$LIPO" && break
38082done
38083
38084  else
38085    # The variable is set, but is it from the command line or the environment?
38086
38087    # Try to remove the string !LIPO! from our list.
38088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38090      # If it failed, the variable was not from the command line. Ignore it,
38091      # but warn the user (except for BASH, which is always set by the calling BASH).
38092      if test "xLIPO" != xBASH; then
38093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38094$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38095      fi
38096      # Try to locate tool using the code snippet
38097      for ac_prog in lipo
38098do
38099  # Extract the first word of "$ac_prog", so it can be a program name with args.
38100set dummy $ac_prog; ac_word=$2
38101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38102$as_echo_n "checking for $ac_word... " >&6; }
38103if ${ac_cv_path_LIPO+:} false; then :
38104  $as_echo_n "(cached) " >&6
38105else
38106  case $LIPO in
38107  [\\/]* | ?:[\\/]*)
38108  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38109  ;;
38110  *)
38111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38112for as_dir in $PATH
38113do
38114  IFS=$as_save_IFS
38115  test -z "$as_dir" && as_dir=.
38116    for ac_exec_ext in '' $ac_executable_extensions; do
38117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38118    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38120    break 2
38121  fi
38122done
38123  done
38124IFS=$as_save_IFS
38125
38126  ;;
38127esac
38128fi
38129LIPO=$ac_cv_path_LIPO
38130if test -n "$LIPO"; then
38131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38132$as_echo "$LIPO" >&6; }
38133else
38134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38135$as_echo "no" >&6; }
38136fi
38137
38138
38139  test -n "$LIPO" && break
38140done
38141
38142    else
38143      # If it succeeded, then it was overridden by the user. We will use it
38144      # for the tool.
38145
38146      # First remove it from the list of overridden variables, so we can test
38147      # for unknown variables in the end.
38148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38149
38150      # Check if we try to supply an empty value
38151      if test "x$LIPO" = x; then
38152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38153$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38155$as_echo_n "checking for LIPO... " >&6; }
38156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38157$as_echo "disabled" >&6; }
38158      else
38159        # Check if the provided tool contains a complete path.
38160        tool_specified="$LIPO"
38161        tool_basename="${tool_specified##*/}"
38162        if test "x$tool_basename" = "x$tool_specified"; then
38163          # A command without a complete path is provided, search $PATH.
38164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38165$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38166          # Extract the first word of "$tool_basename", so it can be a program name with args.
38167set dummy $tool_basename; ac_word=$2
38168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38169$as_echo_n "checking for $ac_word... " >&6; }
38170if ${ac_cv_path_LIPO+:} false; then :
38171  $as_echo_n "(cached) " >&6
38172else
38173  case $LIPO in
38174  [\\/]* | ?:[\\/]*)
38175  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38176  ;;
38177  *)
38178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38179for as_dir in $PATH
38180do
38181  IFS=$as_save_IFS
38182  test -z "$as_dir" && as_dir=.
38183    for ac_exec_ext in '' $ac_executable_extensions; do
38184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38185    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38187    break 2
38188  fi
38189done
38190  done
38191IFS=$as_save_IFS
38192
38193  ;;
38194esac
38195fi
38196LIPO=$ac_cv_path_LIPO
38197if test -n "$LIPO"; then
38198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38199$as_echo "$LIPO" >&6; }
38200else
38201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38202$as_echo "no" >&6; }
38203fi
38204
38205
38206          if test "x$LIPO" = x; then
38207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38208          fi
38209        else
38210          # Otherwise we believe it is a complete path. Use it as it is.
38211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38212$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38214$as_echo_n "checking for LIPO... " >&6; }
38215          if test ! -x "$tool_specified"; then
38216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38217$as_echo "not found" >&6; }
38218            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38219          fi
38220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38221$as_echo "$tool_specified" >&6; }
38222        fi
38223      fi
38224    fi
38225
38226  fi
38227
38228
38229
38230  # Only process if variable expands to non-empty
38231
38232  if test "x$LIPO" != x; then
38233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38234
38235  # First separate the path from the arguments. This will split at the first
38236  # space.
38237  complete="$LIPO"
38238  path="${complete%% *}"
38239  tmp="$complete EOL"
38240  arguments="${tmp#* }"
38241
38242  # Input might be given as Windows format, start by converting to
38243  # unix format.
38244  new_path=`$CYGPATH -u "$path"`
38245
38246  # Now try to locate executable using which
38247  new_path=`$WHICH "$new_path" 2> /dev/null`
38248  # bat and cmd files are not always considered executable in cygwin causing which
38249  # to not find them
38250  if test "x$new_path" = x \
38251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38253    new_path=`$CYGPATH -u "$path"`
38254  fi
38255  if test "x$new_path" = x; then
38256    # Oops. Which didn't find the executable.
38257    # The splitting of arguments from the executable at a space might have been incorrect,
38258    # since paths with space are more likely in Windows. Give it another try with the whole
38259    # argument.
38260    path="$complete"
38261    arguments="EOL"
38262    new_path=`$CYGPATH -u "$path"`
38263    new_path=`$WHICH "$new_path" 2> /dev/null`
38264    # bat and cmd files are not always considered executable in cygwin causing which
38265    # to not find them
38266    if test "x$new_path" = x \
38267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38269      new_path=`$CYGPATH -u "$path"`
38270    fi
38271    if test "x$new_path" = x; then
38272      # It's still not found. Now this is an unrecoverable error.
38273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38274$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38275      has_space=`$ECHO "$complete" | $GREP " "`
38276      if test "x$has_space" != x; then
38277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38279      fi
38280      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38281    fi
38282  fi
38283
38284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38287  # "foo.exe" is OK but "foo" is an error.
38288  #
38289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38290  # It is also a way to make sure we got the proper file name for the real test later on.
38291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38292  if test "x$test_shortpath" = x; then
38293    # Short path failed, file does not exist as specified.
38294    # Try adding .exe or .cmd
38295    if test -f "${new_path}.exe"; then
38296      input_to_shortpath="${new_path}.exe"
38297    elif test -f "${new_path}.cmd"; then
38298      input_to_shortpath="${new_path}.cmd"
38299    else
38300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38301$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38304      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38305    fi
38306  else
38307    input_to_shortpath="$new_path"
38308  fi
38309
38310  # Call helper function which possibly converts this using DOS-style short mode.
38311  # If so, the updated path is stored in $new_path.
38312  new_path="$input_to_shortpath"
38313
38314  input_path="$input_to_shortpath"
38315  # Check if we need to convert this using DOS-style short mode. If the path
38316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38317  # take no chances and rewrite it.
38318  # Note: m4 eats our [], so we need to use [ and ] instead.
38319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38320  if test "x$has_forbidden_chars" != x; then
38321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38325      # Going to short mode and back again did indeed matter. Since short mode is
38326      # case insensitive, let's make it lowercase to improve readability.
38327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38328      # Now convert it back to Unix-style (cygpath)
38329      input_path=`$CYGPATH -u "$shortmode_path"`
38330      new_path="$input_path"
38331    fi
38332  fi
38333
38334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38335  if test "x$test_cygdrive_prefix" = x; then
38336    # As a simple fix, exclude /usr/bin since it's not a real path.
38337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38339      # a path prefixed by /cygdrive for fixpath to work.
38340      new_path="$CYGWIN_ROOT_PATH$input_path"
38341    fi
38342  fi
38343
38344  # remove trailing .exe if any
38345  new_path="${new_path/%.exe/}"
38346
38347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38348
38349  # First separate the path from the arguments. This will split at the first
38350  # space.
38351  complete="$LIPO"
38352  path="${complete%% *}"
38353  tmp="$complete EOL"
38354  arguments="${tmp#* }"
38355
38356  # Input might be given as Windows format, start by converting to
38357  # unix format.
38358  new_path="$path"
38359
38360  windows_path="$new_path"
38361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38362    unix_path=`$CYGPATH -u "$windows_path"`
38363    new_path="$unix_path"
38364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38366    new_path="$unix_path"
38367  fi
38368
38369
38370  # Now try to locate executable using which
38371  new_path=`$WHICH "$new_path" 2> /dev/null`
38372
38373  if test "x$new_path" = x; then
38374    # Oops. Which didn't find the executable.
38375    # The splitting of arguments from the executable at a space might have been incorrect,
38376    # since paths with space are more likely in Windows. Give it another try with the whole
38377    # argument.
38378    path="$complete"
38379    arguments="EOL"
38380    new_path="$path"
38381
38382  windows_path="$new_path"
38383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38384    unix_path=`$CYGPATH -u "$windows_path"`
38385    new_path="$unix_path"
38386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38388    new_path="$unix_path"
38389  fi
38390
38391
38392    new_path=`$WHICH "$new_path" 2> /dev/null`
38393    # bat and cmd files are not always considered executable in MSYS causing which
38394    # to not find them
38395    if test "x$new_path" = x \
38396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38398      new_path="$path"
38399
38400  windows_path="$new_path"
38401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38402    unix_path=`$CYGPATH -u "$windows_path"`
38403    new_path="$unix_path"
38404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38406    new_path="$unix_path"
38407  fi
38408
38409    fi
38410
38411    if test "x$new_path" = x; then
38412      # It's still not found. Now this is an unrecoverable error.
38413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38414$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38415      has_space=`$ECHO "$complete" | $GREP " "`
38416      if test "x$has_space" != x; then
38417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38419      fi
38420      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38421    fi
38422  fi
38423
38424  # Now new_path has a complete unix path to the binary
38425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38426    # Keep paths in /bin as-is, but remove trailing .exe if any
38427    new_path="${new_path/%.exe/}"
38428    # Do not save /bin paths to all_fixpath_prefixes!
38429  else
38430    # Not in mixed or Windows style, start by that.
38431    new_path=`cmd //c echo $new_path`
38432
38433  input_path="$new_path"
38434  # Check if we need to convert this using DOS-style short mode. If the path
38435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38436  # take no chances and rewrite it.
38437  # Note: m4 eats our [], so we need to use [ and ] instead.
38438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38439  if test "x$has_forbidden_chars" != x; then
38440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38442  fi
38443
38444    # Output is in $new_path
38445
38446  windows_path="$new_path"
38447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38448    unix_path=`$CYGPATH -u "$windows_path"`
38449    new_path="$unix_path"
38450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38452    new_path="$unix_path"
38453  fi
38454
38455    # remove trailing .exe if any
38456    new_path="${new_path/%.exe/}"
38457
38458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38460  fi
38461
38462    else
38463      # We're on a unix platform. Hooray! :)
38464      # First separate the path from the arguments. This will split at the first
38465      # space.
38466      complete="$LIPO"
38467      path="${complete%% *}"
38468      tmp="$complete EOL"
38469      arguments="${tmp#* }"
38470
38471      # Cannot rely on the command "which" here since it doesn't always work.
38472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38473      if test -z "$is_absolute_path"; then
38474        # Path to executable is not absolute. Find it.
38475        IFS_save="$IFS"
38476        IFS=:
38477        for p in $PATH; do
38478          if test -f "$p/$path" && test -x "$p/$path"; then
38479            new_path="$p/$path"
38480            break
38481          fi
38482        done
38483        IFS="$IFS_save"
38484      else
38485        # This is an absolute path, we can use it without further modifications.
38486        new_path="$path"
38487      fi
38488
38489      if test "x$new_path" = x; then
38490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38491$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38492        has_space=`$ECHO "$complete" | $GREP " "`
38493        if test "x$has_space" != x; then
38494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38496        fi
38497        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38498      fi
38499    fi
38500
38501    # Now join together the path and the arguments once again
38502    if test "x$arguments" != xEOL; then
38503      new_complete="$new_path ${arguments% *}"
38504    else
38505      new_complete="$new_path"
38506    fi
38507
38508    if test "x$complete" != "x$new_complete"; then
38509      LIPO="$new_complete"
38510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38511$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38512    fi
38513  fi
38514
38515  fi
38516
38517  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38518    # Extract the first word of "mt", so it can be a program name with args.
38519set dummy mt; ac_word=$2
38520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38521$as_echo_n "checking for $ac_word... " >&6; }
38522if ${ac_cv_prog_MT+:} false; then :
38523  $as_echo_n "(cached) " >&6
38524else
38525  if test -n "$MT"; then
38526  ac_cv_prog_MT="$MT" # Let the user override the test.
38527else
38528  ac_prog_rejected=no
38529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38530for as_dir in $PATH
38531do
38532  IFS=$as_save_IFS
38533  test -z "$as_dir" && as_dir=.
38534    for ac_exec_ext in '' $ac_executable_extensions; do
38535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38536    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38537       ac_prog_rejected=yes
38538       continue
38539     fi
38540    ac_cv_prog_MT="mt"
38541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38542    break 2
38543  fi
38544done
38545  done
38546IFS=$as_save_IFS
38547
38548if test $ac_prog_rejected = yes; then
38549  # We found a bogon in the path, so make sure we never use it.
38550  set dummy $ac_cv_prog_MT
38551  shift
38552  if test $# != 0; then
38553    # We chose a different compiler from the bogus one.
38554    # However, it has the same basename, so the bogon will be chosen
38555    # first if we set MT to just the basename; use the full file name.
38556    shift
38557    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38558  fi
38559fi
38560fi
38561fi
38562MT=$ac_cv_prog_MT
38563if test -n "$MT"; then
38564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38565$as_echo "$MT" >&6; }
38566else
38567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38568$as_echo "no" >&6; }
38569fi
38570
38571
38572
38573  # Only process if variable expands to non-empty
38574
38575  if test "x$MT" != x; then
38576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38577
38578  # First separate the path from the arguments. This will split at the first
38579  # space.
38580  complete="$MT"
38581  path="${complete%% *}"
38582  tmp="$complete EOL"
38583  arguments="${tmp#* }"
38584
38585  # Input might be given as Windows format, start by converting to
38586  # unix format.
38587  new_path=`$CYGPATH -u "$path"`
38588
38589  # Now try to locate executable using which
38590  new_path=`$WHICH "$new_path" 2> /dev/null`
38591  # bat and cmd files are not always considered executable in cygwin causing which
38592  # to not find them
38593  if test "x$new_path" = x \
38594      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38595      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38596    new_path=`$CYGPATH -u "$path"`
38597  fi
38598  if test "x$new_path" = x; then
38599    # Oops. Which didn't find the executable.
38600    # The splitting of arguments from the executable at a space might have been incorrect,
38601    # since paths with space are more likely in Windows. Give it another try with the whole
38602    # argument.
38603    path="$complete"
38604    arguments="EOL"
38605    new_path=`$CYGPATH -u "$path"`
38606    new_path=`$WHICH "$new_path" 2> /dev/null`
38607    # bat and cmd files are not always considered executable in cygwin causing which
38608    # to not find them
38609    if test "x$new_path" = x \
38610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38612      new_path=`$CYGPATH -u "$path"`
38613    fi
38614    if test "x$new_path" = x; then
38615      # It's still not found. Now this is an unrecoverable error.
38616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38617$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38618      has_space=`$ECHO "$complete" | $GREP " "`
38619      if test "x$has_space" != x; then
38620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38622      fi
38623      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38624    fi
38625  fi
38626
38627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38630  # "foo.exe" is OK but "foo" is an error.
38631  #
38632  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38633  # It is also a way to make sure we got the proper file name for the real test later on.
38634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38635  if test "x$test_shortpath" = x; then
38636    # Short path failed, file does not exist as specified.
38637    # Try adding .exe or .cmd
38638    if test -f "${new_path}.exe"; then
38639      input_to_shortpath="${new_path}.exe"
38640    elif test -f "${new_path}.cmd"; then
38641      input_to_shortpath="${new_path}.cmd"
38642    else
38643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38644$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38645      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38646$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38647      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38648    fi
38649  else
38650    input_to_shortpath="$new_path"
38651  fi
38652
38653  # Call helper function which possibly converts this using DOS-style short mode.
38654  # If so, the updated path is stored in $new_path.
38655  new_path="$input_to_shortpath"
38656
38657  input_path="$input_to_shortpath"
38658  # Check if we need to convert this using DOS-style short mode. If the path
38659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38660  # take no chances and rewrite it.
38661  # Note: m4 eats our [], so we need to use [ and ] instead.
38662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38663  if test "x$has_forbidden_chars" != x; then
38664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38668      # Going to short mode and back again did indeed matter. Since short mode is
38669      # case insensitive, let's make it lowercase to improve readability.
38670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38671      # Now convert it back to Unix-style (cygpath)
38672      input_path=`$CYGPATH -u "$shortmode_path"`
38673      new_path="$input_path"
38674    fi
38675  fi
38676
38677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38678  if test "x$test_cygdrive_prefix" = x; then
38679    # As a simple fix, exclude /usr/bin since it's not a real path.
38680    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38682      # a path prefixed by /cygdrive for fixpath to work.
38683      new_path="$CYGWIN_ROOT_PATH$input_path"
38684    fi
38685  fi
38686
38687  # remove trailing .exe if any
38688  new_path="${new_path/%.exe/}"
38689
38690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38691
38692  # First separate the path from the arguments. This will split at the first
38693  # space.
38694  complete="$MT"
38695  path="${complete%% *}"
38696  tmp="$complete EOL"
38697  arguments="${tmp#* }"
38698
38699  # Input might be given as Windows format, start by converting to
38700  # unix format.
38701  new_path="$path"
38702
38703  windows_path="$new_path"
38704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38705    unix_path=`$CYGPATH -u "$windows_path"`
38706    new_path="$unix_path"
38707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38709    new_path="$unix_path"
38710  fi
38711
38712
38713  # Now try to locate executable using which
38714  new_path=`$WHICH "$new_path" 2> /dev/null`
38715
38716  if test "x$new_path" = x; then
38717    # Oops. Which didn't find the executable.
38718    # The splitting of arguments from the executable at a space might have been incorrect,
38719    # since paths with space are more likely in Windows. Give it another try with the whole
38720    # argument.
38721    path="$complete"
38722    arguments="EOL"
38723    new_path="$path"
38724
38725  windows_path="$new_path"
38726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38727    unix_path=`$CYGPATH -u "$windows_path"`
38728    new_path="$unix_path"
38729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38731    new_path="$unix_path"
38732  fi
38733
38734
38735    new_path=`$WHICH "$new_path" 2> /dev/null`
38736    # bat and cmd files are not always considered executable in MSYS causing which
38737    # to not find them
38738    if test "x$new_path" = x \
38739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38741      new_path="$path"
38742
38743  windows_path="$new_path"
38744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38745    unix_path=`$CYGPATH -u "$windows_path"`
38746    new_path="$unix_path"
38747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38749    new_path="$unix_path"
38750  fi
38751
38752    fi
38753
38754    if test "x$new_path" = x; then
38755      # It's still not found. Now this is an unrecoverable error.
38756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38757$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38758      has_space=`$ECHO "$complete" | $GREP " "`
38759      if test "x$has_space" != x; then
38760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38762      fi
38763      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38764    fi
38765  fi
38766
38767  # Now new_path has a complete unix path to the binary
38768  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38769    # Keep paths in /bin as-is, but remove trailing .exe if any
38770    new_path="${new_path/%.exe/}"
38771    # Do not save /bin paths to all_fixpath_prefixes!
38772  else
38773    # Not in mixed or Windows style, start by that.
38774    new_path=`cmd //c echo $new_path`
38775
38776  input_path="$new_path"
38777  # Check if we need to convert this using DOS-style short mode. If the path
38778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38779  # take no chances and rewrite it.
38780  # Note: m4 eats our [], so we need to use [ and ] instead.
38781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38782  if test "x$has_forbidden_chars" != x; then
38783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38785  fi
38786
38787    # Output is in $new_path
38788
38789  windows_path="$new_path"
38790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38791    unix_path=`$CYGPATH -u "$windows_path"`
38792    new_path="$unix_path"
38793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38795    new_path="$unix_path"
38796  fi
38797
38798    # remove trailing .exe if any
38799    new_path="${new_path/%.exe/}"
38800
38801    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38802    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38803  fi
38804
38805    else
38806      # We're on a unix platform. Hooray! :)
38807      # First separate the path from the arguments. This will split at the first
38808      # space.
38809      complete="$MT"
38810      path="${complete%% *}"
38811      tmp="$complete EOL"
38812      arguments="${tmp#* }"
38813
38814      # Cannot rely on the command "which" here since it doesn't always work.
38815      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38816      if test -z "$is_absolute_path"; then
38817        # Path to executable is not absolute. Find it.
38818        IFS_save="$IFS"
38819        IFS=:
38820        for p in $PATH; do
38821          if test -f "$p/$path" && test -x "$p/$path"; then
38822            new_path="$p/$path"
38823            break
38824          fi
38825        done
38826        IFS="$IFS_save"
38827      else
38828        # This is an absolute path, we can use it without further modifications.
38829        new_path="$path"
38830      fi
38831
38832      if test "x$new_path" = x; then
38833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38834$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38835        has_space=`$ECHO "$complete" | $GREP " "`
38836        if test "x$has_space" != x; then
38837          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38838$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38839        fi
38840        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38841      fi
38842    fi
38843
38844    # Now join together the path and the arguments once again
38845    if test "x$arguments" != xEOL; then
38846      new_complete="$new_path ${arguments% *}"
38847    else
38848      new_complete="$new_path"
38849    fi
38850
38851    if test "x$complete" != "x$new_complete"; then
38852      MT="$new_complete"
38853      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38854$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38855    fi
38856  fi
38857
38858    # Setup the resource compiler (RC)
38859    # Extract the first word of "rc", so it can be a program name with args.
38860set dummy rc; ac_word=$2
38861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38862$as_echo_n "checking for $ac_word... " >&6; }
38863if ${ac_cv_prog_RC+:} false; then :
38864  $as_echo_n "(cached) " >&6
38865else
38866  if test -n "$RC"; then
38867  ac_cv_prog_RC="$RC" # Let the user override the test.
38868else
38869  ac_prog_rejected=no
38870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38871for as_dir in $PATH
38872do
38873  IFS=$as_save_IFS
38874  test -z "$as_dir" && as_dir=.
38875    for ac_exec_ext in '' $ac_executable_extensions; do
38876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38877    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38878       ac_prog_rejected=yes
38879       continue
38880     fi
38881    ac_cv_prog_RC="rc"
38882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38883    break 2
38884  fi
38885done
38886  done
38887IFS=$as_save_IFS
38888
38889if test $ac_prog_rejected = yes; then
38890  # We found a bogon in the path, so make sure we never use it.
38891  set dummy $ac_cv_prog_RC
38892  shift
38893  if test $# != 0; then
38894    # We chose a different compiler from the bogus one.
38895    # However, it has the same basename, so the bogon will be chosen
38896    # first if we set RC to just the basename; use the full file name.
38897    shift
38898    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38899  fi
38900fi
38901fi
38902fi
38903RC=$ac_cv_prog_RC
38904if test -n "$RC"; then
38905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38906$as_echo "$RC" >&6; }
38907else
38908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38909$as_echo "no" >&6; }
38910fi
38911
38912
38913
38914  # Only process if variable expands to non-empty
38915
38916  if test "x$RC" != x; then
38917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38918
38919  # First separate the path from the arguments. This will split at the first
38920  # space.
38921  complete="$RC"
38922  path="${complete%% *}"
38923  tmp="$complete EOL"
38924  arguments="${tmp#* }"
38925
38926  # Input might be given as Windows format, start by converting to
38927  # unix format.
38928  new_path=`$CYGPATH -u "$path"`
38929
38930  # Now try to locate executable using which
38931  new_path=`$WHICH "$new_path" 2> /dev/null`
38932  # bat and cmd files are not always considered executable in cygwin causing which
38933  # to not find them
38934  if test "x$new_path" = x \
38935      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38936      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38937    new_path=`$CYGPATH -u "$path"`
38938  fi
38939  if test "x$new_path" = x; then
38940    # Oops. Which didn't find the executable.
38941    # The splitting of arguments from the executable at a space might have been incorrect,
38942    # since paths with space are more likely in Windows. Give it another try with the whole
38943    # argument.
38944    path="$complete"
38945    arguments="EOL"
38946    new_path=`$CYGPATH -u "$path"`
38947    new_path=`$WHICH "$new_path" 2> /dev/null`
38948    # bat and cmd files are not always considered executable in cygwin causing which
38949    # to not find them
38950    if test "x$new_path" = x \
38951        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38952        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38953      new_path=`$CYGPATH -u "$path"`
38954    fi
38955    if test "x$new_path" = x; then
38956      # It's still not found. Now this is an unrecoverable error.
38957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38958$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38959      has_space=`$ECHO "$complete" | $GREP " "`
38960      if test "x$has_space" != x; then
38961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38963      fi
38964      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38965    fi
38966  fi
38967
38968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38971  # "foo.exe" is OK but "foo" is an error.
38972  #
38973  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38974  # It is also a way to make sure we got the proper file name for the real test later on.
38975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38976  if test "x$test_shortpath" = x; then
38977    # Short path failed, file does not exist as specified.
38978    # Try adding .exe or .cmd
38979    if test -f "${new_path}.exe"; then
38980      input_to_shortpath="${new_path}.exe"
38981    elif test -f "${new_path}.cmd"; then
38982      input_to_shortpath="${new_path}.cmd"
38983    else
38984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38985$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38986      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38987$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38988      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38989    fi
38990  else
38991    input_to_shortpath="$new_path"
38992  fi
38993
38994  # Call helper function which possibly converts this using DOS-style short mode.
38995  # If so, the updated path is stored in $new_path.
38996  new_path="$input_to_shortpath"
38997
38998  input_path="$input_to_shortpath"
38999  # Check if we need to convert this using DOS-style short mode. If the path
39000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39001  # take no chances and rewrite it.
39002  # Note: m4 eats our [], so we need to use [ and ] instead.
39003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39004  if test "x$has_forbidden_chars" != x; then
39005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39009      # Going to short mode and back again did indeed matter. Since short mode is
39010      # case insensitive, let's make it lowercase to improve readability.
39011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39012      # Now convert it back to Unix-style (cygpath)
39013      input_path=`$CYGPATH -u "$shortmode_path"`
39014      new_path="$input_path"
39015    fi
39016  fi
39017
39018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39019  if test "x$test_cygdrive_prefix" = x; then
39020    # As a simple fix, exclude /usr/bin since it's not a real path.
39021    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39023      # a path prefixed by /cygdrive for fixpath to work.
39024      new_path="$CYGWIN_ROOT_PATH$input_path"
39025    fi
39026  fi
39027
39028  # remove trailing .exe if any
39029  new_path="${new_path/%.exe/}"
39030
39031    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39032
39033  # First separate the path from the arguments. This will split at the first
39034  # space.
39035  complete="$RC"
39036  path="${complete%% *}"
39037  tmp="$complete EOL"
39038  arguments="${tmp#* }"
39039
39040  # Input might be given as Windows format, start by converting to
39041  # unix format.
39042  new_path="$path"
39043
39044  windows_path="$new_path"
39045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39046    unix_path=`$CYGPATH -u "$windows_path"`
39047    new_path="$unix_path"
39048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39050    new_path="$unix_path"
39051  fi
39052
39053
39054  # Now try to locate executable using which
39055  new_path=`$WHICH "$new_path" 2> /dev/null`
39056
39057  if test "x$new_path" = x; then
39058    # Oops. Which didn't find the executable.
39059    # The splitting of arguments from the executable at a space might have been incorrect,
39060    # since paths with space are more likely in Windows. Give it another try with the whole
39061    # argument.
39062    path="$complete"
39063    arguments="EOL"
39064    new_path="$path"
39065
39066  windows_path="$new_path"
39067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39068    unix_path=`$CYGPATH -u "$windows_path"`
39069    new_path="$unix_path"
39070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39072    new_path="$unix_path"
39073  fi
39074
39075
39076    new_path=`$WHICH "$new_path" 2> /dev/null`
39077    # bat and cmd files are not always considered executable in MSYS causing which
39078    # to not find them
39079    if test "x$new_path" = x \
39080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39082      new_path="$path"
39083
39084  windows_path="$new_path"
39085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39086    unix_path=`$CYGPATH -u "$windows_path"`
39087    new_path="$unix_path"
39088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39090    new_path="$unix_path"
39091  fi
39092
39093    fi
39094
39095    if test "x$new_path" = x; then
39096      # It's still not found. Now this is an unrecoverable error.
39097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39098$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39099      has_space=`$ECHO "$complete" | $GREP " "`
39100      if test "x$has_space" != x; then
39101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39103      fi
39104      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39105    fi
39106  fi
39107
39108  # Now new_path has a complete unix path to the binary
39109  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39110    # Keep paths in /bin as-is, but remove trailing .exe if any
39111    new_path="${new_path/%.exe/}"
39112    # Do not save /bin paths to all_fixpath_prefixes!
39113  else
39114    # Not in mixed or Windows style, start by that.
39115    new_path=`cmd //c echo $new_path`
39116
39117  input_path="$new_path"
39118  # Check if we need to convert this using DOS-style short mode. If the path
39119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39120  # take no chances and rewrite it.
39121  # Note: m4 eats our [], so we need to use [ and ] instead.
39122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39123  if test "x$has_forbidden_chars" != x; then
39124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39126  fi
39127
39128    # Output is in $new_path
39129
39130  windows_path="$new_path"
39131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39132    unix_path=`$CYGPATH -u "$windows_path"`
39133    new_path="$unix_path"
39134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39136    new_path="$unix_path"
39137  fi
39138
39139    # remove trailing .exe if any
39140    new_path="${new_path/%.exe/}"
39141
39142    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39143    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39144  fi
39145
39146    else
39147      # We're on a unix platform. Hooray! :)
39148      # First separate the path from the arguments. This will split at the first
39149      # space.
39150      complete="$RC"
39151      path="${complete%% *}"
39152      tmp="$complete EOL"
39153      arguments="${tmp#* }"
39154
39155      # Cannot rely on the command "which" here since it doesn't always work.
39156      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39157      if test -z "$is_absolute_path"; then
39158        # Path to executable is not absolute. Find it.
39159        IFS_save="$IFS"
39160        IFS=:
39161        for p in $PATH; do
39162          if test -f "$p/$path" && test -x "$p/$path"; then
39163            new_path="$p/$path"
39164            break
39165          fi
39166        done
39167        IFS="$IFS_save"
39168      else
39169        # This is an absolute path, we can use it without further modifications.
39170        new_path="$path"
39171      fi
39172
39173      if test "x$new_path" = x; then
39174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39175$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39176        has_space=`$ECHO "$complete" | $GREP " "`
39177        if test "x$has_space" != x; then
39178          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39179$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39180        fi
39181        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39182      fi
39183    fi
39184
39185    # Now join together the path and the arguments once again
39186    if test "x$arguments" != xEOL; then
39187      new_complete="$new_path ${arguments% *}"
39188    else
39189      new_complete="$new_path"
39190    fi
39191
39192    if test "x$complete" != "x$new_complete"; then
39193      RC="$new_complete"
39194      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39195$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39196    fi
39197  fi
39198
39199    # Extract the first word of "dumpbin", so it can be a program name with args.
39200set dummy dumpbin; ac_word=$2
39201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39202$as_echo_n "checking for $ac_word... " >&6; }
39203if ${ac_cv_prog_DUMPBIN+:} false; then :
39204  $as_echo_n "(cached) " >&6
39205else
39206  if test -n "$DUMPBIN"; then
39207  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39208else
39209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39210for as_dir in $PATH
39211do
39212  IFS=$as_save_IFS
39213  test -z "$as_dir" && as_dir=.
39214    for ac_exec_ext in '' $ac_executable_extensions; do
39215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39216    ac_cv_prog_DUMPBIN="dumpbin"
39217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39218    break 2
39219  fi
39220done
39221  done
39222IFS=$as_save_IFS
39223
39224fi
39225fi
39226DUMPBIN=$ac_cv_prog_DUMPBIN
39227if test -n "$DUMPBIN"; then
39228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39229$as_echo "$DUMPBIN" >&6; }
39230else
39231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39232$as_echo "no" >&6; }
39233fi
39234
39235
39236
39237  # Only process if variable expands to non-empty
39238
39239  if test "x$DUMPBIN" != x; then
39240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39241
39242  # First separate the path from the arguments. This will split at the first
39243  # space.
39244  complete="$DUMPBIN"
39245  path="${complete%% *}"
39246  tmp="$complete EOL"
39247  arguments="${tmp#* }"
39248
39249  # Input might be given as Windows format, start by converting to
39250  # unix format.
39251  new_path=`$CYGPATH -u "$path"`
39252
39253  # Now try to locate executable using which
39254  new_path=`$WHICH "$new_path" 2> /dev/null`
39255  # bat and cmd files are not always considered executable in cygwin causing which
39256  # to not find them
39257  if test "x$new_path" = x \
39258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39260    new_path=`$CYGPATH -u "$path"`
39261  fi
39262  if test "x$new_path" = x; then
39263    # Oops. Which didn't find the executable.
39264    # The splitting of arguments from the executable at a space might have been incorrect,
39265    # since paths with space are more likely in Windows. Give it another try with the whole
39266    # argument.
39267    path="$complete"
39268    arguments="EOL"
39269    new_path=`$CYGPATH -u "$path"`
39270    new_path=`$WHICH "$new_path" 2> /dev/null`
39271    # bat and cmd files are not always considered executable in cygwin causing which
39272    # to not find them
39273    if test "x$new_path" = x \
39274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39276      new_path=`$CYGPATH -u "$path"`
39277    fi
39278    if test "x$new_path" = x; then
39279      # It's still not found. Now this is an unrecoverable error.
39280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39281$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39282      has_space=`$ECHO "$complete" | $GREP " "`
39283      if test "x$has_space" != x; then
39284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39286      fi
39287      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39288    fi
39289  fi
39290
39291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39294  # "foo.exe" is OK but "foo" is an error.
39295  #
39296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39297  # It is also a way to make sure we got the proper file name for the real test later on.
39298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39299  if test "x$test_shortpath" = x; then
39300    # Short path failed, file does not exist as specified.
39301    # Try adding .exe or .cmd
39302    if test -f "${new_path}.exe"; then
39303      input_to_shortpath="${new_path}.exe"
39304    elif test -f "${new_path}.cmd"; then
39305      input_to_shortpath="${new_path}.cmd"
39306    else
39307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39308$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39311      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39312    fi
39313  else
39314    input_to_shortpath="$new_path"
39315  fi
39316
39317  # Call helper function which possibly converts this using DOS-style short mode.
39318  # If so, the updated path is stored in $new_path.
39319  new_path="$input_to_shortpath"
39320
39321  input_path="$input_to_shortpath"
39322  # Check if we need to convert this using DOS-style short mode. If the path
39323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39324  # take no chances and rewrite it.
39325  # Note: m4 eats our [], so we need to use [ and ] instead.
39326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39327  if test "x$has_forbidden_chars" != x; then
39328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39332      # Going to short mode and back again did indeed matter. Since short mode is
39333      # case insensitive, let's make it lowercase to improve readability.
39334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39335      # Now convert it back to Unix-style (cygpath)
39336      input_path=`$CYGPATH -u "$shortmode_path"`
39337      new_path="$input_path"
39338    fi
39339  fi
39340
39341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39342  if test "x$test_cygdrive_prefix" = x; then
39343    # As a simple fix, exclude /usr/bin since it's not a real path.
39344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39346      # a path prefixed by /cygdrive for fixpath to work.
39347      new_path="$CYGWIN_ROOT_PATH$input_path"
39348    fi
39349  fi
39350
39351  # remove trailing .exe if any
39352  new_path="${new_path/%.exe/}"
39353
39354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39355
39356  # First separate the path from the arguments. This will split at the first
39357  # space.
39358  complete="$DUMPBIN"
39359  path="${complete%% *}"
39360  tmp="$complete EOL"
39361  arguments="${tmp#* }"
39362
39363  # Input might be given as Windows format, start by converting to
39364  # unix format.
39365  new_path="$path"
39366
39367  windows_path="$new_path"
39368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39369    unix_path=`$CYGPATH -u "$windows_path"`
39370    new_path="$unix_path"
39371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39373    new_path="$unix_path"
39374  fi
39375
39376
39377  # Now try to locate executable using which
39378  new_path=`$WHICH "$new_path" 2> /dev/null`
39379
39380  if test "x$new_path" = x; then
39381    # Oops. Which didn't find the executable.
39382    # The splitting of arguments from the executable at a space might have been incorrect,
39383    # since paths with space are more likely in Windows. Give it another try with the whole
39384    # argument.
39385    path="$complete"
39386    arguments="EOL"
39387    new_path="$path"
39388
39389  windows_path="$new_path"
39390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39391    unix_path=`$CYGPATH -u "$windows_path"`
39392    new_path="$unix_path"
39393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39395    new_path="$unix_path"
39396  fi
39397
39398
39399    new_path=`$WHICH "$new_path" 2> /dev/null`
39400    # bat and cmd files are not always considered executable in MSYS causing which
39401    # to not find them
39402    if test "x$new_path" = x \
39403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39405      new_path="$path"
39406
39407  windows_path="$new_path"
39408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39409    unix_path=`$CYGPATH -u "$windows_path"`
39410    new_path="$unix_path"
39411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39413    new_path="$unix_path"
39414  fi
39415
39416    fi
39417
39418    if test "x$new_path" = x; then
39419      # It's still not found. Now this is an unrecoverable error.
39420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39421$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39422      has_space=`$ECHO "$complete" | $GREP " "`
39423      if test "x$has_space" != x; then
39424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39426      fi
39427      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39428    fi
39429  fi
39430
39431  # Now new_path has a complete unix path to the binary
39432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39433    # Keep paths in /bin as-is, but remove trailing .exe if any
39434    new_path="${new_path/%.exe/}"
39435    # Do not save /bin paths to all_fixpath_prefixes!
39436  else
39437    # Not in mixed or Windows style, start by that.
39438    new_path=`cmd //c echo $new_path`
39439
39440  input_path="$new_path"
39441  # Check if we need to convert this using DOS-style short mode. If the path
39442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39443  # take no chances and rewrite it.
39444  # Note: m4 eats our [], so we need to use [ and ] instead.
39445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39446  if test "x$has_forbidden_chars" != x; then
39447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39449  fi
39450
39451    # Output is in $new_path
39452
39453  windows_path="$new_path"
39454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39455    unix_path=`$CYGPATH -u "$windows_path"`
39456    new_path="$unix_path"
39457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39459    new_path="$unix_path"
39460  fi
39461
39462    # remove trailing .exe if any
39463    new_path="${new_path/%.exe/}"
39464
39465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39467  fi
39468
39469    else
39470      # We're on a unix platform. Hooray! :)
39471      # First separate the path from the arguments. This will split at the first
39472      # space.
39473      complete="$DUMPBIN"
39474      path="${complete%% *}"
39475      tmp="$complete EOL"
39476      arguments="${tmp#* }"
39477
39478      # Cannot rely on the command "which" here since it doesn't always work.
39479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39480      if test -z "$is_absolute_path"; then
39481        # Path to executable is not absolute. Find it.
39482        IFS_save="$IFS"
39483        IFS=:
39484        for p in $PATH; do
39485          if test -f "$p/$path" && test -x "$p/$path"; then
39486            new_path="$p/$path"
39487            break
39488          fi
39489        done
39490        IFS="$IFS_save"
39491      else
39492        # This is an absolute path, we can use it without further modifications.
39493        new_path="$path"
39494      fi
39495
39496      if test "x$new_path" = x; then
39497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39498$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39499        has_space=`$ECHO "$complete" | $GREP " "`
39500        if test "x$has_space" != x; then
39501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39503        fi
39504        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39505      fi
39506    fi
39507
39508    # Now join together the path and the arguments once again
39509    if test "x$arguments" != xEOL; then
39510      new_complete="$new_path ${arguments% *}"
39511    else
39512      new_complete="$new_path"
39513    fi
39514
39515    if test "x$complete" != "x$new_complete"; then
39516      DUMPBIN="$new_complete"
39517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39518$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39519    fi
39520  fi
39521
39522    # We need to check for 'msbuild.exe' because at the place where we expect to
39523    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39524    # won't find the 'msbuild.exe' executable in that case (and the
39525    # 'ac_executable_extensions' is unusable due to performance reasons).
39526    # Notice that we intentionally don't fix up the path to MSBUILD because we
39527    # will call it in a DOS shell during freetype detection on Windows (see
39528    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39529    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39530set dummy msbuild.exe; ac_word=$2
39531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39532$as_echo_n "checking for $ac_word... " >&6; }
39533if ${ac_cv_prog_MSBUILD+:} false; then :
39534  $as_echo_n "(cached) " >&6
39535else
39536  if test -n "$MSBUILD"; then
39537  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39538else
39539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39540for as_dir in $PATH
39541do
39542  IFS=$as_save_IFS
39543  test -z "$as_dir" && as_dir=.
39544    for ac_exec_ext in '' $ac_executable_extensions; do
39545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39546    ac_cv_prog_MSBUILD="msbuild.exe"
39547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39548    break 2
39549  fi
39550done
39551  done
39552IFS=$as_save_IFS
39553
39554fi
39555fi
39556MSBUILD=$ac_cv_prog_MSBUILD
39557if test -n "$MSBUILD"; then
39558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39559$as_echo "$MSBUILD" >&6; }
39560else
39561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39562$as_echo "no" >&6; }
39563fi
39564
39565
39566  fi
39567
39568  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39569
39570
39571  # Publish this variable in the help.
39572
39573
39574  if [ -z "${STRIP+x}" ]; then
39575    # The variable is not set by user, try to locate tool using the code snippet
39576    for ac_prog in strip
39577do
39578  # Extract the first word of "$ac_prog", so it can be a program name with args.
39579set dummy $ac_prog; ac_word=$2
39580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39581$as_echo_n "checking for $ac_word... " >&6; }
39582if ${ac_cv_path_STRIP+:} false; then :
39583  $as_echo_n "(cached) " >&6
39584else
39585  case $STRIP in
39586  [\\/]* | ?:[\\/]*)
39587  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39588  ;;
39589  *)
39590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39591for as_dir in $PATH
39592do
39593  IFS=$as_save_IFS
39594  test -z "$as_dir" && as_dir=.
39595    for ac_exec_ext in '' $ac_executable_extensions; do
39596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39597    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39599    break 2
39600  fi
39601done
39602  done
39603IFS=$as_save_IFS
39604
39605  ;;
39606esac
39607fi
39608STRIP=$ac_cv_path_STRIP
39609if test -n "$STRIP"; then
39610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39611$as_echo "$STRIP" >&6; }
39612else
39613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39614$as_echo "no" >&6; }
39615fi
39616
39617
39618  test -n "$STRIP" && break
39619done
39620
39621  else
39622    # The variable is set, but is it from the command line or the environment?
39623
39624    # Try to remove the string !STRIP! from our list.
39625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39627      # If it failed, the variable was not from the command line. Ignore it,
39628      # but warn the user (except for BASH, which is always set by the calling BASH).
39629      if test "xSTRIP" != xBASH; then
39630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39631$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39632      fi
39633      # Try to locate tool using the code snippet
39634      for ac_prog in strip
39635do
39636  # Extract the first word of "$ac_prog", so it can be a program name with args.
39637set dummy $ac_prog; ac_word=$2
39638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39639$as_echo_n "checking for $ac_word... " >&6; }
39640if ${ac_cv_path_STRIP+:} false; then :
39641  $as_echo_n "(cached) " >&6
39642else
39643  case $STRIP in
39644  [\\/]* | ?:[\\/]*)
39645  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39646  ;;
39647  *)
39648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39649for as_dir in $PATH
39650do
39651  IFS=$as_save_IFS
39652  test -z "$as_dir" && as_dir=.
39653    for ac_exec_ext in '' $ac_executable_extensions; do
39654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39655    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39657    break 2
39658  fi
39659done
39660  done
39661IFS=$as_save_IFS
39662
39663  ;;
39664esac
39665fi
39666STRIP=$ac_cv_path_STRIP
39667if test -n "$STRIP"; then
39668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39669$as_echo "$STRIP" >&6; }
39670else
39671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39672$as_echo "no" >&6; }
39673fi
39674
39675
39676  test -n "$STRIP" && break
39677done
39678
39679    else
39680      # If it succeeded, then it was overridden by the user. We will use it
39681      # for the tool.
39682
39683      # First remove it from the list of overridden variables, so we can test
39684      # for unknown variables in the end.
39685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39686
39687      # Check if we try to supply an empty value
39688      if test "x$STRIP" = x; then
39689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39690$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39692$as_echo_n "checking for STRIP... " >&6; }
39693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39694$as_echo "disabled" >&6; }
39695      else
39696        # Check if the provided tool contains a complete path.
39697        tool_specified="$STRIP"
39698        tool_basename="${tool_specified##*/}"
39699        if test "x$tool_basename" = "x$tool_specified"; then
39700          # A command without a complete path is provided, search $PATH.
39701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39702$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39703          # Extract the first word of "$tool_basename", so it can be a program name with args.
39704set dummy $tool_basename; ac_word=$2
39705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39706$as_echo_n "checking for $ac_word... " >&6; }
39707if ${ac_cv_path_STRIP+:} false; then :
39708  $as_echo_n "(cached) " >&6
39709else
39710  case $STRIP in
39711  [\\/]* | ?:[\\/]*)
39712  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39713  ;;
39714  *)
39715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39716for as_dir in $PATH
39717do
39718  IFS=$as_save_IFS
39719  test -z "$as_dir" && as_dir=.
39720    for ac_exec_ext in '' $ac_executable_extensions; do
39721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39722    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39724    break 2
39725  fi
39726done
39727  done
39728IFS=$as_save_IFS
39729
39730  ;;
39731esac
39732fi
39733STRIP=$ac_cv_path_STRIP
39734if test -n "$STRIP"; then
39735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39736$as_echo "$STRIP" >&6; }
39737else
39738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39739$as_echo "no" >&6; }
39740fi
39741
39742
39743          if test "x$STRIP" = x; then
39744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39745          fi
39746        else
39747          # Otherwise we believe it is a complete path. Use it as it is.
39748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39749$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39751$as_echo_n "checking for STRIP... " >&6; }
39752          if test ! -x "$tool_specified"; then
39753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39754$as_echo "not found" >&6; }
39755            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39756          fi
39757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39758$as_echo "$tool_specified" >&6; }
39759        fi
39760      fi
39761    fi
39762
39763  fi
39764
39765
39766
39767  # Only process if variable expands to non-empty
39768
39769  if test "x$STRIP" != x; then
39770    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39771
39772  # First separate the path from the arguments. This will split at the first
39773  # space.
39774  complete="$STRIP"
39775  path="${complete%% *}"
39776  tmp="$complete EOL"
39777  arguments="${tmp#* }"
39778
39779  # Input might be given as Windows format, start by converting to
39780  # unix format.
39781  new_path=`$CYGPATH -u "$path"`
39782
39783  # Now try to locate executable using which
39784  new_path=`$WHICH "$new_path" 2> /dev/null`
39785  # bat and cmd files are not always considered executable in cygwin causing which
39786  # to not find them
39787  if test "x$new_path" = x \
39788      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39789      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39790    new_path=`$CYGPATH -u "$path"`
39791  fi
39792  if test "x$new_path" = x; then
39793    # Oops. Which didn't find the executable.
39794    # The splitting of arguments from the executable at a space might have been incorrect,
39795    # since paths with space are more likely in Windows. Give it another try with the whole
39796    # argument.
39797    path="$complete"
39798    arguments="EOL"
39799    new_path=`$CYGPATH -u "$path"`
39800    new_path=`$WHICH "$new_path" 2> /dev/null`
39801    # bat and cmd files are not always considered executable in cygwin causing which
39802    # to not find them
39803    if test "x$new_path" = x \
39804        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39805        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39806      new_path=`$CYGPATH -u "$path"`
39807    fi
39808    if test "x$new_path" = x; then
39809      # It's still not found. Now this is an unrecoverable error.
39810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39811$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39812      has_space=`$ECHO "$complete" | $GREP " "`
39813      if test "x$has_space" != x; then
39814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39816      fi
39817      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39818    fi
39819  fi
39820
39821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39824  # "foo.exe" is OK but "foo" is an error.
39825  #
39826  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39827  # It is also a way to make sure we got the proper file name for the real test later on.
39828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39829  if test "x$test_shortpath" = x; then
39830    # Short path failed, file does not exist as specified.
39831    # Try adding .exe or .cmd
39832    if test -f "${new_path}.exe"; then
39833      input_to_shortpath="${new_path}.exe"
39834    elif test -f "${new_path}.cmd"; then
39835      input_to_shortpath="${new_path}.cmd"
39836    else
39837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39838$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39839      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39840$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39841      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39842    fi
39843  else
39844    input_to_shortpath="$new_path"
39845  fi
39846
39847  # Call helper function which possibly converts this using DOS-style short mode.
39848  # If so, the updated path is stored in $new_path.
39849  new_path="$input_to_shortpath"
39850
39851  input_path="$input_to_shortpath"
39852  # Check if we need to convert this using DOS-style short mode. If the path
39853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39854  # take no chances and rewrite it.
39855  # Note: m4 eats our [], so we need to use [ and ] instead.
39856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39857  if test "x$has_forbidden_chars" != x; then
39858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39862      # Going to short mode and back again did indeed matter. Since short mode is
39863      # case insensitive, let's make it lowercase to improve readability.
39864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39865      # Now convert it back to Unix-style (cygpath)
39866      input_path=`$CYGPATH -u "$shortmode_path"`
39867      new_path="$input_path"
39868    fi
39869  fi
39870
39871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39872  if test "x$test_cygdrive_prefix" = x; then
39873    # As a simple fix, exclude /usr/bin since it's not a real path.
39874    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39876      # a path prefixed by /cygdrive for fixpath to work.
39877      new_path="$CYGWIN_ROOT_PATH$input_path"
39878    fi
39879  fi
39880
39881  # remove trailing .exe if any
39882  new_path="${new_path/%.exe/}"
39883
39884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39885
39886  # First separate the path from the arguments. This will split at the first
39887  # space.
39888  complete="$STRIP"
39889  path="${complete%% *}"
39890  tmp="$complete EOL"
39891  arguments="${tmp#* }"
39892
39893  # Input might be given as Windows format, start by converting to
39894  # unix format.
39895  new_path="$path"
39896
39897  windows_path="$new_path"
39898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39899    unix_path=`$CYGPATH -u "$windows_path"`
39900    new_path="$unix_path"
39901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39903    new_path="$unix_path"
39904  fi
39905
39906
39907  # Now try to locate executable using which
39908  new_path=`$WHICH "$new_path" 2> /dev/null`
39909
39910  if test "x$new_path" = x; then
39911    # Oops. Which didn't find the executable.
39912    # The splitting of arguments from the executable at a space might have been incorrect,
39913    # since paths with space are more likely in Windows. Give it another try with the whole
39914    # argument.
39915    path="$complete"
39916    arguments="EOL"
39917    new_path="$path"
39918
39919  windows_path="$new_path"
39920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39921    unix_path=`$CYGPATH -u "$windows_path"`
39922    new_path="$unix_path"
39923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39925    new_path="$unix_path"
39926  fi
39927
39928
39929    new_path=`$WHICH "$new_path" 2> /dev/null`
39930    # bat and cmd files are not always considered executable in MSYS causing which
39931    # to not find them
39932    if test "x$new_path" = x \
39933        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39934        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39935      new_path="$path"
39936
39937  windows_path="$new_path"
39938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39939    unix_path=`$CYGPATH -u "$windows_path"`
39940    new_path="$unix_path"
39941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39943    new_path="$unix_path"
39944  fi
39945
39946    fi
39947
39948    if test "x$new_path" = x; then
39949      # It's still not found. Now this is an unrecoverable error.
39950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39951$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39952      has_space=`$ECHO "$complete" | $GREP " "`
39953      if test "x$has_space" != x; then
39954        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39955$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39956      fi
39957      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39958    fi
39959  fi
39960
39961  # Now new_path has a complete unix path to the binary
39962  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39963    # Keep paths in /bin as-is, but remove trailing .exe if any
39964    new_path="${new_path/%.exe/}"
39965    # Do not save /bin paths to all_fixpath_prefixes!
39966  else
39967    # Not in mixed or Windows style, start by that.
39968    new_path=`cmd //c echo $new_path`
39969
39970  input_path="$new_path"
39971  # Check if we need to convert this using DOS-style short mode. If the path
39972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39973  # take no chances and rewrite it.
39974  # Note: m4 eats our [], so we need to use [ and ] instead.
39975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39976  if test "x$has_forbidden_chars" != x; then
39977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39979  fi
39980
39981    # Output is in $new_path
39982
39983  windows_path="$new_path"
39984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39985    unix_path=`$CYGPATH -u "$windows_path"`
39986    new_path="$unix_path"
39987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39989    new_path="$unix_path"
39990  fi
39991
39992    # remove trailing .exe if any
39993    new_path="${new_path/%.exe/}"
39994
39995    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39996    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39997  fi
39998
39999    else
40000      # We're on a unix platform. Hooray! :)
40001      # First separate the path from the arguments. This will split at the first
40002      # space.
40003      complete="$STRIP"
40004      path="${complete%% *}"
40005      tmp="$complete EOL"
40006      arguments="${tmp#* }"
40007
40008      # Cannot rely on the command "which" here since it doesn't always work.
40009      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40010      if test -z "$is_absolute_path"; then
40011        # Path to executable is not absolute. Find it.
40012        IFS_save="$IFS"
40013        IFS=:
40014        for p in $PATH; do
40015          if test -f "$p/$path" && test -x "$p/$path"; then
40016            new_path="$p/$path"
40017            break
40018          fi
40019        done
40020        IFS="$IFS_save"
40021      else
40022        # This is an absolute path, we can use it without further modifications.
40023        new_path="$path"
40024      fi
40025
40026      if test "x$new_path" = x; then
40027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40028$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40029        has_space=`$ECHO "$complete" | $GREP " "`
40030        if test "x$has_space" != x; then
40031          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40032$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40033        fi
40034        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40035      fi
40036    fi
40037
40038    # Now join together the path and the arguments once again
40039    if test "x$arguments" != xEOL; then
40040      new_complete="$new_path ${arguments% *}"
40041    else
40042      new_complete="$new_path"
40043    fi
40044
40045    if test "x$complete" != "x$new_complete"; then
40046      STRIP="$new_complete"
40047      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40048$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40049    fi
40050  fi
40051
40052
40053
40054  # Publish this variable in the help.
40055
40056
40057  if [ -z "${NM+x}" ]; then
40058    # The variable is not set by user, try to locate tool using the code snippet
40059    for ac_prog in nm
40060do
40061  # Extract the first word of "$ac_prog", so it can be a program name with args.
40062set dummy $ac_prog; ac_word=$2
40063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40064$as_echo_n "checking for $ac_word... " >&6; }
40065if ${ac_cv_path_NM+:} false; then :
40066  $as_echo_n "(cached) " >&6
40067else
40068  case $NM in
40069  [\\/]* | ?:[\\/]*)
40070  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40071  ;;
40072  *)
40073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40074for as_dir in $PATH
40075do
40076  IFS=$as_save_IFS
40077  test -z "$as_dir" && as_dir=.
40078    for ac_exec_ext in '' $ac_executable_extensions; do
40079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40080    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40082    break 2
40083  fi
40084done
40085  done
40086IFS=$as_save_IFS
40087
40088  ;;
40089esac
40090fi
40091NM=$ac_cv_path_NM
40092if test -n "$NM"; then
40093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40094$as_echo "$NM" >&6; }
40095else
40096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40097$as_echo "no" >&6; }
40098fi
40099
40100
40101  test -n "$NM" && break
40102done
40103
40104  else
40105    # The variable is set, but is it from the command line or the environment?
40106
40107    # Try to remove the string !NM! from our list.
40108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40110      # If it failed, the variable was not from the command line. Ignore it,
40111      # but warn the user (except for BASH, which is always set by the calling BASH).
40112      if test "xNM" != xBASH; then
40113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40114$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40115      fi
40116      # Try to locate tool using the code snippet
40117      for ac_prog in nm
40118do
40119  # Extract the first word of "$ac_prog", so it can be a program name with args.
40120set dummy $ac_prog; ac_word=$2
40121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40122$as_echo_n "checking for $ac_word... " >&6; }
40123if ${ac_cv_path_NM+:} false; then :
40124  $as_echo_n "(cached) " >&6
40125else
40126  case $NM in
40127  [\\/]* | ?:[\\/]*)
40128  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40129  ;;
40130  *)
40131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40132for as_dir in $PATH
40133do
40134  IFS=$as_save_IFS
40135  test -z "$as_dir" && as_dir=.
40136    for ac_exec_ext in '' $ac_executable_extensions; do
40137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40138    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40140    break 2
40141  fi
40142done
40143  done
40144IFS=$as_save_IFS
40145
40146  ;;
40147esac
40148fi
40149NM=$ac_cv_path_NM
40150if test -n "$NM"; then
40151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40152$as_echo "$NM" >&6; }
40153else
40154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40155$as_echo "no" >&6; }
40156fi
40157
40158
40159  test -n "$NM" && break
40160done
40161
40162    else
40163      # If it succeeded, then it was overridden by the user. We will use it
40164      # for the tool.
40165
40166      # First remove it from the list of overridden variables, so we can test
40167      # for unknown variables in the end.
40168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40169
40170      # Check if we try to supply an empty value
40171      if test "x$NM" = x; then
40172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40173$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40175$as_echo_n "checking for NM... " >&6; }
40176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40177$as_echo "disabled" >&6; }
40178      else
40179        # Check if the provided tool contains a complete path.
40180        tool_specified="$NM"
40181        tool_basename="${tool_specified##*/}"
40182        if test "x$tool_basename" = "x$tool_specified"; then
40183          # A command without a complete path is provided, search $PATH.
40184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40185$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40186          # Extract the first word of "$tool_basename", so it can be a program name with args.
40187set dummy $tool_basename; ac_word=$2
40188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40189$as_echo_n "checking for $ac_word... " >&6; }
40190if ${ac_cv_path_NM+:} false; then :
40191  $as_echo_n "(cached) " >&6
40192else
40193  case $NM in
40194  [\\/]* | ?:[\\/]*)
40195  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40196  ;;
40197  *)
40198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40199for as_dir in $PATH
40200do
40201  IFS=$as_save_IFS
40202  test -z "$as_dir" && as_dir=.
40203    for ac_exec_ext in '' $ac_executable_extensions; do
40204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40205    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40207    break 2
40208  fi
40209done
40210  done
40211IFS=$as_save_IFS
40212
40213  ;;
40214esac
40215fi
40216NM=$ac_cv_path_NM
40217if test -n "$NM"; then
40218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40219$as_echo "$NM" >&6; }
40220else
40221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40222$as_echo "no" >&6; }
40223fi
40224
40225
40226          if test "x$NM" = x; then
40227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40228          fi
40229        else
40230          # Otherwise we believe it is a complete path. Use it as it is.
40231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40232$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40234$as_echo_n "checking for NM... " >&6; }
40235          if test ! -x "$tool_specified"; then
40236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40237$as_echo "not found" >&6; }
40238            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40239          fi
40240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40241$as_echo "$tool_specified" >&6; }
40242        fi
40243      fi
40244    fi
40245
40246  fi
40247
40248
40249
40250  # Only process if variable expands to non-empty
40251
40252  if test "x$NM" != x; then
40253    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40254
40255  # First separate the path from the arguments. This will split at the first
40256  # space.
40257  complete="$NM"
40258  path="${complete%% *}"
40259  tmp="$complete EOL"
40260  arguments="${tmp#* }"
40261
40262  # Input might be given as Windows format, start by converting to
40263  # unix format.
40264  new_path=`$CYGPATH -u "$path"`
40265
40266  # Now try to locate executable using which
40267  new_path=`$WHICH "$new_path" 2> /dev/null`
40268  # bat and cmd files are not always considered executable in cygwin causing which
40269  # to not find them
40270  if test "x$new_path" = x \
40271      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40272      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40273    new_path=`$CYGPATH -u "$path"`
40274  fi
40275  if test "x$new_path" = x; then
40276    # Oops. Which didn't find the executable.
40277    # The splitting of arguments from the executable at a space might have been incorrect,
40278    # since paths with space are more likely in Windows. Give it another try with the whole
40279    # argument.
40280    path="$complete"
40281    arguments="EOL"
40282    new_path=`$CYGPATH -u "$path"`
40283    new_path=`$WHICH "$new_path" 2> /dev/null`
40284    # bat and cmd files are not always considered executable in cygwin causing which
40285    # to not find them
40286    if test "x$new_path" = x \
40287        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40288        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40289      new_path=`$CYGPATH -u "$path"`
40290    fi
40291    if test "x$new_path" = x; then
40292      # It's still not found. Now this is an unrecoverable error.
40293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40294$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40295      has_space=`$ECHO "$complete" | $GREP " "`
40296      if test "x$has_space" != x; then
40297        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40298$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40299      fi
40300      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40301    fi
40302  fi
40303
40304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40307  # "foo.exe" is OK but "foo" is an error.
40308  #
40309  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40310  # It is also a way to make sure we got the proper file name for the real test later on.
40311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40312  if test "x$test_shortpath" = x; then
40313    # Short path failed, file does not exist as specified.
40314    # Try adding .exe or .cmd
40315    if test -f "${new_path}.exe"; then
40316      input_to_shortpath="${new_path}.exe"
40317    elif test -f "${new_path}.cmd"; then
40318      input_to_shortpath="${new_path}.cmd"
40319    else
40320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40321$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40322      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40323$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40324      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40325    fi
40326  else
40327    input_to_shortpath="$new_path"
40328  fi
40329
40330  # Call helper function which possibly converts this using DOS-style short mode.
40331  # If so, the updated path is stored in $new_path.
40332  new_path="$input_to_shortpath"
40333
40334  input_path="$input_to_shortpath"
40335  # Check if we need to convert this using DOS-style short mode. If the path
40336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40337  # take no chances and rewrite it.
40338  # Note: m4 eats our [], so we need to use [ and ] instead.
40339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40340  if test "x$has_forbidden_chars" != x; then
40341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40345      # Going to short mode and back again did indeed matter. Since short mode is
40346      # case insensitive, let's make it lowercase to improve readability.
40347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40348      # Now convert it back to Unix-style (cygpath)
40349      input_path=`$CYGPATH -u "$shortmode_path"`
40350      new_path="$input_path"
40351    fi
40352  fi
40353
40354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40355  if test "x$test_cygdrive_prefix" = x; then
40356    # As a simple fix, exclude /usr/bin since it's not a real path.
40357    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40359      # a path prefixed by /cygdrive for fixpath to work.
40360      new_path="$CYGWIN_ROOT_PATH$input_path"
40361    fi
40362  fi
40363
40364  # remove trailing .exe if any
40365  new_path="${new_path/%.exe/}"
40366
40367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40368
40369  # First separate the path from the arguments. This will split at the first
40370  # space.
40371  complete="$NM"
40372  path="${complete%% *}"
40373  tmp="$complete EOL"
40374  arguments="${tmp#* }"
40375
40376  # Input might be given as Windows format, start by converting to
40377  # unix format.
40378  new_path="$path"
40379
40380  windows_path="$new_path"
40381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40382    unix_path=`$CYGPATH -u "$windows_path"`
40383    new_path="$unix_path"
40384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40386    new_path="$unix_path"
40387  fi
40388
40389
40390  # Now try to locate executable using which
40391  new_path=`$WHICH "$new_path" 2> /dev/null`
40392
40393  if test "x$new_path" = x; then
40394    # Oops. Which didn't find the executable.
40395    # The splitting of arguments from the executable at a space might have been incorrect,
40396    # since paths with space are more likely in Windows. Give it another try with the whole
40397    # argument.
40398    path="$complete"
40399    arguments="EOL"
40400    new_path="$path"
40401
40402  windows_path="$new_path"
40403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40404    unix_path=`$CYGPATH -u "$windows_path"`
40405    new_path="$unix_path"
40406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40408    new_path="$unix_path"
40409  fi
40410
40411
40412    new_path=`$WHICH "$new_path" 2> /dev/null`
40413    # bat and cmd files are not always considered executable in MSYS causing which
40414    # to not find them
40415    if test "x$new_path" = x \
40416        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40417        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40418      new_path="$path"
40419
40420  windows_path="$new_path"
40421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40422    unix_path=`$CYGPATH -u "$windows_path"`
40423    new_path="$unix_path"
40424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40426    new_path="$unix_path"
40427  fi
40428
40429    fi
40430
40431    if test "x$new_path" = x; then
40432      # It's still not found. Now this is an unrecoverable error.
40433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40434$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40435      has_space=`$ECHO "$complete" | $GREP " "`
40436      if test "x$has_space" != x; then
40437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40439      fi
40440      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40441    fi
40442  fi
40443
40444  # Now new_path has a complete unix path to the binary
40445  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40446    # Keep paths in /bin as-is, but remove trailing .exe if any
40447    new_path="${new_path/%.exe/}"
40448    # Do not save /bin paths to all_fixpath_prefixes!
40449  else
40450    # Not in mixed or Windows style, start by that.
40451    new_path=`cmd //c echo $new_path`
40452
40453  input_path="$new_path"
40454  # Check if we need to convert this using DOS-style short mode. If the path
40455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40456  # take no chances and rewrite it.
40457  # Note: m4 eats our [], so we need to use [ and ] instead.
40458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40459  if test "x$has_forbidden_chars" != x; then
40460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40462  fi
40463
40464    # Output is in $new_path
40465
40466  windows_path="$new_path"
40467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40468    unix_path=`$CYGPATH -u "$windows_path"`
40469    new_path="$unix_path"
40470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40472    new_path="$unix_path"
40473  fi
40474
40475    # remove trailing .exe if any
40476    new_path="${new_path/%.exe/}"
40477
40478    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40479    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40480  fi
40481
40482    else
40483      # We're on a unix platform. Hooray! :)
40484      # First separate the path from the arguments. This will split at the first
40485      # space.
40486      complete="$NM"
40487      path="${complete%% *}"
40488      tmp="$complete EOL"
40489      arguments="${tmp#* }"
40490
40491      # Cannot rely on the command "which" here since it doesn't always work.
40492      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40493      if test -z "$is_absolute_path"; then
40494        # Path to executable is not absolute. Find it.
40495        IFS_save="$IFS"
40496        IFS=:
40497        for p in $PATH; do
40498          if test -f "$p/$path" && test -x "$p/$path"; then
40499            new_path="$p/$path"
40500            break
40501          fi
40502        done
40503        IFS="$IFS_save"
40504      else
40505        # This is an absolute path, we can use it without further modifications.
40506        new_path="$path"
40507      fi
40508
40509      if test "x$new_path" = x; then
40510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40511$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40512        has_space=`$ECHO "$complete" | $GREP " "`
40513        if test "x$has_space" != x; then
40514          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40515$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40516        fi
40517        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40518      fi
40519    fi
40520
40521    # Now join together the path and the arguments once again
40522    if test "x$arguments" != xEOL; then
40523      new_complete="$new_path ${arguments% *}"
40524    else
40525      new_complete="$new_path"
40526    fi
40527
40528    if test "x$complete" != "x$new_complete"; then
40529      NM="$new_complete"
40530      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40531$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40532    fi
40533  fi
40534
40535
40536
40537  # Publish this variable in the help.
40538
40539
40540  if [ -z "${GNM+x}" ]; then
40541    # The variable is not set by user, try to locate tool using the code snippet
40542    for ac_prog in gnm
40543do
40544  # Extract the first word of "$ac_prog", so it can be a program name with args.
40545set dummy $ac_prog; ac_word=$2
40546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40547$as_echo_n "checking for $ac_word... " >&6; }
40548if ${ac_cv_path_GNM+:} false; then :
40549  $as_echo_n "(cached) " >&6
40550else
40551  case $GNM in
40552  [\\/]* | ?:[\\/]*)
40553  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40554  ;;
40555  *)
40556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40557for as_dir in $PATH
40558do
40559  IFS=$as_save_IFS
40560  test -z "$as_dir" && as_dir=.
40561    for ac_exec_ext in '' $ac_executable_extensions; do
40562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40563    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40565    break 2
40566  fi
40567done
40568  done
40569IFS=$as_save_IFS
40570
40571  ;;
40572esac
40573fi
40574GNM=$ac_cv_path_GNM
40575if test -n "$GNM"; then
40576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40577$as_echo "$GNM" >&6; }
40578else
40579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40580$as_echo "no" >&6; }
40581fi
40582
40583
40584  test -n "$GNM" && break
40585done
40586
40587  else
40588    # The variable is set, but is it from the command line or the environment?
40589
40590    # Try to remove the string !GNM! from our list.
40591    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40592    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40593      # If it failed, the variable was not from the command line. Ignore it,
40594      # but warn the user (except for BASH, which is always set by the calling BASH).
40595      if test "xGNM" != xBASH; then
40596        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40597$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40598      fi
40599      # Try to locate tool using the code snippet
40600      for ac_prog in gnm
40601do
40602  # Extract the first word of "$ac_prog", so it can be a program name with args.
40603set dummy $ac_prog; ac_word=$2
40604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40605$as_echo_n "checking for $ac_word... " >&6; }
40606if ${ac_cv_path_GNM+:} false; then :
40607  $as_echo_n "(cached) " >&6
40608else
40609  case $GNM in
40610  [\\/]* | ?:[\\/]*)
40611  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40612  ;;
40613  *)
40614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40615for as_dir in $PATH
40616do
40617  IFS=$as_save_IFS
40618  test -z "$as_dir" && as_dir=.
40619    for ac_exec_ext in '' $ac_executable_extensions; do
40620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40621    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40623    break 2
40624  fi
40625done
40626  done
40627IFS=$as_save_IFS
40628
40629  ;;
40630esac
40631fi
40632GNM=$ac_cv_path_GNM
40633if test -n "$GNM"; then
40634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40635$as_echo "$GNM" >&6; }
40636else
40637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40638$as_echo "no" >&6; }
40639fi
40640
40641
40642  test -n "$GNM" && break
40643done
40644
40645    else
40646      # If it succeeded, then it was overridden by the user. We will use it
40647      # for the tool.
40648
40649      # First remove it from the list of overridden variables, so we can test
40650      # for unknown variables in the end.
40651      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40652
40653      # Check if we try to supply an empty value
40654      if test "x$GNM" = x; then
40655        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40656$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40658$as_echo_n "checking for GNM... " >&6; }
40659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40660$as_echo "disabled" >&6; }
40661      else
40662        # Check if the provided tool contains a complete path.
40663        tool_specified="$GNM"
40664        tool_basename="${tool_specified##*/}"
40665        if test "x$tool_basename" = "x$tool_specified"; then
40666          # A command without a complete path is provided, search $PATH.
40667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40668$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40669          # Extract the first word of "$tool_basename", so it can be a program name with args.
40670set dummy $tool_basename; ac_word=$2
40671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40672$as_echo_n "checking for $ac_word... " >&6; }
40673if ${ac_cv_path_GNM+:} false; then :
40674  $as_echo_n "(cached) " >&6
40675else
40676  case $GNM in
40677  [\\/]* | ?:[\\/]*)
40678  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40679  ;;
40680  *)
40681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40682for as_dir in $PATH
40683do
40684  IFS=$as_save_IFS
40685  test -z "$as_dir" && as_dir=.
40686    for ac_exec_ext in '' $ac_executable_extensions; do
40687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40688    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40690    break 2
40691  fi
40692done
40693  done
40694IFS=$as_save_IFS
40695
40696  ;;
40697esac
40698fi
40699GNM=$ac_cv_path_GNM
40700if test -n "$GNM"; then
40701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40702$as_echo "$GNM" >&6; }
40703else
40704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40705$as_echo "no" >&6; }
40706fi
40707
40708
40709          if test "x$GNM" = x; then
40710            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40711          fi
40712        else
40713          # Otherwise we believe it is a complete path. Use it as it is.
40714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40715$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40716          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40717$as_echo_n "checking for GNM... " >&6; }
40718          if test ! -x "$tool_specified"; then
40719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40720$as_echo "not found" >&6; }
40721            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40722          fi
40723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40724$as_echo "$tool_specified" >&6; }
40725        fi
40726      fi
40727    fi
40728
40729  fi
40730
40731
40732
40733  # Only process if variable expands to non-empty
40734
40735  if test "x$GNM" != x; then
40736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40737
40738  # First separate the path from the arguments. This will split at the first
40739  # space.
40740  complete="$GNM"
40741  path="${complete%% *}"
40742  tmp="$complete EOL"
40743  arguments="${tmp#* }"
40744
40745  # Input might be given as Windows format, start by converting to
40746  # unix format.
40747  new_path=`$CYGPATH -u "$path"`
40748
40749  # Now try to locate executable using which
40750  new_path=`$WHICH "$new_path" 2> /dev/null`
40751  # bat and cmd files are not always considered executable in cygwin causing which
40752  # to not find them
40753  if test "x$new_path" = x \
40754      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40755      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40756    new_path=`$CYGPATH -u "$path"`
40757  fi
40758  if test "x$new_path" = x; then
40759    # Oops. Which didn't find the executable.
40760    # The splitting of arguments from the executable at a space might have been incorrect,
40761    # since paths with space are more likely in Windows. Give it another try with the whole
40762    # argument.
40763    path="$complete"
40764    arguments="EOL"
40765    new_path=`$CYGPATH -u "$path"`
40766    new_path=`$WHICH "$new_path" 2> /dev/null`
40767    # bat and cmd files are not always considered executable in cygwin causing which
40768    # to not find them
40769    if test "x$new_path" = x \
40770        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40771        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40772      new_path=`$CYGPATH -u "$path"`
40773    fi
40774    if test "x$new_path" = x; then
40775      # It's still not found. Now this is an unrecoverable error.
40776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40777$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40778      has_space=`$ECHO "$complete" | $GREP " "`
40779      if test "x$has_space" != x; then
40780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40782      fi
40783      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40784    fi
40785  fi
40786
40787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40790  # "foo.exe" is OK but "foo" is an error.
40791  #
40792  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40793  # It is also a way to make sure we got the proper file name for the real test later on.
40794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40795  if test "x$test_shortpath" = x; then
40796    # Short path failed, file does not exist as specified.
40797    # Try adding .exe or .cmd
40798    if test -f "${new_path}.exe"; then
40799      input_to_shortpath="${new_path}.exe"
40800    elif test -f "${new_path}.cmd"; then
40801      input_to_shortpath="${new_path}.cmd"
40802    else
40803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40804$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40805      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40806$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40807      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40808    fi
40809  else
40810    input_to_shortpath="$new_path"
40811  fi
40812
40813  # Call helper function which possibly converts this using DOS-style short mode.
40814  # If so, the updated path is stored in $new_path.
40815  new_path="$input_to_shortpath"
40816
40817  input_path="$input_to_shortpath"
40818  # Check if we need to convert this using DOS-style short mode. If the path
40819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40820  # take no chances and rewrite it.
40821  # Note: m4 eats our [], so we need to use [ and ] instead.
40822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40823  if test "x$has_forbidden_chars" != x; then
40824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40828      # Going to short mode and back again did indeed matter. Since short mode is
40829      # case insensitive, let's make it lowercase to improve readability.
40830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40831      # Now convert it back to Unix-style (cygpath)
40832      input_path=`$CYGPATH -u "$shortmode_path"`
40833      new_path="$input_path"
40834    fi
40835  fi
40836
40837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40838  if test "x$test_cygdrive_prefix" = x; then
40839    # As a simple fix, exclude /usr/bin since it's not a real path.
40840    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40842      # a path prefixed by /cygdrive for fixpath to work.
40843      new_path="$CYGWIN_ROOT_PATH$input_path"
40844    fi
40845  fi
40846
40847  # remove trailing .exe if any
40848  new_path="${new_path/%.exe/}"
40849
40850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40851
40852  # First separate the path from the arguments. This will split at the first
40853  # space.
40854  complete="$GNM"
40855  path="${complete%% *}"
40856  tmp="$complete EOL"
40857  arguments="${tmp#* }"
40858
40859  # Input might be given as Windows format, start by converting to
40860  # unix format.
40861  new_path="$path"
40862
40863  windows_path="$new_path"
40864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40865    unix_path=`$CYGPATH -u "$windows_path"`
40866    new_path="$unix_path"
40867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40869    new_path="$unix_path"
40870  fi
40871
40872
40873  # Now try to locate executable using which
40874  new_path=`$WHICH "$new_path" 2> /dev/null`
40875
40876  if test "x$new_path" = x; then
40877    # Oops. Which didn't find the executable.
40878    # The splitting of arguments from the executable at a space might have been incorrect,
40879    # since paths with space are more likely in Windows. Give it another try with the whole
40880    # argument.
40881    path="$complete"
40882    arguments="EOL"
40883    new_path="$path"
40884
40885  windows_path="$new_path"
40886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40887    unix_path=`$CYGPATH -u "$windows_path"`
40888    new_path="$unix_path"
40889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40891    new_path="$unix_path"
40892  fi
40893
40894
40895    new_path=`$WHICH "$new_path" 2> /dev/null`
40896    # bat and cmd files are not always considered executable in MSYS causing which
40897    # to not find them
40898    if test "x$new_path" = x \
40899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40901      new_path="$path"
40902
40903  windows_path="$new_path"
40904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40905    unix_path=`$CYGPATH -u "$windows_path"`
40906    new_path="$unix_path"
40907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40909    new_path="$unix_path"
40910  fi
40911
40912    fi
40913
40914    if test "x$new_path" = x; then
40915      # It's still not found. Now this is an unrecoverable error.
40916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40917$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40918      has_space=`$ECHO "$complete" | $GREP " "`
40919      if test "x$has_space" != x; then
40920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40922      fi
40923      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40924    fi
40925  fi
40926
40927  # Now new_path has a complete unix path to the binary
40928  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40929    # Keep paths in /bin as-is, but remove trailing .exe if any
40930    new_path="${new_path/%.exe/}"
40931    # Do not save /bin paths to all_fixpath_prefixes!
40932  else
40933    # Not in mixed or Windows style, start by that.
40934    new_path=`cmd //c echo $new_path`
40935
40936  input_path="$new_path"
40937  # Check if we need to convert this using DOS-style short mode. If the path
40938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40939  # take no chances and rewrite it.
40940  # Note: m4 eats our [], so we need to use [ and ] instead.
40941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40942  if test "x$has_forbidden_chars" != x; then
40943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40945  fi
40946
40947    # Output is in $new_path
40948
40949  windows_path="$new_path"
40950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40951    unix_path=`$CYGPATH -u "$windows_path"`
40952    new_path="$unix_path"
40953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40955    new_path="$unix_path"
40956  fi
40957
40958    # remove trailing .exe if any
40959    new_path="${new_path/%.exe/}"
40960
40961    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40962    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40963  fi
40964
40965    else
40966      # We're on a unix platform. Hooray! :)
40967      # First separate the path from the arguments. This will split at the first
40968      # space.
40969      complete="$GNM"
40970      path="${complete%% *}"
40971      tmp="$complete EOL"
40972      arguments="${tmp#* }"
40973
40974      # Cannot rely on the command "which" here since it doesn't always work.
40975      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40976      if test -z "$is_absolute_path"; then
40977        # Path to executable is not absolute. Find it.
40978        IFS_save="$IFS"
40979        IFS=:
40980        for p in $PATH; do
40981          if test -f "$p/$path" && test -x "$p/$path"; then
40982            new_path="$p/$path"
40983            break
40984          fi
40985        done
40986        IFS="$IFS_save"
40987      else
40988        # This is an absolute path, we can use it without further modifications.
40989        new_path="$path"
40990      fi
40991
40992      if test "x$new_path" = x; then
40993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40994$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40995        has_space=`$ECHO "$complete" | $GREP " "`
40996        if test "x$has_space" != x; then
40997          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40998$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40999        fi
41000        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41001      fi
41002    fi
41003
41004    # Now join together the path and the arguments once again
41005    if test "x$arguments" != xEOL; then
41006      new_complete="$new_path ${arguments% *}"
41007    else
41008      new_complete="$new_path"
41009    fi
41010
41011    if test "x$complete" != "x$new_complete"; then
41012      GNM="$new_complete"
41013      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41014$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41015    fi
41016  fi
41017
41018  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41019    # FIXME: we should unify this with the solaris case above.
41020
41021
41022  # Publish this variable in the help.
41023
41024
41025  if [ -z "${STRIP+x}" ]; then
41026    # The variable is not set by user, try to locate tool using the code snippet
41027    if test -n "$ac_tool_prefix"; then
41028  for ac_prog in strip
41029  do
41030    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41033$as_echo_n "checking for $ac_word... " >&6; }
41034if ${ac_cv_prog_STRIP+:} false; then :
41035  $as_echo_n "(cached) " >&6
41036else
41037  if test -n "$STRIP"; then
41038  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41039else
41040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41041for as_dir in $PATH
41042do
41043  IFS=$as_save_IFS
41044  test -z "$as_dir" && as_dir=.
41045    for ac_exec_ext in '' $ac_executable_extensions; do
41046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41047    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41049    break 2
41050  fi
41051done
41052  done
41053IFS=$as_save_IFS
41054
41055fi
41056fi
41057STRIP=$ac_cv_prog_STRIP
41058if test -n "$STRIP"; then
41059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41060$as_echo "$STRIP" >&6; }
41061else
41062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41063$as_echo "no" >&6; }
41064fi
41065
41066
41067    test -n "$STRIP" && break
41068  done
41069fi
41070if test -z "$STRIP"; then
41071  ac_ct_STRIP=$STRIP
41072  for ac_prog in strip
41073do
41074  # Extract the first word of "$ac_prog", so it can be a program name with args.
41075set dummy $ac_prog; ac_word=$2
41076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41077$as_echo_n "checking for $ac_word... " >&6; }
41078if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41079  $as_echo_n "(cached) " >&6
41080else
41081  if test -n "$ac_ct_STRIP"; then
41082  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41083else
41084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41085for as_dir in $PATH
41086do
41087  IFS=$as_save_IFS
41088  test -z "$as_dir" && as_dir=.
41089    for ac_exec_ext in '' $ac_executable_extensions; do
41090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41091    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41093    break 2
41094  fi
41095done
41096  done
41097IFS=$as_save_IFS
41098
41099fi
41100fi
41101ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41102if test -n "$ac_ct_STRIP"; then
41103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41104$as_echo "$ac_ct_STRIP" >&6; }
41105else
41106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41107$as_echo "no" >&6; }
41108fi
41109
41110
41111  test -n "$ac_ct_STRIP" && break
41112done
41113
41114  if test "x$ac_ct_STRIP" = x; then
41115    STRIP=""
41116  else
41117    case $cross_compiling:$ac_tool_warned in
41118yes:)
41119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41121ac_tool_warned=yes ;;
41122esac
41123    STRIP=$ac_ct_STRIP
41124  fi
41125fi
41126
41127  else
41128    # The variable is set, but is it from the command line or the environment?
41129
41130    # Try to remove the string !STRIP! from our list.
41131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41133      # If it failed, the variable was not from the command line. Ignore it,
41134      # but warn the user (except for BASH, which is always set by the calling BASH).
41135      if test "xSTRIP" != xBASH; then
41136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41137$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41138      fi
41139      # Try to locate tool using the code snippet
41140      if test -n "$ac_tool_prefix"; then
41141  for ac_prog in strip
41142  do
41143    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41144set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41146$as_echo_n "checking for $ac_word... " >&6; }
41147if ${ac_cv_prog_STRIP+:} false; then :
41148  $as_echo_n "(cached) " >&6
41149else
41150  if test -n "$STRIP"; then
41151  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41152else
41153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41154for as_dir in $PATH
41155do
41156  IFS=$as_save_IFS
41157  test -z "$as_dir" && as_dir=.
41158    for ac_exec_ext in '' $ac_executable_extensions; do
41159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41160    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41162    break 2
41163  fi
41164done
41165  done
41166IFS=$as_save_IFS
41167
41168fi
41169fi
41170STRIP=$ac_cv_prog_STRIP
41171if test -n "$STRIP"; then
41172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41173$as_echo "$STRIP" >&6; }
41174else
41175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41176$as_echo "no" >&6; }
41177fi
41178
41179
41180    test -n "$STRIP" && break
41181  done
41182fi
41183if test -z "$STRIP"; then
41184  ac_ct_STRIP=$STRIP
41185  for ac_prog in strip
41186do
41187  # Extract the first word of "$ac_prog", so it can be a program name with args.
41188set dummy $ac_prog; ac_word=$2
41189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41190$as_echo_n "checking for $ac_word... " >&6; }
41191if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41192  $as_echo_n "(cached) " >&6
41193else
41194  if test -n "$ac_ct_STRIP"; then
41195  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41196else
41197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41198for as_dir in $PATH
41199do
41200  IFS=$as_save_IFS
41201  test -z "$as_dir" && as_dir=.
41202    for ac_exec_ext in '' $ac_executable_extensions; do
41203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41204    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41206    break 2
41207  fi
41208done
41209  done
41210IFS=$as_save_IFS
41211
41212fi
41213fi
41214ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41215if test -n "$ac_ct_STRIP"; then
41216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41217$as_echo "$ac_ct_STRIP" >&6; }
41218else
41219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41220$as_echo "no" >&6; }
41221fi
41222
41223
41224  test -n "$ac_ct_STRIP" && break
41225done
41226
41227  if test "x$ac_ct_STRIP" = x; then
41228    STRIP=""
41229  else
41230    case $cross_compiling:$ac_tool_warned in
41231yes:)
41232{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41233$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41234ac_tool_warned=yes ;;
41235esac
41236    STRIP=$ac_ct_STRIP
41237  fi
41238fi
41239
41240    else
41241      # If it succeeded, then it was overridden by the user. We will use it
41242      # for the tool.
41243
41244      # First remove it from the list of overridden variables, so we can test
41245      # for unknown variables in the end.
41246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41247
41248      # Check if we try to supply an empty value
41249      if test "x$STRIP" = x; then
41250        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41251$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41252        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41253$as_echo_n "checking for STRIP... " >&6; }
41254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41255$as_echo "disabled" >&6; }
41256      else
41257        # Check if the provided tool contains a complete path.
41258        tool_specified="$STRIP"
41259        tool_basename="${tool_specified##*/}"
41260        if test "x$tool_basename" = "x$tool_specified"; then
41261          # A command without a complete path is provided, search $PATH.
41262          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41263$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41264          # Extract the first word of "$tool_basename", so it can be a program name with args.
41265set dummy $tool_basename; ac_word=$2
41266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41267$as_echo_n "checking for $ac_word... " >&6; }
41268if ${ac_cv_path_STRIP+:} false; then :
41269  $as_echo_n "(cached) " >&6
41270else
41271  case $STRIP in
41272  [\\/]* | ?:[\\/]*)
41273  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41274  ;;
41275  *)
41276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41277for as_dir in $PATH
41278do
41279  IFS=$as_save_IFS
41280  test -z "$as_dir" && as_dir=.
41281    for ac_exec_ext in '' $ac_executable_extensions; do
41282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41283    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41285    break 2
41286  fi
41287done
41288  done
41289IFS=$as_save_IFS
41290
41291  ;;
41292esac
41293fi
41294STRIP=$ac_cv_path_STRIP
41295if test -n "$STRIP"; then
41296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41297$as_echo "$STRIP" >&6; }
41298else
41299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41300$as_echo "no" >&6; }
41301fi
41302
41303
41304          if test "x$STRIP" = x; then
41305            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41306          fi
41307        else
41308          # Otherwise we believe it is a complete path. Use it as it is.
41309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41310$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41311          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41312$as_echo_n "checking for STRIP... " >&6; }
41313          if test ! -x "$tool_specified"; then
41314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41315$as_echo "not found" >&6; }
41316            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41317          fi
41318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41319$as_echo "$tool_specified" >&6; }
41320        fi
41321      fi
41322    fi
41323
41324  fi
41325
41326
41327
41328  # Only process if variable expands to non-empty
41329
41330  if test "x$STRIP" != x; then
41331    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41332
41333  # First separate the path from the arguments. This will split at the first
41334  # space.
41335  complete="$STRIP"
41336  path="${complete%% *}"
41337  tmp="$complete EOL"
41338  arguments="${tmp#* }"
41339
41340  # Input might be given as Windows format, start by converting to
41341  # unix format.
41342  new_path=`$CYGPATH -u "$path"`
41343
41344  # Now try to locate executable using which
41345  new_path=`$WHICH "$new_path" 2> /dev/null`
41346  # bat and cmd files are not always considered executable in cygwin causing which
41347  # to not find them
41348  if test "x$new_path" = x \
41349      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41350      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41351    new_path=`$CYGPATH -u "$path"`
41352  fi
41353  if test "x$new_path" = x; then
41354    # Oops. Which didn't find the executable.
41355    # The splitting of arguments from the executable at a space might have been incorrect,
41356    # since paths with space are more likely in Windows. Give it another try with the whole
41357    # argument.
41358    path="$complete"
41359    arguments="EOL"
41360    new_path=`$CYGPATH -u "$path"`
41361    new_path=`$WHICH "$new_path" 2> /dev/null`
41362    # bat and cmd files are not always considered executable in cygwin causing which
41363    # to not find them
41364    if test "x$new_path" = x \
41365        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41366        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41367      new_path=`$CYGPATH -u "$path"`
41368    fi
41369    if test "x$new_path" = x; then
41370      # It's still not found. Now this is an unrecoverable error.
41371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41372$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41373      has_space=`$ECHO "$complete" | $GREP " "`
41374      if test "x$has_space" != x; then
41375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41377      fi
41378      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41379    fi
41380  fi
41381
41382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41385  # "foo.exe" is OK but "foo" is an error.
41386  #
41387  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41388  # It is also a way to make sure we got the proper file name for the real test later on.
41389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41390  if test "x$test_shortpath" = x; then
41391    # Short path failed, file does not exist as specified.
41392    # Try adding .exe or .cmd
41393    if test -f "${new_path}.exe"; then
41394      input_to_shortpath="${new_path}.exe"
41395    elif test -f "${new_path}.cmd"; then
41396      input_to_shortpath="${new_path}.cmd"
41397    else
41398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41399$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41400      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41401$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41402      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41403    fi
41404  else
41405    input_to_shortpath="$new_path"
41406  fi
41407
41408  # Call helper function which possibly converts this using DOS-style short mode.
41409  # If so, the updated path is stored in $new_path.
41410  new_path="$input_to_shortpath"
41411
41412  input_path="$input_to_shortpath"
41413  # Check if we need to convert this using DOS-style short mode. If the path
41414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41415  # take no chances and rewrite it.
41416  # Note: m4 eats our [], so we need to use [ and ] instead.
41417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41418  if test "x$has_forbidden_chars" != x; then
41419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41423      # Going to short mode and back again did indeed matter. Since short mode is
41424      # case insensitive, let's make it lowercase to improve readability.
41425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41426      # Now convert it back to Unix-style (cygpath)
41427      input_path=`$CYGPATH -u "$shortmode_path"`
41428      new_path="$input_path"
41429    fi
41430  fi
41431
41432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41433  if test "x$test_cygdrive_prefix" = x; then
41434    # As a simple fix, exclude /usr/bin since it's not a real path.
41435    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41437      # a path prefixed by /cygdrive for fixpath to work.
41438      new_path="$CYGWIN_ROOT_PATH$input_path"
41439    fi
41440  fi
41441
41442  # remove trailing .exe if any
41443  new_path="${new_path/%.exe/}"
41444
41445    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41446
41447  # First separate the path from the arguments. This will split at the first
41448  # space.
41449  complete="$STRIP"
41450  path="${complete%% *}"
41451  tmp="$complete EOL"
41452  arguments="${tmp#* }"
41453
41454  # Input might be given as Windows format, start by converting to
41455  # unix format.
41456  new_path="$path"
41457
41458  windows_path="$new_path"
41459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41460    unix_path=`$CYGPATH -u "$windows_path"`
41461    new_path="$unix_path"
41462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41464    new_path="$unix_path"
41465  fi
41466
41467
41468  # Now try to locate executable using which
41469  new_path=`$WHICH "$new_path" 2> /dev/null`
41470
41471  if test "x$new_path" = x; then
41472    # Oops. Which didn't find the executable.
41473    # The splitting of arguments from the executable at a space might have been incorrect,
41474    # since paths with space are more likely in Windows. Give it another try with the whole
41475    # argument.
41476    path="$complete"
41477    arguments="EOL"
41478    new_path="$path"
41479
41480  windows_path="$new_path"
41481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41482    unix_path=`$CYGPATH -u "$windows_path"`
41483    new_path="$unix_path"
41484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41486    new_path="$unix_path"
41487  fi
41488
41489
41490    new_path=`$WHICH "$new_path" 2> /dev/null`
41491    # bat and cmd files are not always considered executable in MSYS causing which
41492    # to not find them
41493    if test "x$new_path" = x \
41494        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41495        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41496      new_path="$path"
41497
41498  windows_path="$new_path"
41499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41500    unix_path=`$CYGPATH -u "$windows_path"`
41501    new_path="$unix_path"
41502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41504    new_path="$unix_path"
41505  fi
41506
41507    fi
41508
41509    if test "x$new_path" = x; then
41510      # It's still not found. Now this is an unrecoverable error.
41511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41512$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41513      has_space=`$ECHO "$complete" | $GREP " "`
41514      if test "x$has_space" != x; then
41515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41517      fi
41518      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41519    fi
41520  fi
41521
41522  # Now new_path has a complete unix path to the binary
41523  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41524    # Keep paths in /bin as-is, but remove trailing .exe if any
41525    new_path="${new_path/%.exe/}"
41526    # Do not save /bin paths to all_fixpath_prefixes!
41527  else
41528    # Not in mixed or Windows style, start by that.
41529    new_path=`cmd //c echo $new_path`
41530
41531  input_path="$new_path"
41532  # Check if we need to convert this using DOS-style short mode. If the path
41533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41534  # take no chances and rewrite it.
41535  # Note: m4 eats our [], so we need to use [ and ] instead.
41536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41537  if test "x$has_forbidden_chars" != x; then
41538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41540  fi
41541
41542    # Output is in $new_path
41543
41544  windows_path="$new_path"
41545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41546    unix_path=`$CYGPATH -u "$windows_path"`
41547    new_path="$unix_path"
41548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41550    new_path="$unix_path"
41551  fi
41552
41553    # remove trailing .exe if any
41554    new_path="${new_path/%.exe/}"
41555
41556    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41557    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41558  fi
41559
41560    else
41561      # We're on a unix platform. Hooray! :)
41562      # First separate the path from the arguments. This will split at the first
41563      # space.
41564      complete="$STRIP"
41565      path="${complete%% *}"
41566      tmp="$complete EOL"
41567      arguments="${tmp#* }"
41568
41569      # Cannot rely on the command "which" here since it doesn't always work.
41570      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41571      if test -z "$is_absolute_path"; then
41572        # Path to executable is not absolute. Find it.
41573        IFS_save="$IFS"
41574        IFS=:
41575        for p in $PATH; do
41576          if test -f "$p/$path" && test -x "$p/$path"; then
41577            new_path="$p/$path"
41578            break
41579          fi
41580        done
41581        IFS="$IFS_save"
41582      else
41583        # This is an absolute path, we can use it without further modifications.
41584        new_path="$path"
41585      fi
41586
41587      if test "x$new_path" = x; then
41588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41589$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41590        has_space=`$ECHO "$complete" | $GREP " "`
41591        if test "x$has_space" != x; then
41592          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41593$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41594        fi
41595        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41596      fi
41597    fi
41598
41599    # Now join together the path and the arguments once again
41600    if test "x$arguments" != xEOL; then
41601      new_complete="$new_path ${arguments% *}"
41602    else
41603      new_complete="$new_path"
41604    fi
41605
41606    if test "x$complete" != "x$new_complete"; then
41607      STRIP="$new_complete"
41608      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41609$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41610    fi
41611  fi
41612
41613    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41614
41615
41616  # Publish this variable in the help.
41617
41618
41619  if [ -z "${NM+x}" ]; then
41620    # The variable is not set by user, try to locate tool using the code snippet
41621    if test -n "$ac_tool_prefix"; then
41622  for ac_prog in nm gcc-nm
41623  do
41624    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41625set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41627$as_echo_n "checking for $ac_word... " >&6; }
41628if ${ac_cv_prog_NM+:} false; then :
41629  $as_echo_n "(cached) " >&6
41630else
41631  if test -n "$NM"; then
41632  ac_cv_prog_NM="$NM" # Let the user override the test.
41633else
41634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41635for as_dir in $PATH
41636do
41637  IFS=$as_save_IFS
41638  test -z "$as_dir" && as_dir=.
41639    for ac_exec_ext in '' $ac_executable_extensions; do
41640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41641    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41643    break 2
41644  fi
41645done
41646  done
41647IFS=$as_save_IFS
41648
41649fi
41650fi
41651NM=$ac_cv_prog_NM
41652if test -n "$NM"; then
41653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41654$as_echo "$NM" >&6; }
41655else
41656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41657$as_echo "no" >&6; }
41658fi
41659
41660
41661    test -n "$NM" && break
41662  done
41663fi
41664if test -z "$NM"; then
41665  ac_ct_NM=$NM
41666  for ac_prog in nm gcc-nm
41667do
41668  # Extract the first word of "$ac_prog", so it can be a program name with args.
41669set dummy $ac_prog; ac_word=$2
41670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41671$as_echo_n "checking for $ac_word... " >&6; }
41672if ${ac_cv_prog_ac_ct_NM+:} false; then :
41673  $as_echo_n "(cached) " >&6
41674else
41675  if test -n "$ac_ct_NM"; then
41676  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41677else
41678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41679for as_dir in $PATH
41680do
41681  IFS=$as_save_IFS
41682  test -z "$as_dir" && as_dir=.
41683    for ac_exec_ext in '' $ac_executable_extensions; do
41684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41685    ac_cv_prog_ac_ct_NM="$ac_prog"
41686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41687    break 2
41688  fi
41689done
41690  done
41691IFS=$as_save_IFS
41692
41693fi
41694fi
41695ac_ct_NM=$ac_cv_prog_ac_ct_NM
41696if test -n "$ac_ct_NM"; then
41697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41698$as_echo "$ac_ct_NM" >&6; }
41699else
41700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41701$as_echo "no" >&6; }
41702fi
41703
41704
41705  test -n "$ac_ct_NM" && break
41706done
41707
41708  if test "x$ac_ct_NM" = x; then
41709    NM=""
41710  else
41711    case $cross_compiling:$ac_tool_warned in
41712yes:)
41713{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41714$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41715ac_tool_warned=yes ;;
41716esac
41717    NM=$ac_ct_NM
41718  fi
41719fi
41720
41721  else
41722    # The variable is set, but is it from the command line or the environment?
41723
41724    # Try to remove the string !NM! from our list.
41725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41727      # If it failed, the variable was not from the command line. Ignore it,
41728      # but warn the user (except for BASH, which is always set by the calling BASH).
41729      if test "xNM" != xBASH; then
41730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41731$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41732      fi
41733      # Try to locate tool using the code snippet
41734      if test -n "$ac_tool_prefix"; then
41735  for ac_prog in nm gcc-nm
41736  do
41737    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41738set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41740$as_echo_n "checking for $ac_word... " >&6; }
41741if ${ac_cv_prog_NM+:} false; then :
41742  $as_echo_n "(cached) " >&6
41743else
41744  if test -n "$NM"; then
41745  ac_cv_prog_NM="$NM" # Let the user override the test.
41746else
41747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41748for as_dir in $PATH
41749do
41750  IFS=$as_save_IFS
41751  test -z "$as_dir" && as_dir=.
41752    for ac_exec_ext in '' $ac_executable_extensions; do
41753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41754    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41756    break 2
41757  fi
41758done
41759  done
41760IFS=$as_save_IFS
41761
41762fi
41763fi
41764NM=$ac_cv_prog_NM
41765if test -n "$NM"; then
41766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41767$as_echo "$NM" >&6; }
41768else
41769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41770$as_echo "no" >&6; }
41771fi
41772
41773
41774    test -n "$NM" && break
41775  done
41776fi
41777if test -z "$NM"; then
41778  ac_ct_NM=$NM
41779  for ac_prog in nm gcc-nm
41780do
41781  # Extract the first word of "$ac_prog", so it can be a program name with args.
41782set dummy $ac_prog; ac_word=$2
41783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41784$as_echo_n "checking for $ac_word... " >&6; }
41785if ${ac_cv_prog_ac_ct_NM+:} false; then :
41786  $as_echo_n "(cached) " >&6
41787else
41788  if test -n "$ac_ct_NM"; then
41789  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41790else
41791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41792for as_dir in $PATH
41793do
41794  IFS=$as_save_IFS
41795  test -z "$as_dir" && as_dir=.
41796    for ac_exec_ext in '' $ac_executable_extensions; do
41797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41798    ac_cv_prog_ac_ct_NM="$ac_prog"
41799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41800    break 2
41801  fi
41802done
41803  done
41804IFS=$as_save_IFS
41805
41806fi
41807fi
41808ac_ct_NM=$ac_cv_prog_ac_ct_NM
41809if test -n "$ac_ct_NM"; then
41810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41811$as_echo "$ac_ct_NM" >&6; }
41812else
41813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41814$as_echo "no" >&6; }
41815fi
41816
41817
41818  test -n "$ac_ct_NM" && break
41819done
41820
41821  if test "x$ac_ct_NM" = x; then
41822    NM=""
41823  else
41824    case $cross_compiling:$ac_tool_warned in
41825yes:)
41826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41828ac_tool_warned=yes ;;
41829esac
41830    NM=$ac_ct_NM
41831  fi
41832fi
41833
41834    else
41835      # If it succeeded, then it was overridden by the user. We will use it
41836      # for the tool.
41837
41838      # First remove it from the list of overridden variables, so we can test
41839      # for unknown variables in the end.
41840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41841
41842      # Check if we try to supply an empty value
41843      if test "x$NM" = x; then
41844        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41845$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41846        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41847$as_echo_n "checking for NM... " >&6; }
41848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41849$as_echo "disabled" >&6; }
41850      else
41851        # Check if the provided tool contains a complete path.
41852        tool_specified="$NM"
41853        tool_basename="${tool_specified##*/}"
41854        if test "x$tool_basename" = "x$tool_specified"; then
41855          # A command without a complete path is provided, search $PATH.
41856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41857$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41858          # Extract the first word of "$tool_basename", so it can be a program name with args.
41859set dummy $tool_basename; ac_word=$2
41860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41861$as_echo_n "checking for $ac_word... " >&6; }
41862if ${ac_cv_path_NM+:} false; then :
41863  $as_echo_n "(cached) " >&6
41864else
41865  case $NM in
41866  [\\/]* | ?:[\\/]*)
41867  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41868  ;;
41869  *)
41870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41871for as_dir in $PATH
41872do
41873  IFS=$as_save_IFS
41874  test -z "$as_dir" && as_dir=.
41875    for ac_exec_ext in '' $ac_executable_extensions; do
41876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41877    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41879    break 2
41880  fi
41881done
41882  done
41883IFS=$as_save_IFS
41884
41885  ;;
41886esac
41887fi
41888NM=$ac_cv_path_NM
41889if test -n "$NM"; then
41890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41891$as_echo "$NM" >&6; }
41892else
41893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41894$as_echo "no" >&6; }
41895fi
41896
41897
41898          if test "x$NM" = x; then
41899            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41900          fi
41901        else
41902          # Otherwise we believe it is a complete path. Use it as it is.
41903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41904$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41905          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41906$as_echo_n "checking for NM... " >&6; }
41907          if test ! -x "$tool_specified"; then
41908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41909$as_echo "not found" >&6; }
41910            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41911          fi
41912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41913$as_echo "$tool_specified" >&6; }
41914        fi
41915      fi
41916    fi
41917
41918  fi
41919
41920
41921    else
41922
41923
41924  # Publish this variable in the help.
41925
41926
41927  if [ -z "${NM+x}" ]; then
41928    # The variable is not set by user, try to locate tool using the code snippet
41929    if test -n "$ac_tool_prefix"; then
41930  for ac_prog in nm
41931  do
41932    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41933set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41935$as_echo_n "checking for $ac_word... " >&6; }
41936if ${ac_cv_prog_NM+:} false; then :
41937  $as_echo_n "(cached) " >&6
41938else
41939  if test -n "$NM"; then
41940  ac_cv_prog_NM="$NM" # Let the user override the test.
41941else
41942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41943for as_dir in $PATH
41944do
41945  IFS=$as_save_IFS
41946  test -z "$as_dir" && as_dir=.
41947    for ac_exec_ext in '' $ac_executable_extensions; do
41948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41949    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41951    break 2
41952  fi
41953done
41954  done
41955IFS=$as_save_IFS
41956
41957fi
41958fi
41959NM=$ac_cv_prog_NM
41960if test -n "$NM"; then
41961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41962$as_echo "$NM" >&6; }
41963else
41964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41965$as_echo "no" >&6; }
41966fi
41967
41968
41969    test -n "$NM" && break
41970  done
41971fi
41972if test -z "$NM"; then
41973  ac_ct_NM=$NM
41974  for ac_prog in nm
41975do
41976  # Extract the first word of "$ac_prog", so it can be a program name with args.
41977set dummy $ac_prog; ac_word=$2
41978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41979$as_echo_n "checking for $ac_word... " >&6; }
41980if ${ac_cv_prog_ac_ct_NM+:} false; then :
41981  $as_echo_n "(cached) " >&6
41982else
41983  if test -n "$ac_ct_NM"; then
41984  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41985else
41986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41987for as_dir in $PATH
41988do
41989  IFS=$as_save_IFS
41990  test -z "$as_dir" && as_dir=.
41991    for ac_exec_ext in '' $ac_executable_extensions; do
41992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41993    ac_cv_prog_ac_ct_NM="$ac_prog"
41994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41995    break 2
41996  fi
41997done
41998  done
41999IFS=$as_save_IFS
42000
42001fi
42002fi
42003ac_ct_NM=$ac_cv_prog_ac_ct_NM
42004if test -n "$ac_ct_NM"; then
42005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42006$as_echo "$ac_ct_NM" >&6; }
42007else
42008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42009$as_echo "no" >&6; }
42010fi
42011
42012
42013  test -n "$ac_ct_NM" && break
42014done
42015
42016  if test "x$ac_ct_NM" = x; then
42017    NM=""
42018  else
42019    case $cross_compiling:$ac_tool_warned in
42020yes:)
42021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42023ac_tool_warned=yes ;;
42024esac
42025    NM=$ac_ct_NM
42026  fi
42027fi
42028
42029  else
42030    # The variable is set, but is it from the command line or the environment?
42031
42032    # Try to remove the string !NM! from our list.
42033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42035      # If it failed, the variable was not from the command line. Ignore it,
42036      # but warn the user (except for BASH, which is always set by the calling BASH).
42037      if test "xNM" != xBASH; then
42038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42039$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42040      fi
42041      # Try to locate tool using the code snippet
42042      if test -n "$ac_tool_prefix"; then
42043  for ac_prog in nm
42044  do
42045    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42048$as_echo_n "checking for $ac_word... " >&6; }
42049if ${ac_cv_prog_NM+:} false; then :
42050  $as_echo_n "(cached) " >&6
42051else
42052  if test -n "$NM"; then
42053  ac_cv_prog_NM="$NM" # Let the user override the test.
42054else
42055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42056for as_dir in $PATH
42057do
42058  IFS=$as_save_IFS
42059  test -z "$as_dir" && as_dir=.
42060    for ac_exec_ext in '' $ac_executable_extensions; do
42061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42062    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42064    break 2
42065  fi
42066done
42067  done
42068IFS=$as_save_IFS
42069
42070fi
42071fi
42072NM=$ac_cv_prog_NM
42073if test -n "$NM"; then
42074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42075$as_echo "$NM" >&6; }
42076else
42077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42078$as_echo "no" >&6; }
42079fi
42080
42081
42082    test -n "$NM" && break
42083  done
42084fi
42085if test -z "$NM"; then
42086  ac_ct_NM=$NM
42087  for ac_prog in nm
42088do
42089  # Extract the first word of "$ac_prog", so it can be a program name with args.
42090set dummy $ac_prog; ac_word=$2
42091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42092$as_echo_n "checking for $ac_word... " >&6; }
42093if ${ac_cv_prog_ac_ct_NM+:} false; then :
42094  $as_echo_n "(cached) " >&6
42095else
42096  if test -n "$ac_ct_NM"; then
42097  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42098else
42099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42100for as_dir in $PATH
42101do
42102  IFS=$as_save_IFS
42103  test -z "$as_dir" && as_dir=.
42104    for ac_exec_ext in '' $ac_executable_extensions; do
42105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42106    ac_cv_prog_ac_ct_NM="$ac_prog"
42107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42108    break 2
42109  fi
42110done
42111  done
42112IFS=$as_save_IFS
42113
42114fi
42115fi
42116ac_ct_NM=$ac_cv_prog_ac_ct_NM
42117if test -n "$ac_ct_NM"; then
42118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42119$as_echo "$ac_ct_NM" >&6; }
42120else
42121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42122$as_echo "no" >&6; }
42123fi
42124
42125
42126  test -n "$ac_ct_NM" && break
42127done
42128
42129  if test "x$ac_ct_NM" = x; then
42130    NM=""
42131  else
42132    case $cross_compiling:$ac_tool_warned in
42133yes:)
42134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42136ac_tool_warned=yes ;;
42137esac
42138    NM=$ac_ct_NM
42139  fi
42140fi
42141
42142    else
42143      # If it succeeded, then it was overridden by the user. We will use it
42144      # for the tool.
42145
42146      # First remove it from the list of overridden variables, so we can test
42147      # for unknown variables in the end.
42148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42149
42150      # Check if we try to supply an empty value
42151      if test "x$NM" = x; then
42152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42153$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42155$as_echo_n "checking for NM... " >&6; }
42156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42157$as_echo "disabled" >&6; }
42158      else
42159        # Check if the provided tool contains a complete path.
42160        tool_specified="$NM"
42161        tool_basename="${tool_specified##*/}"
42162        if test "x$tool_basename" = "x$tool_specified"; then
42163          # A command without a complete path is provided, search $PATH.
42164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42165$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42166          # Extract the first word of "$tool_basename", so it can be a program name with args.
42167set dummy $tool_basename; ac_word=$2
42168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42169$as_echo_n "checking for $ac_word... " >&6; }
42170if ${ac_cv_path_NM+:} false; then :
42171  $as_echo_n "(cached) " >&6
42172else
42173  case $NM in
42174  [\\/]* | ?:[\\/]*)
42175  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42176  ;;
42177  *)
42178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42179for as_dir in $PATH
42180do
42181  IFS=$as_save_IFS
42182  test -z "$as_dir" && as_dir=.
42183    for ac_exec_ext in '' $ac_executable_extensions; do
42184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42185    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42187    break 2
42188  fi
42189done
42190  done
42191IFS=$as_save_IFS
42192
42193  ;;
42194esac
42195fi
42196NM=$ac_cv_path_NM
42197if test -n "$NM"; then
42198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42199$as_echo "$NM" >&6; }
42200else
42201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42202$as_echo "no" >&6; }
42203fi
42204
42205
42206          if test "x$NM" = x; then
42207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42208          fi
42209        else
42210          # Otherwise we believe it is a complete path. Use it as it is.
42211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42212$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42214$as_echo_n "checking for NM... " >&6; }
42215          if test ! -x "$tool_specified"; then
42216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42217$as_echo "not found" >&6; }
42218            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42219          fi
42220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42221$as_echo "$tool_specified" >&6; }
42222        fi
42223      fi
42224    fi
42225
42226  fi
42227
42228
42229    fi
42230
42231  # Only process if variable expands to non-empty
42232
42233  if test "x$NM" != x; then
42234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42235
42236  # First separate the path from the arguments. This will split at the first
42237  # space.
42238  complete="$NM"
42239  path="${complete%% *}"
42240  tmp="$complete EOL"
42241  arguments="${tmp#* }"
42242
42243  # Input might be given as Windows format, start by converting to
42244  # unix format.
42245  new_path=`$CYGPATH -u "$path"`
42246
42247  # Now try to locate executable using which
42248  new_path=`$WHICH "$new_path" 2> /dev/null`
42249  # bat and cmd files are not always considered executable in cygwin causing which
42250  # to not find them
42251  if test "x$new_path" = x \
42252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42254    new_path=`$CYGPATH -u "$path"`
42255  fi
42256  if test "x$new_path" = x; then
42257    # Oops. Which didn't find the executable.
42258    # The splitting of arguments from the executable at a space might have been incorrect,
42259    # since paths with space are more likely in Windows. Give it another try with the whole
42260    # argument.
42261    path="$complete"
42262    arguments="EOL"
42263    new_path=`$CYGPATH -u "$path"`
42264    new_path=`$WHICH "$new_path" 2> /dev/null`
42265    # bat and cmd files are not always considered executable in cygwin causing which
42266    # to not find them
42267    if test "x$new_path" = x \
42268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42270      new_path=`$CYGPATH -u "$path"`
42271    fi
42272    if test "x$new_path" = x; then
42273      # It's still not found. Now this is an unrecoverable error.
42274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42275$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42276      has_space=`$ECHO "$complete" | $GREP " "`
42277      if test "x$has_space" != x; then
42278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42280      fi
42281      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42282    fi
42283  fi
42284
42285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42288  # "foo.exe" is OK but "foo" is an error.
42289  #
42290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42291  # It is also a way to make sure we got the proper file name for the real test later on.
42292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42293  if test "x$test_shortpath" = x; then
42294    # Short path failed, file does not exist as specified.
42295    # Try adding .exe or .cmd
42296    if test -f "${new_path}.exe"; then
42297      input_to_shortpath="${new_path}.exe"
42298    elif test -f "${new_path}.cmd"; then
42299      input_to_shortpath="${new_path}.cmd"
42300    else
42301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42302$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42305      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42306    fi
42307  else
42308    input_to_shortpath="$new_path"
42309  fi
42310
42311  # Call helper function which possibly converts this using DOS-style short mode.
42312  # If so, the updated path is stored in $new_path.
42313  new_path="$input_to_shortpath"
42314
42315  input_path="$input_to_shortpath"
42316  # Check if we need to convert this using DOS-style short mode. If the path
42317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42318  # take no chances and rewrite it.
42319  # Note: m4 eats our [], so we need to use [ and ] instead.
42320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42321  if test "x$has_forbidden_chars" != x; then
42322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42326      # Going to short mode and back again did indeed matter. Since short mode is
42327      # case insensitive, let's make it lowercase to improve readability.
42328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42329      # Now convert it back to Unix-style (cygpath)
42330      input_path=`$CYGPATH -u "$shortmode_path"`
42331      new_path="$input_path"
42332    fi
42333  fi
42334
42335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42336  if test "x$test_cygdrive_prefix" = x; then
42337    # As a simple fix, exclude /usr/bin since it's not a real path.
42338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42340      # a path prefixed by /cygdrive for fixpath to work.
42341      new_path="$CYGWIN_ROOT_PATH$input_path"
42342    fi
42343  fi
42344
42345  # remove trailing .exe if any
42346  new_path="${new_path/%.exe/}"
42347
42348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42349
42350  # First separate the path from the arguments. This will split at the first
42351  # space.
42352  complete="$NM"
42353  path="${complete%% *}"
42354  tmp="$complete EOL"
42355  arguments="${tmp#* }"
42356
42357  # Input might be given as Windows format, start by converting to
42358  # unix format.
42359  new_path="$path"
42360
42361  windows_path="$new_path"
42362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42363    unix_path=`$CYGPATH -u "$windows_path"`
42364    new_path="$unix_path"
42365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42367    new_path="$unix_path"
42368  fi
42369
42370
42371  # Now try to locate executable using which
42372  new_path=`$WHICH "$new_path" 2> /dev/null`
42373
42374  if test "x$new_path" = x; then
42375    # Oops. Which didn't find the executable.
42376    # The splitting of arguments from the executable at a space might have been incorrect,
42377    # since paths with space are more likely in Windows. Give it another try with the whole
42378    # argument.
42379    path="$complete"
42380    arguments="EOL"
42381    new_path="$path"
42382
42383  windows_path="$new_path"
42384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42385    unix_path=`$CYGPATH -u "$windows_path"`
42386    new_path="$unix_path"
42387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42389    new_path="$unix_path"
42390  fi
42391
42392
42393    new_path=`$WHICH "$new_path" 2> /dev/null`
42394    # bat and cmd files are not always considered executable in MSYS causing which
42395    # to not find them
42396    if test "x$new_path" = x \
42397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42399      new_path="$path"
42400
42401  windows_path="$new_path"
42402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42403    unix_path=`$CYGPATH -u "$windows_path"`
42404    new_path="$unix_path"
42405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42407    new_path="$unix_path"
42408  fi
42409
42410    fi
42411
42412    if test "x$new_path" = x; then
42413      # It's still not found. Now this is an unrecoverable error.
42414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42415$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42416      has_space=`$ECHO "$complete" | $GREP " "`
42417      if test "x$has_space" != x; then
42418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42420      fi
42421      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42422    fi
42423  fi
42424
42425  # Now new_path has a complete unix path to the binary
42426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42427    # Keep paths in /bin as-is, but remove trailing .exe if any
42428    new_path="${new_path/%.exe/}"
42429    # Do not save /bin paths to all_fixpath_prefixes!
42430  else
42431    # Not in mixed or Windows style, start by that.
42432    new_path=`cmd //c echo $new_path`
42433
42434  input_path="$new_path"
42435  # Check if we need to convert this using DOS-style short mode. If the path
42436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42437  # take no chances and rewrite it.
42438  # Note: m4 eats our [], so we need to use [ and ] instead.
42439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42440  if test "x$has_forbidden_chars" != x; then
42441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42443  fi
42444
42445    # Output is in $new_path
42446
42447  windows_path="$new_path"
42448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42449    unix_path=`$CYGPATH -u "$windows_path"`
42450    new_path="$unix_path"
42451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42453    new_path="$unix_path"
42454  fi
42455
42456    # remove trailing .exe if any
42457    new_path="${new_path/%.exe/}"
42458
42459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42461  fi
42462
42463    else
42464      # We're on a unix platform. Hooray! :)
42465      # First separate the path from the arguments. This will split at the first
42466      # space.
42467      complete="$NM"
42468      path="${complete%% *}"
42469      tmp="$complete EOL"
42470      arguments="${tmp#* }"
42471
42472      # Cannot rely on the command "which" here since it doesn't always work.
42473      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42474      if test -z "$is_absolute_path"; then
42475        # Path to executable is not absolute. Find it.
42476        IFS_save="$IFS"
42477        IFS=:
42478        for p in $PATH; do
42479          if test -f "$p/$path" && test -x "$p/$path"; then
42480            new_path="$p/$path"
42481            break
42482          fi
42483        done
42484        IFS="$IFS_save"
42485      else
42486        # This is an absolute path, we can use it without further modifications.
42487        new_path="$path"
42488      fi
42489
42490      if test "x$new_path" = x; then
42491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42492$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42493        has_space=`$ECHO "$complete" | $GREP " "`
42494        if test "x$has_space" != x; then
42495          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42497        fi
42498        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42499      fi
42500    fi
42501
42502    # Now join together the path and the arguments once again
42503    if test "x$arguments" != xEOL; then
42504      new_complete="$new_path ${arguments% *}"
42505    else
42506      new_complete="$new_path"
42507    fi
42508
42509    if test "x$complete" != "x$new_complete"; then
42510      NM="$new_complete"
42511      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42512$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42513    fi
42514  fi
42515
42516    GNM="$NM"
42517
42518  fi
42519
42520  # objcopy is used for moving debug symbols to separate files when
42521  # full debug symbols are enabled.
42522  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42523
42524
42525  # Publish this variable in the help.
42526
42527
42528  if [ -z "${OBJCOPY+x}" ]; then
42529    # The variable is not set by user, try to locate tool using the code snippet
42530    if test -n "$ac_tool_prefix"; then
42531  for ac_prog in gobjcopy objcopy
42532  do
42533    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42534set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42536$as_echo_n "checking for $ac_word... " >&6; }
42537if ${ac_cv_prog_OBJCOPY+:} false; then :
42538  $as_echo_n "(cached) " >&6
42539else
42540  if test -n "$OBJCOPY"; then
42541  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42542else
42543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42544for as_dir in $PATH
42545do
42546  IFS=$as_save_IFS
42547  test -z "$as_dir" && as_dir=.
42548    for ac_exec_ext in '' $ac_executable_extensions; do
42549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42550    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42552    break 2
42553  fi
42554done
42555  done
42556IFS=$as_save_IFS
42557
42558fi
42559fi
42560OBJCOPY=$ac_cv_prog_OBJCOPY
42561if test -n "$OBJCOPY"; then
42562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42563$as_echo "$OBJCOPY" >&6; }
42564else
42565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42566$as_echo "no" >&6; }
42567fi
42568
42569
42570    test -n "$OBJCOPY" && break
42571  done
42572fi
42573if test -z "$OBJCOPY"; then
42574  ac_ct_OBJCOPY=$OBJCOPY
42575  for ac_prog in gobjcopy objcopy
42576do
42577  # Extract the first word of "$ac_prog", so it can be a program name with args.
42578set dummy $ac_prog; ac_word=$2
42579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42580$as_echo_n "checking for $ac_word... " >&6; }
42581if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42582  $as_echo_n "(cached) " >&6
42583else
42584  if test -n "$ac_ct_OBJCOPY"; then
42585  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42586else
42587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42588for as_dir in $PATH
42589do
42590  IFS=$as_save_IFS
42591  test -z "$as_dir" && as_dir=.
42592    for ac_exec_ext in '' $ac_executable_extensions; do
42593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42594    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42596    break 2
42597  fi
42598done
42599  done
42600IFS=$as_save_IFS
42601
42602fi
42603fi
42604ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42605if test -n "$ac_ct_OBJCOPY"; then
42606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42607$as_echo "$ac_ct_OBJCOPY" >&6; }
42608else
42609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42610$as_echo "no" >&6; }
42611fi
42612
42613
42614  test -n "$ac_ct_OBJCOPY" && break
42615done
42616
42617  if test "x$ac_ct_OBJCOPY" = x; then
42618    OBJCOPY=""
42619  else
42620    case $cross_compiling:$ac_tool_warned in
42621yes:)
42622{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42623$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42624ac_tool_warned=yes ;;
42625esac
42626    OBJCOPY=$ac_ct_OBJCOPY
42627  fi
42628fi
42629
42630  else
42631    # The variable is set, but is it from the command line or the environment?
42632
42633    # Try to remove the string !OBJCOPY! from our list.
42634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42636      # If it failed, the variable was not from the command line. Ignore it,
42637      # but warn the user (except for BASH, which is always set by the calling BASH).
42638      if test "xOBJCOPY" != xBASH; then
42639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42640$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42641      fi
42642      # Try to locate tool using the code snippet
42643      if test -n "$ac_tool_prefix"; then
42644  for ac_prog in gobjcopy objcopy
42645  do
42646    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42647set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42649$as_echo_n "checking for $ac_word... " >&6; }
42650if ${ac_cv_prog_OBJCOPY+:} false; then :
42651  $as_echo_n "(cached) " >&6
42652else
42653  if test -n "$OBJCOPY"; then
42654  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42655else
42656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42657for as_dir in $PATH
42658do
42659  IFS=$as_save_IFS
42660  test -z "$as_dir" && as_dir=.
42661    for ac_exec_ext in '' $ac_executable_extensions; do
42662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42663    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42665    break 2
42666  fi
42667done
42668  done
42669IFS=$as_save_IFS
42670
42671fi
42672fi
42673OBJCOPY=$ac_cv_prog_OBJCOPY
42674if test -n "$OBJCOPY"; then
42675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42676$as_echo "$OBJCOPY" >&6; }
42677else
42678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42679$as_echo "no" >&6; }
42680fi
42681
42682
42683    test -n "$OBJCOPY" && break
42684  done
42685fi
42686if test -z "$OBJCOPY"; then
42687  ac_ct_OBJCOPY=$OBJCOPY
42688  for ac_prog in gobjcopy objcopy
42689do
42690  # Extract the first word of "$ac_prog", so it can be a program name with args.
42691set dummy $ac_prog; ac_word=$2
42692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42693$as_echo_n "checking for $ac_word... " >&6; }
42694if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42695  $as_echo_n "(cached) " >&6
42696else
42697  if test -n "$ac_ct_OBJCOPY"; then
42698  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42699else
42700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42701for as_dir in $PATH
42702do
42703  IFS=$as_save_IFS
42704  test -z "$as_dir" && as_dir=.
42705    for ac_exec_ext in '' $ac_executable_extensions; do
42706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42707    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42709    break 2
42710  fi
42711done
42712  done
42713IFS=$as_save_IFS
42714
42715fi
42716fi
42717ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42718if test -n "$ac_ct_OBJCOPY"; then
42719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42720$as_echo "$ac_ct_OBJCOPY" >&6; }
42721else
42722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42723$as_echo "no" >&6; }
42724fi
42725
42726
42727  test -n "$ac_ct_OBJCOPY" && break
42728done
42729
42730  if test "x$ac_ct_OBJCOPY" = x; then
42731    OBJCOPY=""
42732  else
42733    case $cross_compiling:$ac_tool_warned in
42734yes:)
42735{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42736$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42737ac_tool_warned=yes ;;
42738esac
42739    OBJCOPY=$ac_ct_OBJCOPY
42740  fi
42741fi
42742
42743    else
42744      # If it succeeded, then it was overridden by the user. We will use it
42745      # for the tool.
42746
42747      # First remove it from the list of overridden variables, so we can test
42748      # for unknown variables in the end.
42749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42750
42751      # Check if we try to supply an empty value
42752      if test "x$OBJCOPY" = x; then
42753        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42754$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42756$as_echo_n "checking for OBJCOPY... " >&6; }
42757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42758$as_echo "disabled" >&6; }
42759      else
42760        # Check if the provided tool contains a complete path.
42761        tool_specified="$OBJCOPY"
42762        tool_basename="${tool_specified##*/}"
42763        if test "x$tool_basename" = "x$tool_specified"; then
42764          # A command without a complete path is provided, search $PATH.
42765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42766$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42767          # Extract the first word of "$tool_basename", so it can be a program name with args.
42768set dummy $tool_basename; ac_word=$2
42769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42770$as_echo_n "checking for $ac_word... " >&6; }
42771if ${ac_cv_path_OBJCOPY+:} false; then :
42772  $as_echo_n "(cached) " >&6
42773else
42774  case $OBJCOPY in
42775  [\\/]* | ?:[\\/]*)
42776  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42777  ;;
42778  *)
42779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42780for as_dir in $PATH
42781do
42782  IFS=$as_save_IFS
42783  test -z "$as_dir" && as_dir=.
42784    for ac_exec_ext in '' $ac_executable_extensions; do
42785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42786    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42788    break 2
42789  fi
42790done
42791  done
42792IFS=$as_save_IFS
42793
42794  ;;
42795esac
42796fi
42797OBJCOPY=$ac_cv_path_OBJCOPY
42798if test -n "$OBJCOPY"; then
42799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42800$as_echo "$OBJCOPY" >&6; }
42801else
42802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42803$as_echo "no" >&6; }
42804fi
42805
42806
42807          if test "x$OBJCOPY" = x; then
42808            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42809          fi
42810        else
42811          # Otherwise we believe it is a complete path. Use it as it is.
42812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42813$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42814          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42815$as_echo_n "checking for OBJCOPY... " >&6; }
42816          if test ! -x "$tool_specified"; then
42817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42818$as_echo "not found" >&6; }
42819            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42820          fi
42821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42822$as_echo "$tool_specified" >&6; }
42823        fi
42824      fi
42825    fi
42826
42827  fi
42828
42829
42830    # Only call fixup if objcopy was found.
42831    if test -n "$OBJCOPY"; then
42832
42833  # Only process if variable expands to non-empty
42834
42835  if test "x$OBJCOPY" != x; then
42836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42837
42838  # First separate the path from the arguments. This will split at the first
42839  # space.
42840  complete="$OBJCOPY"
42841  path="${complete%% *}"
42842  tmp="$complete EOL"
42843  arguments="${tmp#* }"
42844
42845  # Input might be given as Windows format, start by converting to
42846  # unix format.
42847  new_path=`$CYGPATH -u "$path"`
42848
42849  # Now try to locate executable using which
42850  new_path=`$WHICH "$new_path" 2> /dev/null`
42851  # bat and cmd files are not always considered executable in cygwin causing which
42852  # to not find them
42853  if test "x$new_path" = x \
42854      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42855      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42856    new_path=`$CYGPATH -u "$path"`
42857  fi
42858  if test "x$new_path" = x; then
42859    # Oops. Which didn't find the executable.
42860    # The splitting of arguments from the executable at a space might have been incorrect,
42861    # since paths with space are more likely in Windows. Give it another try with the whole
42862    # argument.
42863    path="$complete"
42864    arguments="EOL"
42865    new_path=`$CYGPATH -u "$path"`
42866    new_path=`$WHICH "$new_path" 2> /dev/null`
42867    # bat and cmd files are not always considered executable in cygwin causing which
42868    # to not find them
42869    if test "x$new_path" = x \
42870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42872      new_path=`$CYGPATH -u "$path"`
42873    fi
42874    if test "x$new_path" = x; then
42875      # It's still not found. Now this is an unrecoverable error.
42876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42877$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42878      has_space=`$ECHO "$complete" | $GREP " "`
42879      if test "x$has_space" != x; then
42880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42882      fi
42883      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42884    fi
42885  fi
42886
42887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42890  # "foo.exe" is OK but "foo" is an error.
42891  #
42892  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42893  # It is also a way to make sure we got the proper file name for the real test later on.
42894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42895  if test "x$test_shortpath" = x; then
42896    # Short path failed, file does not exist as specified.
42897    # Try adding .exe or .cmd
42898    if test -f "${new_path}.exe"; then
42899      input_to_shortpath="${new_path}.exe"
42900    elif test -f "${new_path}.cmd"; then
42901      input_to_shortpath="${new_path}.cmd"
42902    else
42903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42904$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42905      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42906$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42907      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42908    fi
42909  else
42910    input_to_shortpath="$new_path"
42911  fi
42912
42913  # Call helper function which possibly converts this using DOS-style short mode.
42914  # If so, the updated path is stored in $new_path.
42915  new_path="$input_to_shortpath"
42916
42917  input_path="$input_to_shortpath"
42918  # Check if we need to convert this using DOS-style short mode. If the path
42919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42920  # take no chances and rewrite it.
42921  # Note: m4 eats our [], so we need to use [ and ] instead.
42922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42923  if test "x$has_forbidden_chars" != x; then
42924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42928      # Going to short mode and back again did indeed matter. Since short mode is
42929      # case insensitive, let's make it lowercase to improve readability.
42930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42931      # Now convert it back to Unix-style (cygpath)
42932      input_path=`$CYGPATH -u "$shortmode_path"`
42933      new_path="$input_path"
42934    fi
42935  fi
42936
42937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42938  if test "x$test_cygdrive_prefix" = x; then
42939    # As a simple fix, exclude /usr/bin since it's not a real path.
42940    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42942      # a path prefixed by /cygdrive for fixpath to work.
42943      new_path="$CYGWIN_ROOT_PATH$input_path"
42944    fi
42945  fi
42946
42947  # remove trailing .exe if any
42948  new_path="${new_path/%.exe/}"
42949
42950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42951
42952  # First separate the path from the arguments. This will split at the first
42953  # space.
42954  complete="$OBJCOPY"
42955  path="${complete%% *}"
42956  tmp="$complete EOL"
42957  arguments="${tmp#* }"
42958
42959  # Input might be given as Windows format, start by converting to
42960  # unix format.
42961  new_path="$path"
42962
42963  windows_path="$new_path"
42964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42965    unix_path=`$CYGPATH -u "$windows_path"`
42966    new_path="$unix_path"
42967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42969    new_path="$unix_path"
42970  fi
42971
42972
42973  # Now try to locate executable using which
42974  new_path=`$WHICH "$new_path" 2> /dev/null`
42975
42976  if test "x$new_path" = x; then
42977    # Oops. Which didn't find the executable.
42978    # The splitting of arguments from the executable at a space might have been incorrect,
42979    # since paths with space are more likely in Windows. Give it another try with the whole
42980    # argument.
42981    path="$complete"
42982    arguments="EOL"
42983    new_path="$path"
42984
42985  windows_path="$new_path"
42986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42987    unix_path=`$CYGPATH -u "$windows_path"`
42988    new_path="$unix_path"
42989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42991    new_path="$unix_path"
42992  fi
42993
42994
42995    new_path=`$WHICH "$new_path" 2> /dev/null`
42996    # bat and cmd files are not always considered executable in MSYS causing which
42997    # to not find them
42998    if test "x$new_path" = x \
42999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43001      new_path="$path"
43002
43003  windows_path="$new_path"
43004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43005    unix_path=`$CYGPATH -u "$windows_path"`
43006    new_path="$unix_path"
43007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43009    new_path="$unix_path"
43010  fi
43011
43012    fi
43013
43014    if test "x$new_path" = x; then
43015      # It's still not found. Now this is an unrecoverable error.
43016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43017$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43018      has_space=`$ECHO "$complete" | $GREP " "`
43019      if test "x$has_space" != x; then
43020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43022      fi
43023      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43024    fi
43025  fi
43026
43027  # Now new_path has a complete unix path to the binary
43028  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43029    # Keep paths in /bin as-is, but remove trailing .exe if any
43030    new_path="${new_path/%.exe/}"
43031    # Do not save /bin paths to all_fixpath_prefixes!
43032  else
43033    # Not in mixed or Windows style, start by that.
43034    new_path=`cmd //c echo $new_path`
43035
43036  input_path="$new_path"
43037  # Check if we need to convert this using DOS-style short mode. If the path
43038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43039  # take no chances and rewrite it.
43040  # Note: m4 eats our [], so we need to use [ and ] instead.
43041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43042  if test "x$has_forbidden_chars" != x; then
43043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43045  fi
43046
43047    # Output is in $new_path
43048
43049  windows_path="$new_path"
43050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43051    unix_path=`$CYGPATH -u "$windows_path"`
43052    new_path="$unix_path"
43053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43055    new_path="$unix_path"
43056  fi
43057
43058    # remove trailing .exe if any
43059    new_path="${new_path/%.exe/}"
43060
43061    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43062    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43063  fi
43064
43065    else
43066      # We're on a unix platform. Hooray! :)
43067      # First separate the path from the arguments. This will split at the first
43068      # space.
43069      complete="$OBJCOPY"
43070      path="${complete%% *}"
43071      tmp="$complete EOL"
43072      arguments="${tmp#* }"
43073
43074      # Cannot rely on the command "which" here since it doesn't always work.
43075      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43076      if test -z "$is_absolute_path"; then
43077        # Path to executable is not absolute. Find it.
43078        IFS_save="$IFS"
43079        IFS=:
43080        for p in $PATH; do
43081          if test -f "$p/$path" && test -x "$p/$path"; then
43082            new_path="$p/$path"
43083            break
43084          fi
43085        done
43086        IFS="$IFS_save"
43087      else
43088        # This is an absolute path, we can use it without further modifications.
43089        new_path="$path"
43090      fi
43091
43092      if test "x$new_path" = x; then
43093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43094$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43095        has_space=`$ECHO "$complete" | $GREP " "`
43096        if test "x$has_space" != x; then
43097          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43098$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43099        fi
43100        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43101      fi
43102    fi
43103
43104    # Now join together the path and the arguments once again
43105    if test "x$arguments" != xEOL; then
43106      new_complete="$new_path ${arguments% *}"
43107    else
43108      new_complete="$new_path"
43109    fi
43110
43111    if test "x$complete" != "x$new_complete"; then
43112      OBJCOPY="$new_complete"
43113      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43114$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43115    fi
43116  fi
43117
43118      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43119        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43120        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43121        # - version number is last blank separate word on first line
43122        # - version number formats that have been seen:
43123        #   - <major>.<minor>
43124        #   - <major>.<minor>.<micro>
43125        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43126        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43127         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43128              -e 's/.* //' \
43129              -e '/^[01]\./b bad' \
43130              -e '/^2\./{' \
43131              -e '  s/^2\.//' \
43132              -e '  /^[0-9]$/b bad' \
43133              -e '  /^[0-9]\./b bad' \
43134              -e '  /^1[0-9]$/b bad' \
43135              -e '  /^1[0-9]\./b bad' \
43136              -e '  /^20\./b bad' \
43137              -e '  /^21\.0$/b bad' \
43138              -e '  /^21\.0\./b bad' \
43139              -e '}' \
43140              -e ':good' \
43141              -e 's/.*/VALID_VERSION/p' \
43142              -e 'q' \
43143              -e ':bad' \
43144              -e 's/.*/BAD_VERSION/p' \
43145              -e 'q'`
43146        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43147          OBJCOPY=
43148          { $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
43149$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43150          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43151$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43152          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43153$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43154          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43155$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43156          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43157$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43158        fi
43159      fi
43160    fi
43161  fi
43162
43163
43164
43165  # Publish this variable in the help.
43166
43167
43168  if [ -z "${OBJDUMP+x}" ]; then
43169    # The variable is not set by user, try to locate tool using the code snippet
43170    if test -n "$ac_tool_prefix"; then
43171  for ac_prog in gobjdump objdump
43172  do
43173    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43174set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43176$as_echo_n "checking for $ac_word... " >&6; }
43177if ${ac_cv_prog_OBJDUMP+:} false; then :
43178  $as_echo_n "(cached) " >&6
43179else
43180  if test -n "$OBJDUMP"; then
43181  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43182else
43183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43184for as_dir in $PATH
43185do
43186  IFS=$as_save_IFS
43187  test -z "$as_dir" && as_dir=.
43188    for ac_exec_ext in '' $ac_executable_extensions; do
43189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43190    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43192    break 2
43193  fi
43194done
43195  done
43196IFS=$as_save_IFS
43197
43198fi
43199fi
43200OBJDUMP=$ac_cv_prog_OBJDUMP
43201if test -n "$OBJDUMP"; then
43202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43203$as_echo "$OBJDUMP" >&6; }
43204else
43205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43206$as_echo "no" >&6; }
43207fi
43208
43209
43210    test -n "$OBJDUMP" && break
43211  done
43212fi
43213if test -z "$OBJDUMP"; then
43214  ac_ct_OBJDUMP=$OBJDUMP
43215  for ac_prog in gobjdump objdump
43216do
43217  # Extract the first word of "$ac_prog", so it can be a program name with args.
43218set dummy $ac_prog; ac_word=$2
43219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43220$as_echo_n "checking for $ac_word... " >&6; }
43221if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43222  $as_echo_n "(cached) " >&6
43223else
43224  if test -n "$ac_ct_OBJDUMP"; then
43225  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43226else
43227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43228for as_dir in $PATH
43229do
43230  IFS=$as_save_IFS
43231  test -z "$as_dir" && as_dir=.
43232    for ac_exec_ext in '' $ac_executable_extensions; do
43233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43234    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43236    break 2
43237  fi
43238done
43239  done
43240IFS=$as_save_IFS
43241
43242fi
43243fi
43244ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43245if test -n "$ac_ct_OBJDUMP"; then
43246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43247$as_echo "$ac_ct_OBJDUMP" >&6; }
43248else
43249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43250$as_echo "no" >&6; }
43251fi
43252
43253
43254  test -n "$ac_ct_OBJDUMP" && break
43255done
43256
43257  if test "x$ac_ct_OBJDUMP" = x; then
43258    OBJDUMP=""
43259  else
43260    case $cross_compiling:$ac_tool_warned in
43261yes:)
43262{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43263$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43264ac_tool_warned=yes ;;
43265esac
43266    OBJDUMP=$ac_ct_OBJDUMP
43267  fi
43268fi
43269
43270  else
43271    # The variable is set, but is it from the command line or the environment?
43272
43273    # Try to remove the string !OBJDUMP! from our list.
43274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43276      # If it failed, the variable was not from the command line. Ignore it,
43277      # but warn the user (except for BASH, which is always set by the calling BASH).
43278      if test "xOBJDUMP" != xBASH; then
43279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43280$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43281      fi
43282      # Try to locate tool using the code snippet
43283      if test -n "$ac_tool_prefix"; then
43284  for ac_prog in gobjdump objdump
43285  do
43286    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43287set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43289$as_echo_n "checking for $ac_word... " >&6; }
43290if ${ac_cv_prog_OBJDUMP+:} false; then :
43291  $as_echo_n "(cached) " >&6
43292else
43293  if test -n "$OBJDUMP"; then
43294  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43295else
43296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43297for as_dir in $PATH
43298do
43299  IFS=$as_save_IFS
43300  test -z "$as_dir" && as_dir=.
43301    for ac_exec_ext in '' $ac_executable_extensions; do
43302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43303    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43305    break 2
43306  fi
43307done
43308  done
43309IFS=$as_save_IFS
43310
43311fi
43312fi
43313OBJDUMP=$ac_cv_prog_OBJDUMP
43314if test -n "$OBJDUMP"; then
43315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43316$as_echo "$OBJDUMP" >&6; }
43317else
43318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43319$as_echo "no" >&6; }
43320fi
43321
43322
43323    test -n "$OBJDUMP" && break
43324  done
43325fi
43326if test -z "$OBJDUMP"; then
43327  ac_ct_OBJDUMP=$OBJDUMP
43328  for ac_prog in gobjdump objdump
43329do
43330  # Extract the first word of "$ac_prog", so it can be a program name with args.
43331set dummy $ac_prog; ac_word=$2
43332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43333$as_echo_n "checking for $ac_word... " >&6; }
43334if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43335  $as_echo_n "(cached) " >&6
43336else
43337  if test -n "$ac_ct_OBJDUMP"; then
43338  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43339else
43340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43341for as_dir in $PATH
43342do
43343  IFS=$as_save_IFS
43344  test -z "$as_dir" && as_dir=.
43345    for ac_exec_ext in '' $ac_executable_extensions; do
43346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43347    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43349    break 2
43350  fi
43351done
43352  done
43353IFS=$as_save_IFS
43354
43355fi
43356fi
43357ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43358if test -n "$ac_ct_OBJDUMP"; then
43359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43360$as_echo "$ac_ct_OBJDUMP" >&6; }
43361else
43362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43363$as_echo "no" >&6; }
43364fi
43365
43366
43367  test -n "$ac_ct_OBJDUMP" && break
43368done
43369
43370  if test "x$ac_ct_OBJDUMP" = x; then
43371    OBJDUMP=""
43372  else
43373    case $cross_compiling:$ac_tool_warned in
43374yes:)
43375{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43376$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43377ac_tool_warned=yes ;;
43378esac
43379    OBJDUMP=$ac_ct_OBJDUMP
43380  fi
43381fi
43382
43383    else
43384      # If it succeeded, then it was overridden by the user. We will use it
43385      # for the tool.
43386
43387      # First remove it from the list of overridden variables, so we can test
43388      # for unknown variables in the end.
43389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43390
43391      # Check if we try to supply an empty value
43392      if test "x$OBJDUMP" = x; then
43393        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43394$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43395        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43396$as_echo_n "checking for OBJDUMP... " >&6; }
43397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43398$as_echo "disabled" >&6; }
43399      else
43400        # Check if the provided tool contains a complete path.
43401        tool_specified="$OBJDUMP"
43402        tool_basename="${tool_specified##*/}"
43403        if test "x$tool_basename" = "x$tool_specified"; then
43404          # A command without a complete path is provided, search $PATH.
43405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43406$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43407          # Extract the first word of "$tool_basename", so it can be a program name with args.
43408set dummy $tool_basename; ac_word=$2
43409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43410$as_echo_n "checking for $ac_word... " >&6; }
43411if ${ac_cv_path_OBJDUMP+:} false; then :
43412  $as_echo_n "(cached) " >&6
43413else
43414  case $OBJDUMP in
43415  [\\/]* | ?:[\\/]*)
43416  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43417  ;;
43418  *)
43419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43420for as_dir in $PATH
43421do
43422  IFS=$as_save_IFS
43423  test -z "$as_dir" && as_dir=.
43424    for ac_exec_ext in '' $ac_executable_extensions; do
43425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43426    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43428    break 2
43429  fi
43430done
43431  done
43432IFS=$as_save_IFS
43433
43434  ;;
43435esac
43436fi
43437OBJDUMP=$ac_cv_path_OBJDUMP
43438if test -n "$OBJDUMP"; then
43439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43440$as_echo "$OBJDUMP" >&6; }
43441else
43442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43443$as_echo "no" >&6; }
43444fi
43445
43446
43447          if test "x$OBJDUMP" = x; then
43448            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43449          fi
43450        else
43451          # Otherwise we believe it is a complete path. Use it as it is.
43452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43453$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43454          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43455$as_echo_n "checking for OBJDUMP... " >&6; }
43456          if test ! -x "$tool_specified"; then
43457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43458$as_echo "not found" >&6; }
43459            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43460          fi
43461          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43462$as_echo "$tool_specified" >&6; }
43463        fi
43464      fi
43465    fi
43466
43467  fi
43468
43469
43470  if test "x$OBJDUMP" != x; then
43471    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43472    # bails if argument is missing.
43473
43474  # Only process if variable expands to non-empty
43475
43476  if test "x$OBJDUMP" != x; then
43477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43478
43479  # First separate the path from the arguments. This will split at the first
43480  # space.
43481  complete="$OBJDUMP"
43482  path="${complete%% *}"
43483  tmp="$complete EOL"
43484  arguments="${tmp#* }"
43485
43486  # Input might be given as Windows format, start by converting to
43487  # unix format.
43488  new_path=`$CYGPATH -u "$path"`
43489
43490  # Now try to locate executable using which
43491  new_path=`$WHICH "$new_path" 2> /dev/null`
43492  # bat and cmd files are not always considered executable in cygwin causing which
43493  # to not find them
43494  if test "x$new_path" = x \
43495      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43496      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43497    new_path=`$CYGPATH -u "$path"`
43498  fi
43499  if test "x$new_path" = x; then
43500    # Oops. Which didn't find the executable.
43501    # The splitting of arguments from the executable at a space might have been incorrect,
43502    # since paths with space are more likely in Windows. Give it another try with the whole
43503    # argument.
43504    path="$complete"
43505    arguments="EOL"
43506    new_path=`$CYGPATH -u "$path"`
43507    new_path=`$WHICH "$new_path" 2> /dev/null`
43508    # bat and cmd files are not always considered executable in cygwin causing which
43509    # to not find them
43510    if test "x$new_path" = x \
43511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43513      new_path=`$CYGPATH -u "$path"`
43514    fi
43515    if test "x$new_path" = x; then
43516      # It's still not found. Now this is an unrecoverable error.
43517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43518$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43519      has_space=`$ECHO "$complete" | $GREP " "`
43520      if test "x$has_space" != x; then
43521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43523      fi
43524      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43525    fi
43526  fi
43527
43528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43531  # "foo.exe" is OK but "foo" is an error.
43532  #
43533  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43534  # It is also a way to make sure we got the proper file name for the real test later on.
43535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43536  if test "x$test_shortpath" = x; then
43537    # Short path failed, file does not exist as specified.
43538    # Try adding .exe or .cmd
43539    if test -f "${new_path}.exe"; then
43540      input_to_shortpath="${new_path}.exe"
43541    elif test -f "${new_path}.cmd"; then
43542      input_to_shortpath="${new_path}.cmd"
43543    else
43544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43545$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43548      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43549    fi
43550  else
43551    input_to_shortpath="$new_path"
43552  fi
43553
43554  # Call helper function which possibly converts this using DOS-style short mode.
43555  # If so, the updated path is stored in $new_path.
43556  new_path="$input_to_shortpath"
43557
43558  input_path="$input_to_shortpath"
43559  # Check if we need to convert this using DOS-style short mode. If the path
43560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43561  # take no chances and rewrite it.
43562  # Note: m4 eats our [], so we need to use [ and ] instead.
43563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43564  if test "x$has_forbidden_chars" != x; then
43565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43569      # Going to short mode and back again did indeed matter. Since short mode is
43570      # case insensitive, let's make it lowercase to improve readability.
43571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43572      # Now convert it back to Unix-style (cygpath)
43573      input_path=`$CYGPATH -u "$shortmode_path"`
43574      new_path="$input_path"
43575    fi
43576  fi
43577
43578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43579  if test "x$test_cygdrive_prefix" = x; then
43580    # As a simple fix, exclude /usr/bin since it's not a real path.
43581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43583      # a path prefixed by /cygdrive for fixpath to work.
43584      new_path="$CYGWIN_ROOT_PATH$input_path"
43585    fi
43586  fi
43587
43588  # remove trailing .exe if any
43589  new_path="${new_path/%.exe/}"
43590
43591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43592
43593  # First separate the path from the arguments. This will split at the first
43594  # space.
43595  complete="$OBJDUMP"
43596  path="${complete%% *}"
43597  tmp="$complete EOL"
43598  arguments="${tmp#* }"
43599
43600  # Input might be given as Windows format, start by converting to
43601  # unix format.
43602  new_path="$path"
43603
43604  windows_path="$new_path"
43605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43606    unix_path=`$CYGPATH -u "$windows_path"`
43607    new_path="$unix_path"
43608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43610    new_path="$unix_path"
43611  fi
43612
43613
43614  # Now try to locate executable using which
43615  new_path=`$WHICH "$new_path" 2> /dev/null`
43616
43617  if test "x$new_path" = x; then
43618    # Oops. Which didn't find the executable.
43619    # The splitting of arguments from the executable at a space might have been incorrect,
43620    # since paths with space are more likely in Windows. Give it another try with the whole
43621    # argument.
43622    path="$complete"
43623    arguments="EOL"
43624    new_path="$path"
43625
43626  windows_path="$new_path"
43627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43628    unix_path=`$CYGPATH -u "$windows_path"`
43629    new_path="$unix_path"
43630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43632    new_path="$unix_path"
43633  fi
43634
43635
43636    new_path=`$WHICH "$new_path" 2> /dev/null`
43637    # bat and cmd files are not always considered executable in MSYS causing which
43638    # to not find them
43639    if test "x$new_path" = x \
43640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43642      new_path="$path"
43643
43644  windows_path="$new_path"
43645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43646    unix_path=`$CYGPATH -u "$windows_path"`
43647    new_path="$unix_path"
43648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43650    new_path="$unix_path"
43651  fi
43652
43653    fi
43654
43655    if test "x$new_path" = x; then
43656      # It's still not found. Now this is an unrecoverable error.
43657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43658$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43659      has_space=`$ECHO "$complete" | $GREP " "`
43660      if test "x$has_space" != x; then
43661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43663      fi
43664      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43665    fi
43666  fi
43667
43668  # Now new_path has a complete unix path to the binary
43669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43670    # Keep paths in /bin as-is, but remove trailing .exe if any
43671    new_path="${new_path/%.exe/}"
43672    # Do not save /bin paths to all_fixpath_prefixes!
43673  else
43674    # Not in mixed or Windows style, start by that.
43675    new_path=`cmd //c echo $new_path`
43676
43677  input_path="$new_path"
43678  # Check if we need to convert this using DOS-style short mode. If the path
43679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43680  # take no chances and rewrite it.
43681  # Note: m4 eats our [], so we need to use [ and ] instead.
43682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43683  if test "x$has_forbidden_chars" != x; then
43684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43686  fi
43687
43688    # Output is in $new_path
43689
43690  windows_path="$new_path"
43691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43692    unix_path=`$CYGPATH -u "$windows_path"`
43693    new_path="$unix_path"
43694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43696    new_path="$unix_path"
43697  fi
43698
43699    # remove trailing .exe if any
43700    new_path="${new_path/%.exe/}"
43701
43702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43704  fi
43705
43706    else
43707      # We're on a unix platform. Hooray! :)
43708      # First separate the path from the arguments. This will split at the first
43709      # space.
43710      complete="$OBJDUMP"
43711      path="${complete%% *}"
43712      tmp="$complete EOL"
43713      arguments="${tmp#* }"
43714
43715      # Cannot rely on the command "which" here since it doesn't always work.
43716      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43717      if test -z "$is_absolute_path"; then
43718        # Path to executable is not absolute. Find it.
43719        IFS_save="$IFS"
43720        IFS=:
43721        for p in $PATH; do
43722          if test -f "$p/$path" && test -x "$p/$path"; then
43723            new_path="$p/$path"
43724            break
43725          fi
43726        done
43727        IFS="$IFS_save"
43728      else
43729        # This is an absolute path, we can use it without further modifications.
43730        new_path="$path"
43731      fi
43732
43733      if test "x$new_path" = x; then
43734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43735$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43736        has_space=`$ECHO "$complete" | $GREP " "`
43737        if test "x$has_space" != x; then
43738          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43740        fi
43741        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43742      fi
43743    fi
43744
43745    # Now join together the path and the arguments once again
43746    if test "x$arguments" != xEOL; then
43747      new_complete="$new_path ${arguments% *}"
43748    else
43749      new_complete="$new_path"
43750    fi
43751
43752    if test "x$complete" != "x$new_complete"; then
43753      OBJDUMP="$new_complete"
43754      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43755$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43756    fi
43757  fi
43758
43759  fi
43760
43761
43762  # Restore old path.
43763  PATH="$OLD_PATH"
43764
43765  # Restore the flags to the user specified values.
43766  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43767  CFLAGS="$ORG_CFLAGS"
43768  CXXFLAGS="$ORG_CXXFLAGS"
43769
43770
43771# Finally do some processing after the detection phase
43772
43773  if test "x$COMPILE_TYPE" = "xcross"; then
43774    # Now we need to find a C/C++ compiler that can build executables for the
43775    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43776    # used once. Also, we need to do this without adding a tools dir to the
43777    # path, otherwise we might pick up cross-compilers which don't use standard
43778    # naming.
43779
43780    OLDPATH="$PATH"
43781
43782
43783# Check whether --with-build-devkit was given.
43784if test "${with_build_devkit+set}" = set; then :
43785  withval=$with_build_devkit;
43786fi
43787
43788    if test "x$with_build_devkit" = "xyes"; then
43789      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43790    elif test -n "$with_build_devkit"; then
43791      if test ! -d "$with_build_devkit"; then
43792        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43793      else
43794
43795  # Only process if variable expands to non-empty
43796
43797  if test "x$with_build_devkit" != x; then
43798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43799
43800  # Input might be given as Windows format, start by converting to
43801  # unix format.
43802  path="$with_build_devkit"
43803  new_path=`$CYGPATH -u "$path"`
43804
43805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43808  # "foo.exe" is OK but "foo" is an error.
43809  #
43810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43811  # It is also a way to make sure we got the proper file name for the real test later on.
43812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43813  if test "x$test_shortpath" = x; then
43814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43815$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43816    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43817  fi
43818
43819  # Call helper function which possibly converts this using DOS-style short mode.
43820  # If so, the updated path is stored in $new_path.
43821
43822  input_path="$new_path"
43823  # Check if we need to convert this using DOS-style short mode. If the path
43824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43825  # take no chances and rewrite it.
43826  # Note: m4 eats our [], so we need to use [ and ] instead.
43827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43828  if test "x$has_forbidden_chars" != x; then
43829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43833      # Going to short mode and back again did indeed matter. Since short mode is
43834      # case insensitive, let's make it lowercase to improve readability.
43835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43836      # Now convert it back to Unix-style (cygpath)
43837      input_path=`$CYGPATH -u "$shortmode_path"`
43838      new_path="$input_path"
43839    fi
43840  fi
43841
43842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43843  if test "x$test_cygdrive_prefix" = x; then
43844    # As a simple fix, exclude /usr/bin since it's not a real path.
43845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43847      # a path prefixed by /cygdrive for fixpath to work.
43848      new_path="$CYGWIN_ROOT_PATH$input_path"
43849    fi
43850  fi
43851
43852
43853  if test "x$path" != "x$new_path"; then
43854    with_build_devkit="$new_path"
43855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43856$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43857  fi
43858
43859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43860
43861  path="$with_build_devkit"
43862  has_colon=`$ECHO $path | $GREP ^.:`
43863  new_path="$path"
43864  if test "x$has_colon" = x; then
43865    # Not in mixed or Windows style, start by that.
43866    new_path=`cmd //c echo $path`
43867  fi
43868
43869
43870  input_path="$new_path"
43871  # Check if we need to convert this using DOS-style short mode. If the path
43872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43873  # take no chances and rewrite it.
43874  # Note: m4 eats our [], so we need to use [ and ] instead.
43875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43876  if test "x$has_forbidden_chars" != x; then
43877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43879  fi
43880
43881
43882  windows_path="$new_path"
43883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43884    unix_path=`$CYGPATH -u "$windows_path"`
43885    new_path="$unix_path"
43886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43888    new_path="$unix_path"
43889  fi
43890
43891  if test "x$path" != "x$new_path"; then
43892    with_build_devkit="$new_path"
43893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43894$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43895  fi
43896
43897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43899
43900    else
43901      # We're on a unix platform. Hooray! :)
43902      path="$with_build_devkit"
43903      has_space=`$ECHO "$path" | $GREP " "`
43904      if test "x$has_space" != x; then
43905        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43906$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43907        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43908      fi
43909
43910      # Use eval to expand a potential ~
43911      eval path="$path"
43912      if test ! -f "$path" && test ! -d "$path"; then
43913        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43914      fi
43915
43916      if test -d "$path"; then
43917        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43918      else
43919        dir="`$DIRNAME "$path"`"
43920        base="`$BASENAME "$path"`"
43921        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43922      fi
43923    fi
43924  fi
43925
43926        BUILD_DEVKIT_ROOT="$with_build_devkit"
43927        # Check for a meta data info file in the root of the devkit
43928        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43929          # Process devkit.info so that existing devkit variables are not
43930          # modified by this
43931          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43932              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43933              -e "s/\$host/\$build/g" \
43934              $BUILD_DEVKIT_ROOT/devkit.info \
43935              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43936          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43937          # This potentially sets the following:
43938          # A descriptive name of the devkit
43939
43940  if test "x$BUILD_DEVKIT_NAME" = x; then
43941    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43942  fi
43943
43944          # Corresponds to --with-extra-path
43945
43946  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43947    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43948  fi
43949
43950          # Corresponds to --with-toolchain-path
43951
43952  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43953    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43954  fi
43955
43956          # Corresponds to --with-sysroot
43957
43958  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43959    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43960  fi
43961
43962          # Skip the Window specific parts
43963        fi
43964
43965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43966$as_echo_n "checking for build platform devkit... " >&6; }
43967        if test "x$BUILD_DEVKIT_NAME" != x; then
43968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43969$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43970        else
43971          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43972$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43973        fi
43974
43975        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43976
43977  if test "x$BUILD_SYSROOT" != "x"; then
43978    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43979      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43980        # Solaris Studio does not have a concept of sysroot. Instead we must
43981        # make sure the default include and lib dirs are appended to each
43982        # compile and link command line. Must also add -I-xbuiltin to enable
43983        # inlining of system functions and intrinsics.
43984        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43985        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43986            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43987            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43988      fi
43989    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43990      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43991      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43992    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43993      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43994      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43995    fi
43996    # Propagate the sysroot args to hotspot
43997    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43998    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43999    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44000    # The global CFLAGS and LDFLAGS variables need these for configure to function
44001    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44002    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44003    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44004    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44005  fi
44006
44007  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44008    # We also need -iframework<path>/System/Library/Frameworks
44009    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44010    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44011    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44012    # set this here so it doesn't have to be peppered throughout the forest
44013    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44014    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44015  fi
44016
44017
44018
44019
44020
44021         # Fallback default of just /bin if DEVKIT_PATH is not defined
44022        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44023          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44024        fi
44025        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44026      fi
44027    fi
44028
44029    # FIXME: we should list the discovered compilers as an exclude pattern!
44030    # If we do that, we can do this detection before POST_DETECTION, and still
44031    # find the build compilers in the tools dir, if needed.
44032
44033
44034
44035  # Publish this variable in the help.
44036
44037
44038  if [ -z "${BUILD_CC+x}" ]; then
44039    # The variable is not set by user, try to locate tool using the code snippet
44040    for ac_prog in cl cc gcc
44041do
44042  # Extract the first word of "$ac_prog", so it can be a program name with args.
44043set dummy $ac_prog; ac_word=$2
44044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44045$as_echo_n "checking for $ac_word... " >&6; }
44046if ${ac_cv_path_BUILD_CC+:} false; then :
44047  $as_echo_n "(cached) " >&6
44048else
44049  case $BUILD_CC in
44050  [\\/]* | ?:[\\/]*)
44051  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44052  ;;
44053  *)
44054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44055for as_dir in $PATH
44056do
44057  IFS=$as_save_IFS
44058  test -z "$as_dir" && as_dir=.
44059    for ac_exec_ext in '' $ac_executable_extensions; do
44060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44061    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44063    break 2
44064  fi
44065done
44066  done
44067IFS=$as_save_IFS
44068
44069  ;;
44070esac
44071fi
44072BUILD_CC=$ac_cv_path_BUILD_CC
44073if test -n "$BUILD_CC"; then
44074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44075$as_echo "$BUILD_CC" >&6; }
44076else
44077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44078$as_echo "no" >&6; }
44079fi
44080
44081
44082  test -n "$BUILD_CC" && break
44083done
44084
44085  else
44086    # The variable is set, but is it from the command line or the environment?
44087
44088    # Try to remove the string !BUILD_CC! from our list.
44089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44091      # If it failed, the variable was not from the command line. Ignore it,
44092      # but warn the user (except for BASH, which is always set by the calling BASH).
44093      if test "xBUILD_CC" != xBASH; then
44094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44095$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44096      fi
44097      # Try to locate tool using the code snippet
44098      for ac_prog in cl cc gcc
44099do
44100  # Extract the first word of "$ac_prog", so it can be a program name with args.
44101set dummy $ac_prog; ac_word=$2
44102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44103$as_echo_n "checking for $ac_word... " >&6; }
44104if ${ac_cv_path_BUILD_CC+:} false; then :
44105  $as_echo_n "(cached) " >&6
44106else
44107  case $BUILD_CC in
44108  [\\/]* | ?:[\\/]*)
44109  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44110  ;;
44111  *)
44112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44113for as_dir in $PATH
44114do
44115  IFS=$as_save_IFS
44116  test -z "$as_dir" && as_dir=.
44117    for ac_exec_ext in '' $ac_executable_extensions; do
44118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44119    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44121    break 2
44122  fi
44123done
44124  done
44125IFS=$as_save_IFS
44126
44127  ;;
44128esac
44129fi
44130BUILD_CC=$ac_cv_path_BUILD_CC
44131if test -n "$BUILD_CC"; then
44132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44133$as_echo "$BUILD_CC" >&6; }
44134else
44135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44136$as_echo "no" >&6; }
44137fi
44138
44139
44140  test -n "$BUILD_CC" && break
44141done
44142
44143    else
44144      # If it succeeded, then it was overridden by the user. We will use it
44145      # for the tool.
44146
44147      # First remove it from the list of overridden variables, so we can test
44148      # for unknown variables in the end.
44149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44150
44151      # Check if we try to supply an empty value
44152      if test "x$BUILD_CC" = x; then
44153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44154$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44156$as_echo_n "checking for BUILD_CC... " >&6; }
44157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44158$as_echo "disabled" >&6; }
44159      else
44160        # Check if the provided tool contains a complete path.
44161        tool_specified="$BUILD_CC"
44162        tool_basename="${tool_specified##*/}"
44163        if test "x$tool_basename" = "x$tool_specified"; then
44164          # A command without a complete path is provided, search $PATH.
44165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44166$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44167          # Extract the first word of "$tool_basename", so it can be a program name with args.
44168set dummy $tool_basename; ac_word=$2
44169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44170$as_echo_n "checking for $ac_word... " >&6; }
44171if ${ac_cv_path_BUILD_CC+:} false; then :
44172  $as_echo_n "(cached) " >&6
44173else
44174  case $BUILD_CC in
44175  [\\/]* | ?:[\\/]*)
44176  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44177  ;;
44178  *)
44179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44180for as_dir in $PATH
44181do
44182  IFS=$as_save_IFS
44183  test -z "$as_dir" && as_dir=.
44184    for ac_exec_ext in '' $ac_executable_extensions; do
44185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44186    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44188    break 2
44189  fi
44190done
44191  done
44192IFS=$as_save_IFS
44193
44194  ;;
44195esac
44196fi
44197BUILD_CC=$ac_cv_path_BUILD_CC
44198if test -n "$BUILD_CC"; then
44199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44200$as_echo "$BUILD_CC" >&6; }
44201else
44202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44203$as_echo "no" >&6; }
44204fi
44205
44206
44207          if test "x$BUILD_CC" = x; then
44208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44209          fi
44210        else
44211          # Otherwise we believe it is a complete path. Use it as it is.
44212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44213$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44215$as_echo_n "checking for BUILD_CC... " >&6; }
44216          if test ! -x "$tool_specified"; then
44217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44218$as_echo "not found" >&6; }
44219            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44220          fi
44221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44222$as_echo "$tool_specified" >&6; }
44223        fi
44224      fi
44225    fi
44226
44227  fi
44228
44229
44230
44231  if test "x$BUILD_CC" = x; then
44232    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44233  fi
44234
44235
44236
44237  # Only process if variable expands to non-empty
44238
44239  if test "x$BUILD_CC" != x; then
44240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44241
44242  # First separate the path from the arguments. This will split at the first
44243  # space.
44244  complete="$BUILD_CC"
44245  path="${complete%% *}"
44246  tmp="$complete EOL"
44247  arguments="${tmp#* }"
44248
44249  # Input might be given as Windows format, start by converting to
44250  # unix format.
44251  new_path=`$CYGPATH -u "$path"`
44252
44253  # Now try to locate executable using which
44254  new_path=`$WHICH "$new_path" 2> /dev/null`
44255  # bat and cmd files are not always considered executable in cygwin causing which
44256  # to not find them
44257  if test "x$new_path" = x \
44258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44260    new_path=`$CYGPATH -u "$path"`
44261  fi
44262  if test "x$new_path" = x; then
44263    # Oops. Which didn't find the executable.
44264    # The splitting of arguments from the executable at a space might have been incorrect,
44265    # since paths with space are more likely in Windows. Give it another try with the whole
44266    # argument.
44267    path="$complete"
44268    arguments="EOL"
44269    new_path=`$CYGPATH -u "$path"`
44270    new_path=`$WHICH "$new_path" 2> /dev/null`
44271    # bat and cmd files are not always considered executable in cygwin causing which
44272    # to not find them
44273    if test "x$new_path" = x \
44274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44276      new_path=`$CYGPATH -u "$path"`
44277    fi
44278    if test "x$new_path" = x; then
44279      # It's still not found. Now this is an unrecoverable error.
44280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44281$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44282      has_space=`$ECHO "$complete" | $GREP " "`
44283      if test "x$has_space" != x; then
44284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44286      fi
44287      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44288    fi
44289  fi
44290
44291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44294  # "foo.exe" is OK but "foo" is an error.
44295  #
44296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44297  # It is also a way to make sure we got the proper file name for the real test later on.
44298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44299  if test "x$test_shortpath" = x; then
44300    # Short path failed, file does not exist as specified.
44301    # Try adding .exe or .cmd
44302    if test -f "${new_path}.exe"; then
44303      input_to_shortpath="${new_path}.exe"
44304    elif test -f "${new_path}.cmd"; then
44305      input_to_shortpath="${new_path}.cmd"
44306    else
44307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44308$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44311      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44312    fi
44313  else
44314    input_to_shortpath="$new_path"
44315  fi
44316
44317  # Call helper function which possibly converts this using DOS-style short mode.
44318  # If so, the updated path is stored in $new_path.
44319  new_path="$input_to_shortpath"
44320
44321  input_path="$input_to_shortpath"
44322  # Check if we need to convert this using DOS-style short mode. If the path
44323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44324  # take no chances and rewrite it.
44325  # Note: m4 eats our [], so we need to use [ and ] instead.
44326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44327  if test "x$has_forbidden_chars" != x; then
44328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44332      # Going to short mode and back again did indeed matter. Since short mode is
44333      # case insensitive, let's make it lowercase to improve readability.
44334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44335      # Now convert it back to Unix-style (cygpath)
44336      input_path=`$CYGPATH -u "$shortmode_path"`
44337      new_path="$input_path"
44338    fi
44339  fi
44340
44341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44342  if test "x$test_cygdrive_prefix" = x; then
44343    # As a simple fix, exclude /usr/bin since it's not a real path.
44344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44346      # a path prefixed by /cygdrive for fixpath to work.
44347      new_path="$CYGWIN_ROOT_PATH$input_path"
44348    fi
44349  fi
44350
44351  # remove trailing .exe if any
44352  new_path="${new_path/%.exe/}"
44353
44354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44355
44356  # First separate the path from the arguments. This will split at the first
44357  # space.
44358  complete="$BUILD_CC"
44359  path="${complete%% *}"
44360  tmp="$complete EOL"
44361  arguments="${tmp#* }"
44362
44363  # Input might be given as Windows format, start by converting to
44364  # unix format.
44365  new_path="$path"
44366
44367  windows_path="$new_path"
44368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44369    unix_path=`$CYGPATH -u "$windows_path"`
44370    new_path="$unix_path"
44371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44373    new_path="$unix_path"
44374  fi
44375
44376
44377  # Now try to locate executable using which
44378  new_path=`$WHICH "$new_path" 2> /dev/null`
44379
44380  if test "x$new_path" = x; then
44381    # Oops. Which didn't find the executable.
44382    # The splitting of arguments from the executable at a space might have been incorrect,
44383    # since paths with space are more likely in Windows. Give it another try with the whole
44384    # argument.
44385    path="$complete"
44386    arguments="EOL"
44387    new_path="$path"
44388
44389  windows_path="$new_path"
44390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44391    unix_path=`$CYGPATH -u "$windows_path"`
44392    new_path="$unix_path"
44393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44395    new_path="$unix_path"
44396  fi
44397
44398
44399    new_path=`$WHICH "$new_path" 2> /dev/null`
44400    # bat and cmd files are not always considered executable in MSYS causing which
44401    # to not find them
44402    if test "x$new_path" = x \
44403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44405      new_path="$path"
44406
44407  windows_path="$new_path"
44408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44409    unix_path=`$CYGPATH -u "$windows_path"`
44410    new_path="$unix_path"
44411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44413    new_path="$unix_path"
44414  fi
44415
44416    fi
44417
44418    if test "x$new_path" = x; then
44419      # It's still not found. Now this is an unrecoverable error.
44420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44421$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44422      has_space=`$ECHO "$complete" | $GREP " "`
44423      if test "x$has_space" != x; then
44424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44426      fi
44427      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44428    fi
44429  fi
44430
44431  # Now new_path has a complete unix path to the binary
44432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44433    # Keep paths in /bin as-is, but remove trailing .exe if any
44434    new_path="${new_path/%.exe/}"
44435    # Do not save /bin paths to all_fixpath_prefixes!
44436  else
44437    # Not in mixed or Windows style, start by that.
44438    new_path=`cmd //c echo $new_path`
44439
44440  input_path="$new_path"
44441  # Check if we need to convert this using DOS-style short mode. If the path
44442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44443  # take no chances and rewrite it.
44444  # Note: m4 eats our [], so we need to use [ and ] instead.
44445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44446  if test "x$has_forbidden_chars" != x; then
44447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44449  fi
44450
44451    # Output is in $new_path
44452
44453  windows_path="$new_path"
44454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44455    unix_path=`$CYGPATH -u "$windows_path"`
44456    new_path="$unix_path"
44457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44459    new_path="$unix_path"
44460  fi
44461
44462    # remove trailing .exe if any
44463    new_path="${new_path/%.exe/}"
44464
44465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44467  fi
44468
44469    else
44470      # We're on a unix platform. Hooray! :)
44471      # First separate the path from the arguments. This will split at the first
44472      # space.
44473      complete="$BUILD_CC"
44474      path="${complete%% *}"
44475      tmp="$complete EOL"
44476      arguments="${tmp#* }"
44477
44478      # Cannot rely on the command "which" here since it doesn't always work.
44479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44480      if test -z "$is_absolute_path"; then
44481        # Path to executable is not absolute. Find it.
44482        IFS_save="$IFS"
44483        IFS=:
44484        for p in $PATH; do
44485          if test -f "$p/$path" && test -x "$p/$path"; then
44486            new_path="$p/$path"
44487            break
44488          fi
44489        done
44490        IFS="$IFS_save"
44491      else
44492        # This is an absolute path, we can use it without further modifications.
44493        new_path="$path"
44494      fi
44495
44496      if test "x$new_path" = x; then
44497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44498$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44499        has_space=`$ECHO "$complete" | $GREP " "`
44500        if test "x$has_space" != x; then
44501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44503        fi
44504        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44505      fi
44506    fi
44507
44508    # Now join together the path and the arguments once again
44509    if test "x$arguments" != xEOL; then
44510      new_complete="$new_path ${arguments% *}"
44511    else
44512      new_complete="$new_path"
44513    fi
44514
44515    if test "x$complete" != "x$new_complete"; then
44516      BUILD_CC="$new_complete"
44517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44518$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44519    fi
44520  fi
44521
44522
44523
44524
44525  # Publish this variable in the help.
44526
44527
44528  if [ -z "${BUILD_CXX+x}" ]; then
44529    # The variable is not set by user, try to locate tool using the code snippet
44530    for ac_prog in cl CC g++
44531do
44532  # Extract the first word of "$ac_prog", so it can be a program name with args.
44533set dummy $ac_prog; ac_word=$2
44534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44535$as_echo_n "checking for $ac_word... " >&6; }
44536if ${ac_cv_path_BUILD_CXX+:} false; then :
44537  $as_echo_n "(cached) " >&6
44538else
44539  case $BUILD_CXX in
44540  [\\/]* | ?:[\\/]*)
44541  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44542  ;;
44543  *)
44544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44545for as_dir in $PATH
44546do
44547  IFS=$as_save_IFS
44548  test -z "$as_dir" && as_dir=.
44549    for ac_exec_ext in '' $ac_executable_extensions; do
44550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44551    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44553    break 2
44554  fi
44555done
44556  done
44557IFS=$as_save_IFS
44558
44559  ;;
44560esac
44561fi
44562BUILD_CXX=$ac_cv_path_BUILD_CXX
44563if test -n "$BUILD_CXX"; then
44564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44565$as_echo "$BUILD_CXX" >&6; }
44566else
44567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44568$as_echo "no" >&6; }
44569fi
44570
44571
44572  test -n "$BUILD_CXX" && break
44573done
44574
44575  else
44576    # The variable is set, but is it from the command line or the environment?
44577
44578    # Try to remove the string !BUILD_CXX! from our list.
44579    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44580    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44581      # If it failed, the variable was not from the command line. Ignore it,
44582      # but warn the user (except for BASH, which is always set by the calling BASH).
44583      if test "xBUILD_CXX" != xBASH; then
44584        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44585$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44586      fi
44587      # Try to locate tool using the code snippet
44588      for ac_prog in cl CC g++
44589do
44590  # Extract the first word of "$ac_prog", so it can be a program name with args.
44591set dummy $ac_prog; ac_word=$2
44592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44593$as_echo_n "checking for $ac_word... " >&6; }
44594if ${ac_cv_path_BUILD_CXX+:} false; then :
44595  $as_echo_n "(cached) " >&6
44596else
44597  case $BUILD_CXX in
44598  [\\/]* | ?:[\\/]*)
44599  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44600  ;;
44601  *)
44602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44603for as_dir in $PATH
44604do
44605  IFS=$as_save_IFS
44606  test -z "$as_dir" && as_dir=.
44607    for ac_exec_ext in '' $ac_executable_extensions; do
44608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44609    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44611    break 2
44612  fi
44613done
44614  done
44615IFS=$as_save_IFS
44616
44617  ;;
44618esac
44619fi
44620BUILD_CXX=$ac_cv_path_BUILD_CXX
44621if test -n "$BUILD_CXX"; then
44622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44623$as_echo "$BUILD_CXX" >&6; }
44624else
44625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44626$as_echo "no" >&6; }
44627fi
44628
44629
44630  test -n "$BUILD_CXX" && break
44631done
44632
44633    else
44634      # If it succeeded, then it was overridden by the user. We will use it
44635      # for the tool.
44636
44637      # First remove it from the list of overridden variables, so we can test
44638      # for unknown variables in the end.
44639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44640
44641      # Check if we try to supply an empty value
44642      if test "x$BUILD_CXX" = x; then
44643        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44644$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44646$as_echo_n "checking for BUILD_CXX... " >&6; }
44647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44648$as_echo "disabled" >&6; }
44649      else
44650        # Check if the provided tool contains a complete path.
44651        tool_specified="$BUILD_CXX"
44652        tool_basename="${tool_specified##*/}"
44653        if test "x$tool_basename" = "x$tool_specified"; then
44654          # A command without a complete path is provided, search $PATH.
44655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44656$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44657          # Extract the first word of "$tool_basename", so it can be a program name with args.
44658set dummy $tool_basename; ac_word=$2
44659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44660$as_echo_n "checking for $ac_word... " >&6; }
44661if ${ac_cv_path_BUILD_CXX+:} false; then :
44662  $as_echo_n "(cached) " >&6
44663else
44664  case $BUILD_CXX in
44665  [\\/]* | ?:[\\/]*)
44666  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44667  ;;
44668  *)
44669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44670for as_dir in $PATH
44671do
44672  IFS=$as_save_IFS
44673  test -z "$as_dir" && as_dir=.
44674    for ac_exec_ext in '' $ac_executable_extensions; do
44675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44676    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44678    break 2
44679  fi
44680done
44681  done
44682IFS=$as_save_IFS
44683
44684  ;;
44685esac
44686fi
44687BUILD_CXX=$ac_cv_path_BUILD_CXX
44688if test -n "$BUILD_CXX"; then
44689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44690$as_echo "$BUILD_CXX" >&6; }
44691else
44692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44693$as_echo "no" >&6; }
44694fi
44695
44696
44697          if test "x$BUILD_CXX" = x; then
44698            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44699          fi
44700        else
44701          # Otherwise we believe it is a complete path. Use it as it is.
44702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44703$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44705$as_echo_n "checking for BUILD_CXX... " >&6; }
44706          if test ! -x "$tool_specified"; then
44707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44708$as_echo "not found" >&6; }
44709            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44710          fi
44711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44712$as_echo "$tool_specified" >&6; }
44713        fi
44714      fi
44715    fi
44716
44717  fi
44718
44719
44720
44721  if test "x$BUILD_CXX" = x; then
44722    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44723  fi
44724
44725
44726
44727  # Only process if variable expands to non-empty
44728
44729  if test "x$BUILD_CXX" != x; then
44730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44731
44732  # First separate the path from the arguments. This will split at the first
44733  # space.
44734  complete="$BUILD_CXX"
44735  path="${complete%% *}"
44736  tmp="$complete EOL"
44737  arguments="${tmp#* }"
44738
44739  # Input might be given as Windows format, start by converting to
44740  # unix format.
44741  new_path=`$CYGPATH -u "$path"`
44742
44743  # Now try to locate executable using which
44744  new_path=`$WHICH "$new_path" 2> /dev/null`
44745  # bat and cmd files are not always considered executable in cygwin causing which
44746  # to not find them
44747  if test "x$new_path" = x \
44748      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44749      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44750    new_path=`$CYGPATH -u "$path"`
44751  fi
44752  if test "x$new_path" = x; then
44753    # Oops. Which didn't find the executable.
44754    # The splitting of arguments from the executable at a space might have been incorrect,
44755    # since paths with space are more likely in Windows. Give it another try with the whole
44756    # argument.
44757    path="$complete"
44758    arguments="EOL"
44759    new_path=`$CYGPATH -u "$path"`
44760    new_path=`$WHICH "$new_path" 2> /dev/null`
44761    # bat and cmd files are not always considered executable in cygwin causing which
44762    # to not find them
44763    if test "x$new_path" = x \
44764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44766      new_path=`$CYGPATH -u "$path"`
44767    fi
44768    if test "x$new_path" = x; then
44769      # It's still not found. Now this is an unrecoverable error.
44770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44771$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44772      has_space=`$ECHO "$complete" | $GREP " "`
44773      if test "x$has_space" != x; then
44774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44776      fi
44777      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44778    fi
44779  fi
44780
44781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44784  # "foo.exe" is OK but "foo" is an error.
44785  #
44786  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44787  # It is also a way to make sure we got the proper file name for the real test later on.
44788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44789  if test "x$test_shortpath" = x; then
44790    # Short path failed, file does not exist as specified.
44791    # Try adding .exe or .cmd
44792    if test -f "${new_path}.exe"; then
44793      input_to_shortpath="${new_path}.exe"
44794    elif test -f "${new_path}.cmd"; then
44795      input_to_shortpath="${new_path}.cmd"
44796    else
44797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44798$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44799      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44800$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44801      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44802    fi
44803  else
44804    input_to_shortpath="$new_path"
44805  fi
44806
44807  # Call helper function which possibly converts this using DOS-style short mode.
44808  # If so, the updated path is stored in $new_path.
44809  new_path="$input_to_shortpath"
44810
44811  input_path="$input_to_shortpath"
44812  # Check if we need to convert this using DOS-style short mode. If the path
44813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44814  # take no chances and rewrite it.
44815  # Note: m4 eats our [], so we need to use [ and ] instead.
44816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44817  if test "x$has_forbidden_chars" != x; then
44818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44822      # Going to short mode and back again did indeed matter. Since short mode is
44823      # case insensitive, let's make it lowercase to improve readability.
44824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44825      # Now convert it back to Unix-style (cygpath)
44826      input_path=`$CYGPATH -u "$shortmode_path"`
44827      new_path="$input_path"
44828    fi
44829  fi
44830
44831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44832  if test "x$test_cygdrive_prefix" = x; then
44833    # As a simple fix, exclude /usr/bin since it's not a real path.
44834    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44836      # a path prefixed by /cygdrive for fixpath to work.
44837      new_path="$CYGWIN_ROOT_PATH$input_path"
44838    fi
44839  fi
44840
44841  # remove trailing .exe if any
44842  new_path="${new_path/%.exe/}"
44843
44844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44845
44846  # First separate the path from the arguments. This will split at the first
44847  # space.
44848  complete="$BUILD_CXX"
44849  path="${complete%% *}"
44850  tmp="$complete EOL"
44851  arguments="${tmp#* }"
44852
44853  # Input might be given as Windows format, start by converting to
44854  # unix format.
44855  new_path="$path"
44856
44857  windows_path="$new_path"
44858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44859    unix_path=`$CYGPATH -u "$windows_path"`
44860    new_path="$unix_path"
44861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44863    new_path="$unix_path"
44864  fi
44865
44866
44867  # Now try to locate executable using which
44868  new_path=`$WHICH "$new_path" 2> /dev/null`
44869
44870  if test "x$new_path" = x; then
44871    # Oops. Which didn't find the executable.
44872    # The splitting of arguments from the executable at a space might have been incorrect,
44873    # since paths with space are more likely in Windows. Give it another try with the whole
44874    # argument.
44875    path="$complete"
44876    arguments="EOL"
44877    new_path="$path"
44878
44879  windows_path="$new_path"
44880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44881    unix_path=`$CYGPATH -u "$windows_path"`
44882    new_path="$unix_path"
44883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44885    new_path="$unix_path"
44886  fi
44887
44888
44889    new_path=`$WHICH "$new_path" 2> /dev/null`
44890    # bat and cmd files are not always considered executable in MSYS causing which
44891    # to not find them
44892    if test "x$new_path" = x \
44893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44895      new_path="$path"
44896
44897  windows_path="$new_path"
44898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44899    unix_path=`$CYGPATH -u "$windows_path"`
44900    new_path="$unix_path"
44901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44903    new_path="$unix_path"
44904  fi
44905
44906    fi
44907
44908    if test "x$new_path" = x; then
44909      # It's still not found. Now this is an unrecoverable error.
44910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44911$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44912      has_space=`$ECHO "$complete" | $GREP " "`
44913      if test "x$has_space" != x; then
44914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44916      fi
44917      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44918    fi
44919  fi
44920
44921  # Now new_path has a complete unix path to the binary
44922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44923    # Keep paths in /bin as-is, but remove trailing .exe if any
44924    new_path="${new_path/%.exe/}"
44925    # Do not save /bin paths to all_fixpath_prefixes!
44926  else
44927    # Not in mixed or Windows style, start by that.
44928    new_path=`cmd //c echo $new_path`
44929
44930  input_path="$new_path"
44931  # Check if we need to convert this using DOS-style short mode. If the path
44932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44933  # take no chances and rewrite it.
44934  # Note: m4 eats our [], so we need to use [ and ] instead.
44935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44936  if test "x$has_forbidden_chars" != x; then
44937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44939  fi
44940
44941    # Output is in $new_path
44942
44943  windows_path="$new_path"
44944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44945    unix_path=`$CYGPATH -u "$windows_path"`
44946    new_path="$unix_path"
44947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44949    new_path="$unix_path"
44950  fi
44951
44952    # remove trailing .exe if any
44953    new_path="${new_path/%.exe/}"
44954
44955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44957  fi
44958
44959    else
44960      # We're on a unix platform. Hooray! :)
44961      # First separate the path from the arguments. This will split at the first
44962      # space.
44963      complete="$BUILD_CXX"
44964      path="${complete%% *}"
44965      tmp="$complete EOL"
44966      arguments="${tmp#* }"
44967
44968      # Cannot rely on the command "which" here since it doesn't always work.
44969      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44970      if test -z "$is_absolute_path"; then
44971        # Path to executable is not absolute. Find it.
44972        IFS_save="$IFS"
44973        IFS=:
44974        for p in $PATH; do
44975          if test -f "$p/$path" && test -x "$p/$path"; then
44976            new_path="$p/$path"
44977            break
44978          fi
44979        done
44980        IFS="$IFS_save"
44981      else
44982        # This is an absolute path, we can use it without further modifications.
44983        new_path="$path"
44984      fi
44985
44986      if test "x$new_path" = x; then
44987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44988$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44989        has_space=`$ECHO "$complete" | $GREP " "`
44990        if test "x$has_space" != x; then
44991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44993        fi
44994        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44995      fi
44996    fi
44997
44998    # Now join together the path and the arguments once again
44999    if test "x$arguments" != xEOL; then
45000      new_complete="$new_path ${arguments% *}"
45001    else
45002      new_complete="$new_path"
45003    fi
45004
45005    if test "x$complete" != "x$new_complete"; then
45006      BUILD_CXX="$new_complete"
45007      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45008$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45009    fi
45010  fi
45011
45012
45013
45014  # Publish this variable in the help.
45015
45016
45017  if [ -z "${BUILD_NM+x}" ]; then
45018    # The variable is not set by user, try to locate tool using the code snippet
45019    for ac_prog in nm gcc-nm
45020do
45021  # Extract the first word of "$ac_prog", so it can be a program name with args.
45022set dummy $ac_prog; ac_word=$2
45023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45024$as_echo_n "checking for $ac_word... " >&6; }
45025if ${ac_cv_path_BUILD_NM+:} false; then :
45026  $as_echo_n "(cached) " >&6
45027else
45028  case $BUILD_NM in
45029  [\\/]* | ?:[\\/]*)
45030  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45031  ;;
45032  *)
45033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45034for as_dir in $PATH
45035do
45036  IFS=$as_save_IFS
45037  test -z "$as_dir" && as_dir=.
45038    for ac_exec_ext in '' $ac_executable_extensions; do
45039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45040    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45042    break 2
45043  fi
45044done
45045  done
45046IFS=$as_save_IFS
45047
45048  ;;
45049esac
45050fi
45051BUILD_NM=$ac_cv_path_BUILD_NM
45052if test -n "$BUILD_NM"; then
45053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45054$as_echo "$BUILD_NM" >&6; }
45055else
45056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45057$as_echo "no" >&6; }
45058fi
45059
45060
45061  test -n "$BUILD_NM" && break
45062done
45063
45064  else
45065    # The variable is set, but is it from the command line or the environment?
45066
45067    # Try to remove the string !BUILD_NM! from our list.
45068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45070      # If it failed, the variable was not from the command line. Ignore it,
45071      # but warn the user (except for BASH, which is always set by the calling BASH).
45072      if test "xBUILD_NM" != xBASH; then
45073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45074$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45075      fi
45076      # Try to locate tool using the code snippet
45077      for ac_prog in nm gcc-nm
45078do
45079  # Extract the first word of "$ac_prog", so it can be a program name with args.
45080set dummy $ac_prog; ac_word=$2
45081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45082$as_echo_n "checking for $ac_word... " >&6; }
45083if ${ac_cv_path_BUILD_NM+:} false; then :
45084  $as_echo_n "(cached) " >&6
45085else
45086  case $BUILD_NM in
45087  [\\/]* | ?:[\\/]*)
45088  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45089  ;;
45090  *)
45091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45092for as_dir in $PATH
45093do
45094  IFS=$as_save_IFS
45095  test -z "$as_dir" && as_dir=.
45096    for ac_exec_ext in '' $ac_executable_extensions; do
45097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45098    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45100    break 2
45101  fi
45102done
45103  done
45104IFS=$as_save_IFS
45105
45106  ;;
45107esac
45108fi
45109BUILD_NM=$ac_cv_path_BUILD_NM
45110if test -n "$BUILD_NM"; then
45111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45112$as_echo "$BUILD_NM" >&6; }
45113else
45114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45115$as_echo "no" >&6; }
45116fi
45117
45118
45119  test -n "$BUILD_NM" && break
45120done
45121
45122    else
45123      # If it succeeded, then it was overridden by the user. We will use it
45124      # for the tool.
45125
45126      # First remove it from the list of overridden variables, so we can test
45127      # for unknown variables in the end.
45128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45129
45130      # Check if we try to supply an empty value
45131      if test "x$BUILD_NM" = x; then
45132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45133$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45135$as_echo_n "checking for BUILD_NM... " >&6; }
45136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45137$as_echo "disabled" >&6; }
45138      else
45139        # Check if the provided tool contains a complete path.
45140        tool_specified="$BUILD_NM"
45141        tool_basename="${tool_specified##*/}"
45142        if test "x$tool_basename" = "x$tool_specified"; then
45143          # A command without a complete path is provided, search $PATH.
45144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45145$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45146          # Extract the first word of "$tool_basename", so it can be a program name with args.
45147set dummy $tool_basename; ac_word=$2
45148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45149$as_echo_n "checking for $ac_word... " >&6; }
45150if ${ac_cv_path_BUILD_NM+:} false; then :
45151  $as_echo_n "(cached) " >&6
45152else
45153  case $BUILD_NM in
45154  [\\/]* | ?:[\\/]*)
45155  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45156  ;;
45157  *)
45158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45159for as_dir in $PATH
45160do
45161  IFS=$as_save_IFS
45162  test -z "$as_dir" && as_dir=.
45163    for ac_exec_ext in '' $ac_executable_extensions; do
45164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45165    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45167    break 2
45168  fi
45169done
45170  done
45171IFS=$as_save_IFS
45172
45173  ;;
45174esac
45175fi
45176BUILD_NM=$ac_cv_path_BUILD_NM
45177if test -n "$BUILD_NM"; then
45178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45179$as_echo "$BUILD_NM" >&6; }
45180else
45181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45182$as_echo "no" >&6; }
45183fi
45184
45185
45186          if test "x$BUILD_NM" = x; then
45187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45188          fi
45189        else
45190          # Otherwise we believe it is a complete path. Use it as it is.
45191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45192$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45194$as_echo_n "checking for BUILD_NM... " >&6; }
45195          if test ! -x "$tool_specified"; then
45196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45197$as_echo "not found" >&6; }
45198            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45199          fi
45200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45201$as_echo "$tool_specified" >&6; }
45202        fi
45203      fi
45204    fi
45205
45206  fi
45207
45208
45209
45210  # Only process if variable expands to non-empty
45211
45212  if test "x$BUILD_NM" != x; then
45213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45214
45215  # First separate the path from the arguments. This will split at the first
45216  # space.
45217  complete="$BUILD_NM"
45218  path="${complete%% *}"
45219  tmp="$complete EOL"
45220  arguments="${tmp#* }"
45221
45222  # Input might be given as Windows format, start by converting to
45223  # unix format.
45224  new_path=`$CYGPATH -u "$path"`
45225
45226  # Now try to locate executable using which
45227  new_path=`$WHICH "$new_path" 2> /dev/null`
45228  # bat and cmd files are not always considered executable in cygwin causing which
45229  # to not find them
45230  if test "x$new_path" = x \
45231      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45232      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45233    new_path=`$CYGPATH -u "$path"`
45234  fi
45235  if test "x$new_path" = x; then
45236    # Oops. Which didn't find the executable.
45237    # The splitting of arguments from the executable at a space might have been incorrect,
45238    # since paths with space are more likely in Windows. Give it another try with the whole
45239    # argument.
45240    path="$complete"
45241    arguments="EOL"
45242    new_path=`$CYGPATH -u "$path"`
45243    new_path=`$WHICH "$new_path" 2> /dev/null`
45244    # bat and cmd files are not always considered executable in cygwin causing which
45245    # to not find them
45246    if test "x$new_path" = x \
45247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45249      new_path=`$CYGPATH -u "$path"`
45250    fi
45251    if test "x$new_path" = x; then
45252      # It's still not found. Now this is an unrecoverable error.
45253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45254$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45255      has_space=`$ECHO "$complete" | $GREP " "`
45256      if test "x$has_space" != x; then
45257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45259      fi
45260      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45261    fi
45262  fi
45263
45264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45267  # "foo.exe" is OK but "foo" is an error.
45268  #
45269  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45270  # It is also a way to make sure we got the proper file name for the real test later on.
45271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45272  if test "x$test_shortpath" = x; then
45273    # Short path failed, file does not exist as specified.
45274    # Try adding .exe or .cmd
45275    if test -f "${new_path}.exe"; then
45276      input_to_shortpath="${new_path}.exe"
45277    elif test -f "${new_path}.cmd"; then
45278      input_to_shortpath="${new_path}.cmd"
45279    else
45280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45281$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45282      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45283$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45284      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45285    fi
45286  else
45287    input_to_shortpath="$new_path"
45288  fi
45289
45290  # Call helper function which possibly converts this using DOS-style short mode.
45291  # If so, the updated path is stored in $new_path.
45292  new_path="$input_to_shortpath"
45293
45294  input_path="$input_to_shortpath"
45295  # Check if we need to convert this using DOS-style short mode. If the path
45296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45297  # take no chances and rewrite it.
45298  # Note: m4 eats our [], so we need to use [ and ] instead.
45299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45300  if test "x$has_forbidden_chars" != x; then
45301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45305      # Going to short mode and back again did indeed matter. Since short mode is
45306      # case insensitive, let's make it lowercase to improve readability.
45307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45308      # Now convert it back to Unix-style (cygpath)
45309      input_path=`$CYGPATH -u "$shortmode_path"`
45310      new_path="$input_path"
45311    fi
45312  fi
45313
45314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45315  if test "x$test_cygdrive_prefix" = x; then
45316    # As a simple fix, exclude /usr/bin since it's not a real path.
45317    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45319      # a path prefixed by /cygdrive for fixpath to work.
45320      new_path="$CYGWIN_ROOT_PATH$input_path"
45321    fi
45322  fi
45323
45324  # remove trailing .exe if any
45325  new_path="${new_path/%.exe/}"
45326
45327    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45328
45329  # First separate the path from the arguments. This will split at the first
45330  # space.
45331  complete="$BUILD_NM"
45332  path="${complete%% *}"
45333  tmp="$complete EOL"
45334  arguments="${tmp#* }"
45335
45336  # Input might be given as Windows format, start by converting to
45337  # unix format.
45338  new_path="$path"
45339
45340  windows_path="$new_path"
45341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45342    unix_path=`$CYGPATH -u "$windows_path"`
45343    new_path="$unix_path"
45344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45346    new_path="$unix_path"
45347  fi
45348
45349
45350  # Now try to locate executable using which
45351  new_path=`$WHICH "$new_path" 2> /dev/null`
45352
45353  if test "x$new_path" = x; then
45354    # Oops. Which didn't find the executable.
45355    # The splitting of arguments from the executable at a space might have been incorrect,
45356    # since paths with space are more likely in Windows. Give it another try with the whole
45357    # argument.
45358    path="$complete"
45359    arguments="EOL"
45360    new_path="$path"
45361
45362  windows_path="$new_path"
45363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45364    unix_path=`$CYGPATH -u "$windows_path"`
45365    new_path="$unix_path"
45366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45368    new_path="$unix_path"
45369  fi
45370
45371
45372    new_path=`$WHICH "$new_path" 2> /dev/null`
45373    # bat and cmd files are not always considered executable in MSYS causing which
45374    # to not find them
45375    if test "x$new_path" = x \
45376        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45377        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45378      new_path="$path"
45379
45380  windows_path="$new_path"
45381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45382    unix_path=`$CYGPATH -u "$windows_path"`
45383    new_path="$unix_path"
45384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45386    new_path="$unix_path"
45387  fi
45388
45389    fi
45390
45391    if test "x$new_path" = x; then
45392      # It's still not found. Now this is an unrecoverable error.
45393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45394$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45395      has_space=`$ECHO "$complete" | $GREP " "`
45396      if test "x$has_space" != x; then
45397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45399      fi
45400      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45401    fi
45402  fi
45403
45404  # Now new_path has a complete unix path to the binary
45405  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45406    # Keep paths in /bin as-is, but remove trailing .exe if any
45407    new_path="${new_path/%.exe/}"
45408    # Do not save /bin paths to all_fixpath_prefixes!
45409  else
45410    # Not in mixed or Windows style, start by that.
45411    new_path=`cmd //c echo $new_path`
45412
45413  input_path="$new_path"
45414  # Check if we need to convert this using DOS-style short mode. If the path
45415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45416  # take no chances and rewrite it.
45417  # Note: m4 eats our [], so we need to use [ and ] instead.
45418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45419  if test "x$has_forbidden_chars" != x; then
45420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45422  fi
45423
45424    # Output is in $new_path
45425
45426  windows_path="$new_path"
45427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45428    unix_path=`$CYGPATH -u "$windows_path"`
45429    new_path="$unix_path"
45430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45432    new_path="$unix_path"
45433  fi
45434
45435    # remove trailing .exe if any
45436    new_path="${new_path/%.exe/}"
45437
45438    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45439    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45440  fi
45441
45442    else
45443      # We're on a unix platform. Hooray! :)
45444      # First separate the path from the arguments. This will split at the first
45445      # space.
45446      complete="$BUILD_NM"
45447      path="${complete%% *}"
45448      tmp="$complete EOL"
45449      arguments="${tmp#* }"
45450
45451      # Cannot rely on the command "which" here since it doesn't always work.
45452      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45453      if test -z "$is_absolute_path"; then
45454        # Path to executable is not absolute. Find it.
45455        IFS_save="$IFS"
45456        IFS=:
45457        for p in $PATH; do
45458          if test -f "$p/$path" && test -x "$p/$path"; then
45459            new_path="$p/$path"
45460            break
45461          fi
45462        done
45463        IFS="$IFS_save"
45464      else
45465        # This is an absolute path, we can use it without further modifications.
45466        new_path="$path"
45467      fi
45468
45469      if test "x$new_path" = x; then
45470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45471$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45472        has_space=`$ECHO "$complete" | $GREP " "`
45473        if test "x$has_space" != x; then
45474          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45475$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45476        fi
45477        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45478      fi
45479    fi
45480
45481    # Now join together the path and the arguments once again
45482    if test "x$arguments" != xEOL; then
45483      new_complete="$new_path ${arguments% *}"
45484    else
45485      new_complete="$new_path"
45486    fi
45487
45488    if test "x$complete" != "x$new_complete"; then
45489      BUILD_NM="$new_complete"
45490      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45491$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45492    fi
45493  fi
45494
45495
45496
45497  # Publish this variable in the help.
45498
45499
45500  if [ -z "${BUILD_AR+x}" ]; then
45501    # The variable is not set by user, try to locate tool using the code snippet
45502    for ac_prog in ar gcc-ar
45503do
45504  # Extract the first word of "$ac_prog", so it can be a program name with args.
45505set dummy $ac_prog; ac_word=$2
45506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45507$as_echo_n "checking for $ac_word... " >&6; }
45508if ${ac_cv_path_BUILD_AR+:} false; then :
45509  $as_echo_n "(cached) " >&6
45510else
45511  case $BUILD_AR in
45512  [\\/]* | ?:[\\/]*)
45513  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45514  ;;
45515  *)
45516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45517for as_dir in $PATH
45518do
45519  IFS=$as_save_IFS
45520  test -z "$as_dir" && as_dir=.
45521    for ac_exec_ext in '' $ac_executable_extensions; do
45522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45523    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45525    break 2
45526  fi
45527done
45528  done
45529IFS=$as_save_IFS
45530
45531  ;;
45532esac
45533fi
45534BUILD_AR=$ac_cv_path_BUILD_AR
45535if test -n "$BUILD_AR"; then
45536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45537$as_echo "$BUILD_AR" >&6; }
45538else
45539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45540$as_echo "no" >&6; }
45541fi
45542
45543
45544  test -n "$BUILD_AR" && break
45545done
45546
45547  else
45548    # The variable is set, but is it from the command line or the environment?
45549
45550    # Try to remove the string !BUILD_AR! from our list.
45551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45553      # If it failed, the variable was not from the command line. Ignore it,
45554      # but warn the user (except for BASH, which is always set by the calling BASH).
45555      if test "xBUILD_AR" != xBASH; then
45556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45557$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45558      fi
45559      # Try to locate tool using the code snippet
45560      for ac_prog in ar gcc-ar
45561do
45562  # Extract the first word of "$ac_prog", so it can be a program name with args.
45563set dummy $ac_prog; ac_word=$2
45564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45565$as_echo_n "checking for $ac_word... " >&6; }
45566if ${ac_cv_path_BUILD_AR+:} false; then :
45567  $as_echo_n "(cached) " >&6
45568else
45569  case $BUILD_AR in
45570  [\\/]* | ?:[\\/]*)
45571  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45572  ;;
45573  *)
45574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45575for as_dir in $PATH
45576do
45577  IFS=$as_save_IFS
45578  test -z "$as_dir" && as_dir=.
45579    for ac_exec_ext in '' $ac_executable_extensions; do
45580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45581    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45583    break 2
45584  fi
45585done
45586  done
45587IFS=$as_save_IFS
45588
45589  ;;
45590esac
45591fi
45592BUILD_AR=$ac_cv_path_BUILD_AR
45593if test -n "$BUILD_AR"; then
45594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45595$as_echo "$BUILD_AR" >&6; }
45596else
45597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45598$as_echo "no" >&6; }
45599fi
45600
45601
45602  test -n "$BUILD_AR" && break
45603done
45604
45605    else
45606      # If it succeeded, then it was overridden by the user. We will use it
45607      # for the tool.
45608
45609      # First remove it from the list of overridden variables, so we can test
45610      # for unknown variables in the end.
45611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45612
45613      # Check if we try to supply an empty value
45614      if test "x$BUILD_AR" = x; then
45615        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45616$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45618$as_echo_n "checking for BUILD_AR... " >&6; }
45619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45620$as_echo "disabled" >&6; }
45621      else
45622        # Check if the provided tool contains a complete path.
45623        tool_specified="$BUILD_AR"
45624        tool_basename="${tool_specified##*/}"
45625        if test "x$tool_basename" = "x$tool_specified"; then
45626          # A command without a complete path is provided, search $PATH.
45627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45628$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45629          # Extract the first word of "$tool_basename", so it can be a program name with args.
45630set dummy $tool_basename; ac_word=$2
45631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45632$as_echo_n "checking for $ac_word... " >&6; }
45633if ${ac_cv_path_BUILD_AR+:} false; then :
45634  $as_echo_n "(cached) " >&6
45635else
45636  case $BUILD_AR in
45637  [\\/]* | ?:[\\/]*)
45638  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45639  ;;
45640  *)
45641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45642for as_dir in $PATH
45643do
45644  IFS=$as_save_IFS
45645  test -z "$as_dir" && as_dir=.
45646    for ac_exec_ext in '' $ac_executable_extensions; do
45647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45648    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45650    break 2
45651  fi
45652done
45653  done
45654IFS=$as_save_IFS
45655
45656  ;;
45657esac
45658fi
45659BUILD_AR=$ac_cv_path_BUILD_AR
45660if test -n "$BUILD_AR"; then
45661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45662$as_echo "$BUILD_AR" >&6; }
45663else
45664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45665$as_echo "no" >&6; }
45666fi
45667
45668
45669          if test "x$BUILD_AR" = x; then
45670            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45671          fi
45672        else
45673          # Otherwise we believe it is a complete path. Use it as it is.
45674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45675$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45676          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45677$as_echo_n "checking for BUILD_AR... " >&6; }
45678          if test ! -x "$tool_specified"; then
45679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45680$as_echo "not found" >&6; }
45681            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45682          fi
45683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45684$as_echo "$tool_specified" >&6; }
45685        fi
45686      fi
45687    fi
45688
45689  fi
45690
45691
45692
45693  # Only process if variable expands to non-empty
45694
45695  if test "x$BUILD_AR" != x; then
45696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45697
45698  # First separate the path from the arguments. This will split at the first
45699  # space.
45700  complete="$BUILD_AR"
45701  path="${complete%% *}"
45702  tmp="$complete EOL"
45703  arguments="${tmp#* }"
45704
45705  # Input might be given as Windows format, start by converting to
45706  # unix format.
45707  new_path=`$CYGPATH -u "$path"`
45708
45709  # Now try to locate executable using which
45710  new_path=`$WHICH "$new_path" 2> /dev/null`
45711  # bat and cmd files are not always considered executable in cygwin causing which
45712  # to not find them
45713  if test "x$new_path" = x \
45714      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45715      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45716    new_path=`$CYGPATH -u "$path"`
45717  fi
45718  if test "x$new_path" = x; then
45719    # Oops. Which didn't find the executable.
45720    # The splitting of arguments from the executable at a space might have been incorrect,
45721    # since paths with space are more likely in Windows. Give it another try with the whole
45722    # argument.
45723    path="$complete"
45724    arguments="EOL"
45725    new_path=`$CYGPATH -u "$path"`
45726    new_path=`$WHICH "$new_path" 2> /dev/null`
45727    # bat and cmd files are not always considered executable in cygwin causing which
45728    # to not find them
45729    if test "x$new_path" = x \
45730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45732      new_path=`$CYGPATH -u "$path"`
45733    fi
45734    if test "x$new_path" = x; then
45735      # It's still not found. Now this is an unrecoverable error.
45736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45737$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45738      has_space=`$ECHO "$complete" | $GREP " "`
45739      if test "x$has_space" != x; then
45740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45742      fi
45743      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45744    fi
45745  fi
45746
45747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45750  # "foo.exe" is OK but "foo" is an error.
45751  #
45752  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45753  # It is also a way to make sure we got the proper file name for the real test later on.
45754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45755  if test "x$test_shortpath" = x; then
45756    # Short path failed, file does not exist as specified.
45757    # Try adding .exe or .cmd
45758    if test -f "${new_path}.exe"; then
45759      input_to_shortpath="${new_path}.exe"
45760    elif test -f "${new_path}.cmd"; then
45761      input_to_shortpath="${new_path}.cmd"
45762    else
45763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45764$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45767      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45768    fi
45769  else
45770    input_to_shortpath="$new_path"
45771  fi
45772
45773  # Call helper function which possibly converts this using DOS-style short mode.
45774  # If so, the updated path is stored in $new_path.
45775  new_path="$input_to_shortpath"
45776
45777  input_path="$input_to_shortpath"
45778  # Check if we need to convert this using DOS-style short mode. If the path
45779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45780  # take no chances and rewrite it.
45781  # Note: m4 eats our [], so we need to use [ and ] instead.
45782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45783  if test "x$has_forbidden_chars" != x; then
45784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45788      # Going to short mode and back again did indeed matter. Since short mode is
45789      # case insensitive, let's make it lowercase to improve readability.
45790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45791      # Now convert it back to Unix-style (cygpath)
45792      input_path=`$CYGPATH -u "$shortmode_path"`
45793      new_path="$input_path"
45794    fi
45795  fi
45796
45797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45798  if test "x$test_cygdrive_prefix" = x; then
45799    # As a simple fix, exclude /usr/bin since it's not a real path.
45800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45802      # a path prefixed by /cygdrive for fixpath to work.
45803      new_path="$CYGWIN_ROOT_PATH$input_path"
45804    fi
45805  fi
45806
45807  # remove trailing .exe if any
45808  new_path="${new_path/%.exe/}"
45809
45810    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45811
45812  # First separate the path from the arguments. This will split at the first
45813  # space.
45814  complete="$BUILD_AR"
45815  path="${complete%% *}"
45816  tmp="$complete EOL"
45817  arguments="${tmp#* }"
45818
45819  # Input might be given as Windows format, start by converting to
45820  # unix format.
45821  new_path="$path"
45822
45823  windows_path="$new_path"
45824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45825    unix_path=`$CYGPATH -u "$windows_path"`
45826    new_path="$unix_path"
45827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45829    new_path="$unix_path"
45830  fi
45831
45832
45833  # Now try to locate executable using which
45834  new_path=`$WHICH "$new_path" 2> /dev/null`
45835
45836  if test "x$new_path" = x; then
45837    # Oops. Which didn't find the executable.
45838    # The splitting of arguments from the executable at a space might have been incorrect,
45839    # since paths with space are more likely in Windows. Give it another try with the whole
45840    # argument.
45841    path="$complete"
45842    arguments="EOL"
45843    new_path="$path"
45844
45845  windows_path="$new_path"
45846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45847    unix_path=`$CYGPATH -u "$windows_path"`
45848    new_path="$unix_path"
45849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45851    new_path="$unix_path"
45852  fi
45853
45854
45855    new_path=`$WHICH "$new_path" 2> /dev/null`
45856    # bat and cmd files are not always considered executable in MSYS causing which
45857    # to not find them
45858    if test "x$new_path" = x \
45859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45861      new_path="$path"
45862
45863  windows_path="$new_path"
45864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45865    unix_path=`$CYGPATH -u "$windows_path"`
45866    new_path="$unix_path"
45867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45869    new_path="$unix_path"
45870  fi
45871
45872    fi
45873
45874    if test "x$new_path" = x; then
45875      # It's still not found. Now this is an unrecoverable error.
45876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45877$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45878      has_space=`$ECHO "$complete" | $GREP " "`
45879      if test "x$has_space" != x; then
45880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45882      fi
45883      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45884    fi
45885  fi
45886
45887  # Now new_path has a complete unix path to the binary
45888  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45889    # Keep paths in /bin as-is, but remove trailing .exe if any
45890    new_path="${new_path/%.exe/}"
45891    # Do not save /bin paths to all_fixpath_prefixes!
45892  else
45893    # Not in mixed or Windows style, start by that.
45894    new_path=`cmd //c echo $new_path`
45895
45896  input_path="$new_path"
45897  # Check if we need to convert this using DOS-style short mode. If the path
45898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45899  # take no chances and rewrite it.
45900  # Note: m4 eats our [], so we need to use [ and ] instead.
45901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45902  if test "x$has_forbidden_chars" != x; then
45903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45905  fi
45906
45907    # Output is in $new_path
45908
45909  windows_path="$new_path"
45910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45911    unix_path=`$CYGPATH -u "$windows_path"`
45912    new_path="$unix_path"
45913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45915    new_path="$unix_path"
45916  fi
45917
45918    # remove trailing .exe if any
45919    new_path="${new_path/%.exe/}"
45920
45921    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45922    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45923  fi
45924
45925    else
45926      # We're on a unix platform. Hooray! :)
45927      # First separate the path from the arguments. This will split at the first
45928      # space.
45929      complete="$BUILD_AR"
45930      path="${complete%% *}"
45931      tmp="$complete EOL"
45932      arguments="${tmp#* }"
45933
45934      # Cannot rely on the command "which" here since it doesn't always work.
45935      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45936      if test -z "$is_absolute_path"; then
45937        # Path to executable is not absolute. Find it.
45938        IFS_save="$IFS"
45939        IFS=:
45940        for p in $PATH; do
45941          if test -f "$p/$path" && test -x "$p/$path"; then
45942            new_path="$p/$path"
45943            break
45944          fi
45945        done
45946        IFS="$IFS_save"
45947      else
45948        # This is an absolute path, we can use it without further modifications.
45949        new_path="$path"
45950      fi
45951
45952      if test "x$new_path" = x; then
45953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45954$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45955        has_space=`$ECHO "$complete" | $GREP " "`
45956        if test "x$has_space" != x; then
45957          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45958$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45959        fi
45960        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45961      fi
45962    fi
45963
45964    # Now join together the path and the arguments once again
45965    if test "x$arguments" != xEOL; then
45966      new_complete="$new_path ${arguments% *}"
45967    else
45968      new_complete="$new_path"
45969    fi
45970
45971    if test "x$complete" != "x$new_complete"; then
45972      BUILD_AR="$new_complete"
45973      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45974$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45975    fi
45976  fi
45977
45978
45979
45980  # Publish this variable in the help.
45981
45982
45983  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45984    # The variable is not set by user, try to locate tool using the code snippet
45985    for ac_prog in objcopy
45986do
45987  # Extract the first word of "$ac_prog", so it can be a program name with args.
45988set dummy $ac_prog; ac_word=$2
45989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45990$as_echo_n "checking for $ac_word... " >&6; }
45991if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45992  $as_echo_n "(cached) " >&6
45993else
45994  case $BUILD_OBJCOPY in
45995  [\\/]* | ?:[\\/]*)
45996  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45997  ;;
45998  *)
45999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46000for as_dir in $PATH
46001do
46002  IFS=$as_save_IFS
46003  test -z "$as_dir" && as_dir=.
46004    for ac_exec_ext in '' $ac_executable_extensions; do
46005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46006    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46008    break 2
46009  fi
46010done
46011  done
46012IFS=$as_save_IFS
46013
46014  ;;
46015esac
46016fi
46017BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46018if test -n "$BUILD_OBJCOPY"; then
46019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46020$as_echo "$BUILD_OBJCOPY" >&6; }
46021else
46022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46023$as_echo "no" >&6; }
46024fi
46025
46026
46027  test -n "$BUILD_OBJCOPY" && break
46028done
46029
46030  else
46031    # The variable is set, but is it from the command line or the environment?
46032
46033    # Try to remove the string !BUILD_OBJCOPY! from our list.
46034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46036      # If it failed, the variable was not from the command line. Ignore it,
46037      # but warn the user (except for BASH, which is always set by the calling BASH).
46038      if test "xBUILD_OBJCOPY" != xBASH; then
46039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46040$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46041      fi
46042      # Try to locate tool using the code snippet
46043      for ac_prog in objcopy
46044do
46045  # Extract the first word of "$ac_prog", so it can be a program name with args.
46046set dummy $ac_prog; ac_word=$2
46047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46048$as_echo_n "checking for $ac_word... " >&6; }
46049if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46050  $as_echo_n "(cached) " >&6
46051else
46052  case $BUILD_OBJCOPY in
46053  [\\/]* | ?:[\\/]*)
46054  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46055  ;;
46056  *)
46057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46058for as_dir in $PATH
46059do
46060  IFS=$as_save_IFS
46061  test -z "$as_dir" && as_dir=.
46062    for ac_exec_ext in '' $ac_executable_extensions; do
46063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46064    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46066    break 2
46067  fi
46068done
46069  done
46070IFS=$as_save_IFS
46071
46072  ;;
46073esac
46074fi
46075BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46076if test -n "$BUILD_OBJCOPY"; then
46077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46078$as_echo "$BUILD_OBJCOPY" >&6; }
46079else
46080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46081$as_echo "no" >&6; }
46082fi
46083
46084
46085  test -n "$BUILD_OBJCOPY" && break
46086done
46087
46088    else
46089      # If it succeeded, then it was overridden by the user. We will use it
46090      # for the tool.
46091
46092      # First remove it from the list of overridden variables, so we can test
46093      # for unknown variables in the end.
46094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46095
46096      # Check if we try to supply an empty value
46097      if test "x$BUILD_OBJCOPY" = x; then
46098        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46099$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46101$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46103$as_echo "disabled" >&6; }
46104      else
46105        # Check if the provided tool contains a complete path.
46106        tool_specified="$BUILD_OBJCOPY"
46107        tool_basename="${tool_specified##*/}"
46108        if test "x$tool_basename" = "x$tool_specified"; then
46109          # A command without a complete path is provided, search $PATH.
46110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46111$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46112          # Extract the first word of "$tool_basename", so it can be a program name with args.
46113set dummy $tool_basename; ac_word=$2
46114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46115$as_echo_n "checking for $ac_word... " >&6; }
46116if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46117  $as_echo_n "(cached) " >&6
46118else
46119  case $BUILD_OBJCOPY in
46120  [\\/]* | ?:[\\/]*)
46121  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46122  ;;
46123  *)
46124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46125for as_dir in $PATH
46126do
46127  IFS=$as_save_IFS
46128  test -z "$as_dir" && as_dir=.
46129    for ac_exec_ext in '' $ac_executable_extensions; do
46130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46131    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46133    break 2
46134  fi
46135done
46136  done
46137IFS=$as_save_IFS
46138
46139  ;;
46140esac
46141fi
46142BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46143if test -n "$BUILD_OBJCOPY"; then
46144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46145$as_echo "$BUILD_OBJCOPY" >&6; }
46146else
46147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46148$as_echo "no" >&6; }
46149fi
46150
46151
46152          if test "x$BUILD_OBJCOPY" = x; then
46153            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46154          fi
46155        else
46156          # Otherwise we believe it is a complete path. Use it as it is.
46157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46158$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46159          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46160$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46161          if test ! -x "$tool_specified"; then
46162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46163$as_echo "not found" >&6; }
46164            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46165          fi
46166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46167$as_echo "$tool_specified" >&6; }
46168        fi
46169      fi
46170    fi
46171
46172  fi
46173
46174
46175
46176  # Only process if variable expands to non-empty
46177
46178  if test "x$BUILD_OBJCOPY" != x; then
46179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46180
46181  # First separate the path from the arguments. This will split at the first
46182  # space.
46183  complete="$BUILD_OBJCOPY"
46184  path="${complete%% *}"
46185  tmp="$complete EOL"
46186  arguments="${tmp#* }"
46187
46188  # Input might be given as Windows format, start by converting to
46189  # unix format.
46190  new_path=`$CYGPATH -u "$path"`
46191
46192  # Now try to locate executable using which
46193  new_path=`$WHICH "$new_path" 2> /dev/null`
46194  # bat and cmd files are not always considered executable in cygwin causing which
46195  # to not find them
46196  if test "x$new_path" = x \
46197      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46198      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46199    new_path=`$CYGPATH -u "$path"`
46200  fi
46201  if test "x$new_path" = x; then
46202    # Oops. Which didn't find the executable.
46203    # The splitting of arguments from the executable at a space might have been incorrect,
46204    # since paths with space are more likely in Windows. Give it another try with the whole
46205    # argument.
46206    path="$complete"
46207    arguments="EOL"
46208    new_path=`$CYGPATH -u "$path"`
46209    new_path=`$WHICH "$new_path" 2> /dev/null`
46210    # bat and cmd files are not always considered executable in cygwin causing which
46211    # to not find them
46212    if test "x$new_path" = x \
46213        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46214        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46215      new_path=`$CYGPATH -u "$path"`
46216    fi
46217    if test "x$new_path" = x; then
46218      # It's still not found. Now this is an unrecoverable error.
46219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46220$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46221      has_space=`$ECHO "$complete" | $GREP " "`
46222      if test "x$has_space" != x; then
46223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46225      fi
46226      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46227    fi
46228  fi
46229
46230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46233  # "foo.exe" is OK but "foo" is an error.
46234  #
46235  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46236  # It is also a way to make sure we got the proper file name for the real test later on.
46237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46238  if test "x$test_shortpath" = x; then
46239    # Short path failed, file does not exist as specified.
46240    # Try adding .exe or .cmd
46241    if test -f "${new_path}.exe"; then
46242      input_to_shortpath="${new_path}.exe"
46243    elif test -f "${new_path}.cmd"; then
46244      input_to_shortpath="${new_path}.cmd"
46245    else
46246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46247$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46248      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46249$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46250      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46251    fi
46252  else
46253    input_to_shortpath="$new_path"
46254  fi
46255
46256  # Call helper function which possibly converts this using DOS-style short mode.
46257  # If so, the updated path is stored in $new_path.
46258  new_path="$input_to_shortpath"
46259
46260  input_path="$input_to_shortpath"
46261  # Check if we need to convert this using DOS-style short mode. If the path
46262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46263  # take no chances and rewrite it.
46264  # Note: m4 eats our [], so we need to use [ and ] instead.
46265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46266  if test "x$has_forbidden_chars" != x; then
46267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46271      # Going to short mode and back again did indeed matter. Since short mode is
46272      # case insensitive, let's make it lowercase to improve readability.
46273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46274      # Now convert it back to Unix-style (cygpath)
46275      input_path=`$CYGPATH -u "$shortmode_path"`
46276      new_path="$input_path"
46277    fi
46278  fi
46279
46280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46281  if test "x$test_cygdrive_prefix" = x; then
46282    # As a simple fix, exclude /usr/bin since it's not a real path.
46283    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46285      # a path prefixed by /cygdrive for fixpath to work.
46286      new_path="$CYGWIN_ROOT_PATH$input_path"
46287    fi
46288  fi
46289
46290  # remove trailing .exe if any
46291  new_path="${new_path/%.exe/}"
46292
46293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46294
46295  # First separate the path from the arguments. This will split at the first
46296  # space.
46297  complete="$BUILD_OBJCOPY"
46298  path="${complete%% *}"
46299  tmp="$complete EOL"
46300  arguments="${tmp#* }"
46301
46302  # Input might be given as Windows format, start by converting to
46303  # unix format.
46304  new_path="$path"
46305
46306  windows_path="$new_path"
46307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46308    unix_path=`$CYGPATH -u "$windows_path"`
46309    new_path="$unix_path"
46310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46312    new_path="$unix_path"
46313  fi
46314
46315
46316  # Now try to locate executable using which
46317  new_path=`$WHICH "$new_path" 2> /dev/null`
46318
46319  if test "x$new_path" = x; then
46320    # Oops. Which didn't find the executable.
46321    # The splitting of arguments from the executable at a space might have been incorrect,
46322    # since paths with space are more likely in Windows. Give it another try with the whole
46323    # argument.
46324    path="$complete"
46325    arguments="EOL"
46326    new_path="$path"
46327
46328  windows_path="$new_path"
46329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46330    unix_path=`$CYGPATH -u "$windows_path"`
46331    new_path="$unix_path"
46332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46334    new_path="$unix_path"
46335  fi
46336
46337
46338    new_path=`$WHICH "$new_path" 2> /dev/null`
46339    # bat and cmd files are not always considered executable in MSYS causing which
46340    # to not find them
46341    if test "x$new_path" = x \
46342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46344      new_path="$path"
46345
46346  windows_path="$new_path"
46347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46348    unix_path=`$CYGPATH -u "$windows_path"`
46349    new_path="$unix_path"
46350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46352    new_path="$unix_path"
46353  fi
46354
46355    fi
46356
46357    if test "x$new_path" = x; then
46358      # It's still not found. Now this is an unrecoverable error.
46359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46360$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46361      has_space=`$ECHO "$complete" | $GREP " "`
46362      if test "x$has_space" != x; then
46363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46365      fi
46366      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46367    fi
46368  fi
46369
46370  # Now new_path has a complete unix path to the binary
46371  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46372    # Keep paths in /bin as-is, but remove trailing .exe if any
46373    new_path="${new_path/%.exe/}"
46374    # Do not save /bin paths to all_fixpath_prefixes!
46375  else
46376    # Not in mixed or Windows style, start by that.
46377    new_path=`cmd //c echo $new_path`
46378
46379  input_path="$new_path"
46380  # Check if we need to convert this using DOS-style short mode. If the path
46381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46382  # take no chances and rewrite it.
46383  # Note: m4 eats our [], so we need to use [ and ] instead.
46384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46385  if test "x$has_forbidden_chars" != x; then
46386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46388  fi
46389
46390    # Output is in $new_path
46391
46392  windows_path="$new_path"
46393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46394    unix_path=`$CYGPATH -u "$windows_path"`
46395    new_path="$unix_path"
46396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46398    new_path="$unix_path"
46399  fi
46400
46401    # remove trailing .exe if any
46402    new_path="${new_path/%.exe/}"
46403
46404    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46405    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46406  fi
46407
46408    else
46409      # We're on a unix platform. Hooray! :)
46410      # First separate the path from the arguments. This will split at the first
46411      # space.
46412      complete="$BUILD_OBJCOPY"
46413      path="${complete%% *}"
46414      tmp="$complete EOL"
46415      arguments="${tmp#* }"
46416
46417      # Cannot rely on the command "which" here since it doesn't always work.
46418      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46419      if test -z "$is_absolute_path"; then
46420        # Path to executable is not absolute. Find it.
46421        IFS_save="$IFS"
46422        IFS=:
46423        for p in $PATH; do
46424          if test -f "$p/$path" && test -x "$p/$path"; then
46425            new_path="$p/$path"
46426            break
46427          fi
46428        done
46429        IFS="$IFS_save"
46430      else
46431        # This is an absolute path, we can use it without further modifications.
46432        new_path="$path"
46433      fi
46434
46435      if test "x$new_path" = x; then
46436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46437$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46438        has_space=`$ECHO "$complete" | $GREP " "`
46439        if test "x$has_space" != x; then
46440          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46441$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46442        fi
46443        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46444      fi
46445    fi
46446
46447    # Now join together the path and the arguments once again
46448    if test "x$arguments" != xEOL; then
46449      new_complete="$new_path ${arguments% *}"
46450    else
46451      new_complete="$new_path"
46452    fi
46453
46454    if test "x$complete" != "x$new_complete"; then
46455      BUILD_OBJCOPY="$new_complete"
46456      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46457$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46458    fi
46459  fi
46460
46461
46462
46463  # Publish this variable in the help.
46464
46465
46466  if [ -z "${BUILD_STRIP+x}" ]; then
46467    # The variable is not set by user, try to locate tool using the code snippet
46468    for ac_prog in strip
46469do
46470  # Extract the first word of "$ac_prog", so it can be a program name with args.
46471set dummy $ac_prog; ac_word=$2
46472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46473$as_echo_n "checking for $ac_word... " >&6; }
46474if ${ac_cv_path_BUILD_STRIP+:} false; then :
46475  $as_echo_n "(cached) " >&6
46476else
46477  case $BUILD_STRIP in
46478  [\\/]* | ?:[\\/]*)
46479  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46480  ;;
46481  *)
46482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46483for as_dir in $PATH
46484do
46485  IFS=$as_save_IFS
46486  test -z "$as_dir" && as_dir=.
46487    for ac_exec_ext in '' $ac_executable_extensions; do
46488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46489    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46491    break 2
46492  fi
46493done
46494  done
46495IFS=$as_save_IFS
46496
46497  ;;
46498esac
46499fi
46500BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46501if test -n "$BUILD_STRIP"; then
46502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46503$as_echo "$BUILD_STRIP" >&6; }
46504else
46505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46506$as_echo "no" >&6; }
46507fi
46508
46509
46510  test -n "$BUILD_STRIP" && break
46511done
46512
46513  else
46514    # The variable is set, but is it from the command line or the environment?
46515
46516    # Try to remove the string !BUILD_STRIP! from our list.
46517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46519      # If it failed, the variable was not from the command line. Ignore it,
46520      # but warn the user (except for BASH, which is always set by the calling BASH).
46521      if test "xBUILD_STRIP" != xBASH; then
46522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46523$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46524      fi
46525      # Try to locate tool using the code snippet
46526      for ac_prog in strip
46527do
46528  # Extract the first word of "$ac_prog", so it can be a program name with args.
46529set dummy $ac_prog; ac_word=$2
46530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46531$as_echo_n "checking for $ac_word... " >&6; }
46532if ${ac_cv_path_BUILD_STRIP+:} false; then :
46533  $as_echo_n "(cached) " >&6
46534else
46535  case $BUILD_STRIP in
46536  [\\/]* | ?:[\\/]*)
46537  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46538  ;;
46539  *)
46540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46541for as_dir in $PATH
46542do
46543  IFS=$as_save_IFS
46544  test -z "$as_dir" && as_dir=.
46545    for ac_exec_ext in '' $ac_executable_extensions; do
46546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46547    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46549    break 2
46550  fi
46551done
46552  done
46553IFS=$as_save_IFS
46554
46555  ;;
46556esac
46557fi
46558BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46559if test -n "$BUILD_STRIP"; then
46560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46561$as_echo "$BUILD_STRIP" >&6; }
46562else
46563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46564$as_echo "no" >&6; }
46565fi
46566
46567
46568  test -n "$BUILD_STRIP" && break
46569done
46570
46571    else
46572      # If it succeeded, then it was overridden by the user. We will use it
46573      # for the tool.
46574
46575      # First remove it from the list of overridden variables, so we can test
46576      # for unknown variables in the end.
46577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46578
46579      # Check if we try to supply an empty value
46580      if test "x$BUILD_STRIP" = x; then
46581        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46582$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46584$as_echo_n "checking for BUILD_STRIP... " >&6; }
46585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46586$as_echo "disabled" >&6; }
46587      else
46588        # Check if the provided tool contains a complete path.
46589        tool_specified="$BUILD_STRIP"
46590        tool_basename="${tool_specified##*/}"
46591        if test "x$tool_basename" = "x$tool_specified"; then
46592          # A command without a complete path is provided, search $PATH.
46593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46594$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46595          # Extract the first word of "$tool_basename", so it can be a program name with args.
46596set dummy $tool_basename; ac_word=$2
46597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46598$as_echo_n "checking for $ac_word... " >&6; }
46599if ${ac_cv_path_BUILD_STRIP+:} false; then :
46600  $as_echo_n "(cached) " >&6
46601else
46602  case $BUILD_STRIP in
46603  [\\/]* | ?:[\\/]*)
46604  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46605  ;;
46606  *)
46607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46608for as_dir in $PATH
46609do
46610  IFS=$as_save_IFS
46611  test -z "$as_dir" && as_dir=.
46612    for ac_exec_ext in '' $ac_executable_extensions; do
46613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46614    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46616    break 2
46617  fi
46618done
46619  done
46620IFS=$as_save_IFS
46621
46622  ;;
46623esac
46624fi
46625BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46626if test -n "$BUILD_STRIP"; then
46627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46628$as_echo "$BUILD_STRIP" >&6; }
46629else
46630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46631$as_echo "no" >&6; }
46632fi
46633
46634
46635          if test "x$BUILD_STRIP" = x; then
46636            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46637          fi
46638        else
46639          # Otherwise we believe it is a complete path. Use it as it is.
46640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46641$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46642          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46643$as_echo_n "checking for BUILD_STRIP... " >&6; }
46644          if test ! -x "$tool_specified"; then
46645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46646$as_echo "not found" >&6; }
46647            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46648          fi
46649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46650$as_echo "$tool_specified" >&6; }
46651        fi
46652      fi
46653    fi
46654
46655  fi
46656
46657
46658
46659  # Only process if variable expands to non-empty
46660
46661  if test "x$BUILD_STRIP" != x; then
46662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46663
46664  # First separate the path from the arguments. This will split at the first
46665  # space.
46666  complete="$BUILD_STRIP"
46667  path="${complete%% *}"
46668  tmp="$complete EOL"
46669  arguments="${tmp#* }"
46670
46671  # Input might be given as Windows format, start by converting to
46672  # unix format.
46673  new_path=`$CYGPATH -u "$path"`
46674
46675  # Now try to locate executable using which
46676  new_path=`$WHICH "$new_path" 2> /dev/null`
46677  # bat and cmd files are not always considered executable in cygwin causing which
46678  # to not find them
46679  if test "x$new_path" = x \
46680      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46681      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46682    new_path=`$CYGPATH -u "$path"`
46683  fi
46684  if test "x$new_path" = x; then
46685    # Oops. Which didn't find the executable.
46686    # The splitting of arguments from the executable at a space might have been incorrect,
46687    # since paths with space are more likely in Windows. Give it another try with the whole
46688    # argument.
46689    path="$complete"
46690    arguments="EOL"
46691    new_path=`$CYGPATH -u "$path"`
46692    new_path=`$WHICH "$new_path" 2> /dev/null`
46693    # bat and cmd files are not always considered executable in cygwin causing which
46694    # to not find them
46695    if test "x$new_path" = x \
46696        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46697        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46698      new_path=`$CYGPATH -u "$path"`
46699    fi
46700    if test "x$new_path" = x; then
46701      # It's still not found. Now this is an unrecoverable error.
46702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46703$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46704      has_space=`$ECHO "$complete" | $GREP " "`
46705      if test "x$has_space" != x; then
46706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46708      fi
46709      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46710    fi
46711  fi
46712
46713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46716  # "foo.exe" is OK but "foo" is an error.
46717  #
46718  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46719  # It is also a way to make sure we got the proper file name for the real test later on.
46720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46721  if test "x$test_shortpath" = x; then
46722    # Short path failed, file does not exist as specified.
46723    # Try adding .exe or .cmd
46724    if test -f "${new_path}.exe"; then
46725      input_to_shortpath="${new_path}.exe"
46726    elif test -f "${new_path}.cmd"; then
46727      input_to_shortpath="${new_path}.cmd"
46728    else
46729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46730$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46731      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46732$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46733      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46734    fi
46735  else
46736    input_to_shortpath="$new_path"
46737  fi
46738
46739  # Call helper function which possibly converts this using DOS-style short mode.
46740  # If so, the updated path is stored in $new_path.
46741  new_path="$input_to_shortpath"
46742
46743  input_path="$input_to_shortpath"
46744  # Check if we need to convert this using DOS-style short mode. If the path
46745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46746  # take no chances and rewrite it.
46747  # Note: m4 eats our [], so we need to use [ and ] instead.
46748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46749  if test "x$has_forbidden_chars" != x; then
46750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46754      # Going to short mode and back again did indeed matter. Since short mode is
46755      # case insensitive, let's make it lowercase to improve readability.
46756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46757      # Now convert it back to Unix-style (cygpath)
46758      input_path=`$CYGPATH -u "$shortmode_path"`
46759      new_path="$input_path"
46760    fi
46761  fi
46762
46763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46764  if test "x$test_cygdrive_prefix" = x; then
46765    # As a simple fix, exclude /usr/bin since it's not a real path.
46766    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46768      # a path prefixed by /cygdrive for fixpath to work.
46769      new_path="$CYGWIN_ROOT_PATH$input_path"
46770    fi
46771  fi
46772
46773  # remove trailing .exe if any
46774  new_path="${new_path/%.exe/}"
46775
46776    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46777
46778  # First separate the path from the arguments. This will split at the first
46779  # space.
46780  complete="$BUILD_STRIP"
46781  path="${complete%% *}"
46782  tmp="$complete EOL"
46783  arguments="${tmp#* }"
46784
46785  # Input might be given as Windows format, start by converting to
46786  # unix format.
46787  new_path="$path"
46788
46789  windows_path="$new_path"
46790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46791    unix_path=`$CYGPATH -u "$windows_path"`
46792    new_path="$unix_path"
46793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46795    new_path="$unix_path"
46796  fi
46797
46798
46799  # Now try to locate executable using which
46800  new_path=`$WHICH "$new_path" 2> /dev/null`
46801
46802  if test "x$new_path" = x; then
46803    # Oops. Which didn't find the executable.
46804    # The splitting of arguments from the executable at a space might have been incorrect,
46805    # since paths with space are more likely in Windows. Give it another try with the whole
46806    # argument.
46807    path="$complete"
46808    arguments="EOL"
46809    new_path="$path"
46810
46811  windows_path="$new_path"
46812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46813    unix_path=`$CYGPATH -u "$windows_path"`
46814    new_path="$unix_path"
46815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46817    new_path="$unix_path"
46818  fi
46819
46820
46821    new_path=`$WHICH "$new_path" 2> /dev/null`
46822    # bat and cmd files are not always considered executable in MSYS causing which
46823    # to not find them
46824    if test "x$new_path" = x \
46825        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46826        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46827      new_path="$path"
46828
46829  windows_path="$new_path"
46830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46831    unix_path=`$CYGPATH -u "$windows_path"`
46832    new_path="$unix_path"
46833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46835    new_path="$unix_path"
46836  fi
46837
46838    fi
46839
46840    if test "x$new_path" = x; then
46841      # It's still not found. Now this is an unrecoverable error.
46842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46843$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46844      has_space=`$ECHO "$complete" | $GREP " "`
46845      if test "x$has_space" != x; then
46846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46848      fi
46849      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46850    fi
46851  fi
46852
46853  # Now new_path has a complete unix path to the binary
46854  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46855    # Keep paths in /bin as-is, but remove trailing .exe if any
46856    new_path="${new_path/%.exe/}"
46857    # Do not save /bin paths to all_fixpath_prefixes!
46858  else
46859    # Not in mixed or Windows style, start by that.
46860    new_path=`cmd //c echo $new_path`
46861
46862  input_path="$new_path"
46863  # Check if we need to convert this using DOS-style short mode. If the path
46864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46865  # take no chances and rewrite it.
46866  # Note: m4 eats our [], so we need to use [ and ] instead.
46867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46868  if test "x$has_forbidden_chars" != x; then
46869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46871  fi
46872
46873    # Output is in $new_path
46874
46875  windows_path="$new_path"
46876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46877    unix_path=`$CYGPATH -u "$windows_path"`
46878    new_path="$unix_path"
46879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46881    new_path="$unix_path"
46882  fi
46883
46884    # remove trailing .exe if any
46885    new_path="${new_path/%.exe/}"
46886
46887    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46888    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46889  fi
46890
46891    else
46892      # We're on a unix platform. Hooray! :)
46893      # First separate the path from the arguments. This will split at the first
46894      # space.
46895      complete="$BUILD_STRIP"
46896      path="${complete%% *}"
46897      tmp="$complete EOL"
46898      arguments="${tmp#* }"
46899
46900      # Cannot rely on the command "which" here since it doesn't always work.
46901      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46902      if test -z "$is_absolute_path"; then
46903        # Path to executable is not absolute. Find it.
46904        IFS_save="$IFS"
46905        IFS=:
46906        for p in $PATH; do
46907          if test -f "$p/$path" && test -x "$p/$path"; then
46908            new_path="$p/$path"
46909            break
46910          fi
46911        done
46912        IFS="$IFS_save"
46913      else
46914        # This is an absolute path, we can use it without further modifications.
46915        new_path="$path"
46916      fi
46917
46918      if test "x$new_path" = x; then
46919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46920$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46921        has_space=`$ECHO "$complete" | $GREP " "`
46922        if test "x$has_space" != x; then
46923          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46924$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46925        fi
46926        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46927      fi
46928    fi
46929
46930    # Now join together the path and the arguments once again
46931    if test "x$arguments" != xEOL; then
46932      new_complete="$new_path ${arguments% *}"
46933    else
46934      new_complete="$new_path"
46935    fi
46936
46937    if test "x$complete" != "x$new_complete"; then
46938      BUILD_STRIP="$new_complete"
46939      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46940$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46941    fi
46942  fi
46943
46944    # Assume the C compiler is the assembler
46945    BUILD_AS="$BUILD_CC -c"
46946    # Just like for the target compiler, use the compiler as linker
46947    BUILD_LD="$BUILD_CC"
46948    BUILD_LDCXX="$BUILD_CXX"
46949
46950    PATH="$OLDPATH"
46951
46952
46953  COMPILER=$BUILD_CC
46954  COMPILER_NAME=BuildC
46955
46956  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46957    # cc -V output typically looks like
46958    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46959    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46960    # Check that this is likely to be the Solaris Studio cc.
46961    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46962    if test $? -ne 0; then
46963      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46964      { $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
46965$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46966      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46967$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46968      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46969$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46970      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46971    fi
46972    # Remove usage instructions (if present), and
46973    # collapse compiler output into a single line
46974    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46975        $SED -e 's/ *[Uu]sage:.*//'`
46976    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46977        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46978  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46979    # xlc -qversion output typically looks like
46980    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46981    #     Version: 11.01.0000.0015
46982    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46983    # Check that this is likely to be the IBM XL C compiler.
46984    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46985    if test $? -ne 0; then
46986      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46987      { $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
46988$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46989      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46990$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46991      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46992$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46993      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46994    fi
46995    # Collapse compiler output into a single line
46996    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46997    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46998        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46999  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47000    # There is no specific version flag, but all output starts with a version string.
47001    # First line typically looks something like:
47002    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47003    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47004    # Check that this is likely to be Microsoft CL.EXE.
47005    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47006    if test $? -ne 0; then
47007      { $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
47008$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47009      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47010$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47011      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47012    fi
47013    # Collapse compiler output into a single line
47014    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47015    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47016        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47017  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47018    # gcc --version output typically looks like
47019    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47020    #     Copyright (C) 2013 Free Software Foundation, Inc.
47021    #     This is free software; see the source for copying conditions.  There is NO
47022    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47023    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47024    # Check that this is likely to be GCC.
47025    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47026    if test $? -ne 0; then
47027      { $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
47028$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47029      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47030$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47031      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47032    fi
47033    # Remove Copyright and legalese from version string, and
47034    # collapse into a single line
47035    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47036        $SED -e 's/ *Copyright .*//'`
47037    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47038        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47039  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47040    # clang --version output typically looks like
47041    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47042    #    clang version 3.3 (tags/RELEASE_33/final)
47043    # or
47044    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47045    #    Target: x86_64-pc-linux-gnu
47046    #    Thread model: posix
47047    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47048    # Check that this is likely to be clang
47049    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47050    if test $? -ne 0; then
47051      { $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
47052$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47053      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47054$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47055      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47056    fi
47057    # Collapse compiler output into a single line
47058    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47059    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47060        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47061  else
47062      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47063  fi
47064  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47065  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47066  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47067  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47068
47069  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47070$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47071
47072
47073  COMPILER=$BUILD_CXX
47074  COMPILER_NAME=BuildC++
47075
47076  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47077    # cc -V output typically looks like
47078    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47079    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47080    # Check that this is likely to be the Solaris Studio cc.
47081    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47082    if test $? -ne 0; then
47083      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47084      { $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
47085$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47086      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47087$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47088      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47089$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47090      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47091    fi
47092    # Remove usage instructions (if present), and
47093    # collapse compiler output into a single line
47094    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47095        $SED -e 's/ *[Uu]sage:.*//'`
47096    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47097        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47098  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47099    # xlc -qversion output typically looks like
47100    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47101    #     Version: 11.01.0000.0015
47102    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47103    # Check that this is likely to be the IBM XL C compiler.
47104    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47105    if test $? -ne 0; then
47106      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47107      { $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
47108$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47109      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47110$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47111      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47112$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47113      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47114    fi
47115    # Collapse compiler output into a single line
47116    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47117    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47118        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47119  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47120    # There is no specific version flag, but all output starts with a version string.
47121    # First line typically looks something like:
47122    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47123    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47124    # Check that this is likely to be Microsoft CL.EXE.
47125    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47126    if test $? -ne 0; then
47127      { $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
47128$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47129      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47130$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47131      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47132    fi
47133    # Collapse compiler output into a single line
47134    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47135    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47136        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47137  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47138    # gcc --version output typically looks like
47139    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47140    #     Copyright (C) 2013 Free Software Foundation, Inc.
47141    #     This is free software; see the source for copying conditions.  There is NO
47142    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47143    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47144    # Check that this is likely to be GCC.
47145    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47146    if test $? -ne 0; then
47147      { $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
47148$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47150$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47151      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47152    fi
47153    # Remove Copyright and legalese from version string, and
47154    # collapse into a single line
47155    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47156        $SED -e 's/ *Copyright .*//'`
47157    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47158        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47159  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47160    # clang --version output typically looks like
47161    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47162    #    clang version 3.3 (tags/RELEASE_33/final)
47163    # or
47164    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47165    #    Target: x86_64-pc-linux-gnu
47166    #    Thread model: posix
47167    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47168    # Check that this is likely to be clang
47169    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47170    if test $? -ne 0; then
47171      { $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
47172$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47173      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47174$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47175      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47176    fi
47177    # Collapse compiler output into a single line
47178    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47179    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47180        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47181  else
47182      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47183  fi
47184  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47185  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47186  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47187  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47188
47189  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47190$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47191
47192
47193  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47194    { $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
47195$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47197$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47198  fi
47199
47200  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47201  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47202    { $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
47203$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;}
47204  fi
47205
47206  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47207    { $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
47208$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47209  fi
47210
47211  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47212
47213  else
47214    # If we are not cross compiling, use the normal target compilers for
47215    # building the build platform executables.
47216    BUILD_CC="$CC"
47217    BUILD_CXX="$CXX"
47218    BUILD_LD="$LD"
47219    BUILD_LDCXX="$LDCXX"
47220    BUILD_NM="$NM"
47221    BUILD_AS="$AS"
47222    BUILD_OBJCOPY="$OBJCOPY"
47223    BUILD_STRIP="$STRIP"
47224    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47225    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47226    BUILD_AR="$AR"
47227  fi
47228
47229
47230
47231
47232
47233
47234
47235
47236
47237
47238
47239
47240  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47241    # For hotspot, we need these in Windows mixed path,
47242    # so rewrite them all. Need added .exe suffix.
47243    HOTSPOT_CXX="$CXX.exe"
47244    HOTSPOT_LD="$LD.exe"
47245    HOTSPOT_MT="$MT.exe"
47246    HOTSPOT_RC="$RC.exe"
47247
47248  unix_path="$HOTSPOT_CXX"
47249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47250    windows_path=`$CYGPATH -m "$unix_path"`
47251    HOTSPOT_CXX="$windows_path"
47252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47253    windows_path=`cmd //c echo $unix_path`
47254    HOTSPOT_CXX="$windows_path"
47255  fi
47256
47257
47258  unix_path="$HOTSPOT_LD"
47259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47260    windows_path=`$CYGPATH -m "$unix_path"`
47261    HOTSPOT_LD="$windows_path"
47262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47263    windows_path=`cmd //c echo $unix_path`
47264    HOTSPOT_LD="$windows_path"
47265  fi
47266
47267
47268  unix_path="$HOTSPOT_MT"
47269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47270    windows_path=`$CYGPATH -m "$unix_path"`
47271    HOTSPOT_MT="$windows_path"
47272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47273    windows_path=`cmd //c echo $unix_path`
47274    HOTSPOT_MT="$windows_path"
47275  fi
47276
47277
47278  unix_path="$HOTSPOT_RC"
47279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47280    windows_path=`$CYGPATH -m "$unix_path"`
47281    HOTSPOT_RC="$windows_path"
47282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47283    windows_path=`cmd //c echo $unix_path`
47284    HOTSPOT_RC="$windows_path"
47285  fi
47286
47287
47288
47289  else
47290    HOTSPOT_CXX="$CXX"
47291    HOTSPOT_LD="$LD"
47292  fi
47293
47294
47295
47296  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47297    USE_CLANG=true
47298  fi
47299
47300
47301
47302
47303
47304  # The package path is used only on macosx?
47305  # FIXME: clean this up, and/or move it elsewhere.
47306  PACKAGE_PATH=/opt/local
47307
47308
47309  # Check for extra potential brokenness.
47310  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47311    # On Windows, double-check that we got the right compiler.
47312    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47313    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47314    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47315      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47316        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
47317      fi
47318    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47319      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47320        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47321      fi
47322    fi
47323  fi
47324
47325  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47326    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47327    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47328    # This is later checked when setting flags.
47329
47330    # "-Og" suppported for GCC 4.8 and later
47331    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379    # Execute function body
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
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    # Execute function body
47429
47430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47431$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47432  supports=yes
47433
47434  saved_cflags="$CFLAGS"
47435  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47436  ac_ext=c
47437ac_cpp='$CPP $CPPFLAGS'
47438ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47439ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47440ac_compiler_gnu=$ac_cv_c_compiler_gnu
47441
47442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47443/* end confdefs.h.  */
47444int i;
47445_ACEOF
47446if ac_fn_c_try_compile "$LINENO"; then :
47447
47448else
47449  supports=no
47450fi
47451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47452  ac_ext=cpp
47453ac_cpp='$CXXCPP $CPPFLAGS'
47454ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47455ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47456ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47457
47458  CFLAGS="$saved_cflags"
47459
47460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47461$as_echo "$supports" >&6; }
47462  if test "x$supports" = "xyes" ; then
47463    :
47464    C_COMP_SUPPORTS="yes"
47465  else
47466    :
47467    C_COMP_SUPPORTS="no"
47468  fi
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
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    # Execute function body
47529
47530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47531$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47532  supports=yes
47533
47534  saved_cxxflags="$CXXFLAGS"
47535  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47536  ac_ext=cpp
47537ac_cpp='$CXXCPP $CPPFLAGS'
47538ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47539ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47540ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47541
47542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47543/* end confdefs.h.  */
47544int i;
47545_ACEOF
47546if ac_fn_cxx_try_compile "$LINENO"; then :
47547
47548else
47549  supports=no
47550fi
47551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47552  ac_ext=cpp
47553ac_cpp='$CXXCPP $CPPFLAGS'
47554ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47555ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47556ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47557
47558  CXXFLAGS="$saved_cxxflags"
47559
47560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47561$as_echo "$supports" >&6; }
47562  if test "x$supports" = "xyes" ; then
47563    :
47564    CXX_COMP_SUPPORTS="yes"
47565  else
47566    :
47567    CXX_COMP_SUPPORTS="no"
47568  fi
47569
47570
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580
47581
47582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47583$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47584  supports=no
47585  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47586
47587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47588$as_echo "$supports" >&6; }
47589  if test "x$supports" = "xyes" ; then
47590    :
47591    HAS_CFLAG_OPTIMIZE_DEBUG=true
47592  else
47593    :
47594    HAS_CFLAG_OPTIMIZE_DEBUG=false
47595  fi
47596
47597
47598
47599
47600
47601
47602
47603    # "-z relro" supported in GNU binutils 2.17 and later
47604    LINKER_RELRO_FLAG="-Wl,-z,relro"
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652    # Execute function body
47653
47654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47655$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47656  supports=yes
47657
47658  saved_ldflags="$LDFLAGS"
47659  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47660  ac_ext=c
47661ac_cpp='$CPP $CPPFLAGS'
47662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47664ac_compiler_gnu=$ac_cv_c_compiler_gnu
47665
47666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47667/* end confdefs.h.  */
47668
47669int
47670main ()
47671{
47672
47673  ;
47674  return 0;
47675}
47676_ACEOF
47677if ac_fn_c_try_link "$LINENO"; then :
47678
47679else
47680  supports=no
47681fi
47682rm -f core conftest.err conftest.$ac_objext \
47683    conftest$ac_exeext conftest.$ac_ext
47684  ac_ext=cpp
47685ac_cpp='$CXXCPP $CPPFLAGS'
47686ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47687ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47688ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47689
47690  LDFLAGS="$saved_ldflags"
47691
47692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47693$as_echo "$supports" >&6; }
47694  if test "x$supports" = "xyes" ; then
47695    :
47696    HAS_LINKER_RELRO=true
47697  else
47698    :
47699    HAS_LINKER_RELRO=false
47700  fi
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714    # "-z now" supported in GNU binutils 2.11 and later
47715    LINKER_NOW_FLAG="-Wl,-z,now"
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763    # Execute function body
47764
47765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47766$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47767  supports=yes
47768
47769  saved_ldflags="$LDFLAGS"
47770  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47771  ac_ext=c
47772ac_cpp='$CPP $CPPFLAGS'
47773ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47774ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47775ac_compiler_gnu=$ac_cv_c_compiler_gnu
47776
47777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47778/* end confdefs.h.  */
47779
47780int
47781main ()
47782{
47783
47784  ;
47785  return 0;
47786}
47787_ACEOF
47788if ac_fn_c_try_link "$LINENO"; then :
47789
47790else
47791  supports=no
47792fi
47793rm -f core conftest.err conftest.$ac_objext \
47794    conftest$ac_exeext conftest.$ac_ext
47795  ac_ext=cpp
47796ac_cpp='$CXXCPP $CPPFLAGS'
47797ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47798ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47799ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47800
47801  LDFLAGS="$saved_ldflags"
47802
47803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47804$as_echo "$supports" >&6; }
47805  if test "x$supports" = "xyes" ; then
47806    :
47807    HAS_LINKER_NOW=true
47808  else
47809    :
47810    HAS_LINKER_NOW=false
47811  fi
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824  fi
47825
47826  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47827  # in executable.'
47828  USING_BROKEN_SUSE_LD=no
47829  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47831$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47832    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47833    $ECHO "int main() { }" > main.c
47834    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47836$as_echo "no" >&6; }
47837      USING_BROKEN_SUSE_LD=no
47838    else
47839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47840$as_echo "yes" >&6; }
47841      USING_BROKEN_SUSE_LD=yes
47842    fi
47843    rm -rf version-script.map main.c a.out
47844  fi
47845
47846
47847  # Setup hotspot lecagy names for toolchains
47848  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47849  if test "x$TOOLCHAIN_TYPE" = xclang; then
47850    HOTSPOT_TOOLCHAIN_TYPE=gcc
47851  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47852    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47853  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47854    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47855  fi
47856
47857
47858
47859# Setup the JTReg Regression Test Harness.
47860
47861
47862# Check whether --with-jtreg was given.
47863if test "${with_jtreg+set}" = set; then :
47864  withval=$with_jtreg;
47865else
47866  with_jtreg=no
47867fi
47868
47869
47870  if test "x$with_jtreg" = xno; then
47871    # jtreg disabled
47872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47873$as_echo_n "checking for jtreg... " >&6; }
47874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47875$as_echo "no" >&6; }
47876  else
47877    if test "x$with_jtreg" != xyes; then
47878      # with path specified.
47879      JT_HOME="$with_jtreg"
47880    fi
47881
47882    if test "x$JT_HOME" != x; then
47883      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47884$as_echo_n "checking for jtreg... " >&6; }
47885
47886      # use JT_HOME enviroment var.
47887
47888  # Only process if variable expands to non-empty
47889
47890  if test "x$JT_HOME" != x; then
47891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47892
47893  # Input might be given as Windows format, start by converting to
47894  # unix format.
47895  path="$JT_HOME"
47896  new_path=`$CYGPATH -u "$path"`
47897
47898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47901  # "foo.exe" is OK but "foo" is an error.
47902  #
47903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47904  # It is also a way to make sure we got the proper file name for the real test later on.
47905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47906  if test "x$test_shortpath" = x; then
47907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47908$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47909    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47910  fi
47911
47912  # Call helper function which possibly converts this using DOS-style short mode.
47913  # If so, the updated path is stored in $new_path.
47914
47915  input_path="$new_path"
47916  # Check if we need to convert this using DOS-style short mode. If the path
47917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47918  # take no chances and rewrite it.
47919  # Note: m4 eats our [], so we need to use [ and ] instead.
47920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47921  if test "x$has_forbidden_chars" != x; then
47922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47926      # Going to short mode and back again did indeed matter. Since short mode is
47927      # case insensitive, let's make it lowercase to improve readability.
47928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47929      # Now convert it back to Unix-style (cygpath)
47930      input_path=`$CYGPATH -u "$shortmode_path"`
47931      new_path="$input_path"
47932    fi
47933  fi
47934
47935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47936  if test "x$test_cygdrive_prefix" = x; then
47937    # As a simple fix, exclude /usr/bin since it's not a real path.
47938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47940      # a path prefixed by /cygdrive for fixpath to work.
47941      new_path="$CYGWIN_ROOT_PATH$input_path"
47942    fi
47943  fi
47944
47945
47946  if test "x$path" != "x$new_path"; then
47947    JT_HOME="$new_path"
47948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47949$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47950  fi
47951
47952    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47953
47954  path="$JT_HOME"
47955  has_colon=`$ECHO $path | $GREP ^.:`
47956  new_path="$path"
47957  if test "x$has_colon" = x; then
47958    # Not in mixed or Windows style, start by that.
47959    new_path=`cmd //c echo $path`
47960  fi
47961
47962
47963  input_path="$new_path"
47964  # Check if we need to convert this using DOS-style short mode. If the path
47965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47966  # take no chances and rewrite it.
47967  # Note: m4 eats our [], so we need to use [ and ] instead.
47968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47969  if test "x$has_forbidden_chars" != x; then
47970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47972  fi
47973
47974
47975  windows_path="$new_path"
47976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47977    unix_path=`$CYGPATH -u "$windows_path"`
47978    new_path="$unix_path"
47979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47981    new_path="$unix_path"
47982  fi
47983
47984  if test "x$path" != "x$new_path"; then
47985    JT_HOME="$new_path"
47986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47987$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47988  fi
47989
47990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47992
47993    else
47994      # We're on a unix platform. Hooray! :)
47995      path="$JT_HOME"
47996      has_space=`$ECHO "$path" | $GREP " "`
47997      if test "x$has_space" != x; then
47998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47999$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48000        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48001      fi
48002
48003      # Use eval to expand a potential ~
48004      eval path="$path"
48005      if test ! -f "$path" && test ! -d "$path"; then
48006        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48007      fi
48008
48009      if test -d "$path"; then
48010        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48011      else
48012        dir="`$DIRNAME "$path"`"
48013        base="`$BASENAME "$path"`"
48014        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48015      fi
48016    fi
48017  fi
48018
48019
48020      # jtreg win32 script works for everybody
48021      JTREGEXE="$JT_HOME/bin/jtreg"
48022
48023      if test ! -f "$JTREGEXE"; then
48024        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48025      fi
48026
48027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48028$as_echo "$JTREGEXE" >&6; }
48029    else
48030      # try to find jtreg on path
48031
48032
48033
48034  # Publish this variable in the help.
48035
48036
48037  if [ -z "${JTREGEXE+x}" ]; then
48038    # The variable is not set by user, try to locate tool using the code snippet
48039    for ac_prog in jtreg
48040do
48041  # Extract the first word of "$ac_prog", so it can be a program name with args.
48042set dummy $ac_prog; ac_word=$2
48043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48044$as_echo_n "checking for $ac_word... " >&6; }
48045if ${ac_cv_path_JTREGEXE+:} false; then :
48046  $as_echo_n "(cached) " >&6
48047else
48048  case $JTREGEXE in
48049  [\\/]* | ?:[\\/]*)
48050  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48051  ;;
48052  *)
48053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48054for as_dir in $PATH
48055do
48056  IFS=$as_save_IFS
48057  test -z "$as_dir" && as_dir=.
48058    for ac_exec_ext in '' $ac_executable_extensions; do
48059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48060    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48062    break 2
48063  fi
48064done
48065  done
48066IFS=$as_save_IFS
48067
48068  ;;
48069esac
48070fi
48071JTREGEXE=$ac_cv_path_JTREGEXE
48072if test -n "$JTREGEXE"; then
48073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48074$as_echo "$JTREGEXE" >&6; }
48075else
48076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48077$as_echo "no" >&6; }
48078fi
48079
48080
48081  test -n "$JTREGEXE" && break
48082done
48083
48084  else
48085    # The variable is set, but is it from the command line or the environment?
48086
48087    # Try to remove the string !JTREGEXE! from our list.
48088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48090      # If it failed, the variable was not from the command line. Ignore it,
48091      # but warn the user (except for BASH, which is always set by the calling BASH).
48092      if test "xJTREGEXE" != xBASH; then
48093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48094$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48095      fi
48096      # Try to locate tool using the code snippet
48097      for ac_prog in jtreg
48098do
48099  # Extract the first word of "$ac_prog", so it can be a program name with args.
48100set dummy $ac_prog; ac_word=$2
48101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48102$as_echo_n "checking for $ac_word... " >&6; }
48103if ${ac_cv_path_JTREGEXE+:} false; then :
48104  $as_echo_n "(cached) " >&6
48105else
48106  case $JTREGEXE in
48107  [\\/]* | ?:[\\/]*)
48108  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48109  ;;
48110  *)
48111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48112for as_dir in $PATH
48113do
48114  IFS=$as_save_IFS
48115  test -z "$as_dir" && as_dir=.
48116    for ac_exec_ext in '' $ac_executable_extensions; do
48117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48118    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48120    break 2
48121  fi
48122done
48123  done
48124IFS=$as_save_IFS
48125
48126  ;;
48127esac
48128fi
48129JTREGEXE=$ac_cv_path_JTREGEXE
48130if test -n "$JTREGEXE"; then
48131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48132$as_echo "$JTREGEXE" >&6; }
48133else
48134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48135$as_echo "no" >&6; }
48136fi
48137
48138
48139  test -n "$JTREGEXE" && break
48140done
48141
48142    else
48143      # If it succeeded, then it was overridden by the user. We will use it
48144      # for the tool.
48145
48146      # First remove it from the list of overridden variables, so we can test
48147      # for unknown variables in the end.
48148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48149
48150      # Check if we try to supply an empty value
48151      if test "x$JTREGEXE" = x; then
48152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48153$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48155$as_echo_n "checking for JTREGEXE... " >&6; }
48156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48157$as_echo "disabled" >&6; }
48158      else
48159        # Check if the provided tool contains a complete path.
48160        tool_specified="$JTREGEXE"
48161        tool_basename="${tool_specified##*/}"
48162        if test "x$tool_basename" = "x$tool_specified"; then
48163          # A command without a complete path is provided, search $PATH.
48164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48165$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48166          # Extract the first word of "$tool_basename", so it can be a program name with args.
48167set dummy $tool_basename; ac_word=$2
48168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48169$as_echo_n "checking for $ac_word... " >&6; }
48170if ${ac_cv_path_JTREGEXE+:} false; then :
48171  $as_echo_n "(cached) " >&6
48172else
48173  case $JTREGEXE in
48174  [\\/]* | ?:[\\/]*)
48175  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48176  ;;
48177  *)
48178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48179for as_dir in $PATH
48180do
48181  IFS=$as_save_IFS
48182  test -z "$as_dir" && as_dir=.
48183    for ac_exec_ext in '' $ac_executable_extensions; do
48184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48185    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48187    break 2
48188  fi
48189done
48190  done
48191IFS=$as_save_IFS
48192
48193  ;;
48194esac
48195fi
48196JTREGEXE=$ac_cv_path_JTREGEXE
48197if test -n "$JTREGEXE"; then
48198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48199$as_echo "$JTREGEXE" >&6; }
48200else
48201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48202$as_echo "no" >&6; }
48203fi
48204
48205
48206          if test "x$JTREGEXE" = x; then
48207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48208          fi
48209        else
48210          # Otherwise we believe it is a complete path. Use it as it is.
48211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48212$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48214$as_echo_n "checking for JTREGEXE... " >&6; }
48215          if test ! -x "$tool_specified"; then
48216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48217$as_echo "not found" >&6; }
48218            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48219          fi
48220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48221$as_echo "$tool_specified" >&6; }
48222        fi
48223      fi
48224    fi
48225
48226  fi
48227
48228
48229
48230  if test "x$JTREGEXE" = x; then
48231    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48232  fi
48233
48234
48235      JT_HOME="`$DIRNAME $JTREGEXE`"
48236    fi
48237  fi
48238
48239
48240
48241
48242
48243
48244  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48245  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48246  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48247  #                              commands produced by the link step (currently AIX only)
48248  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48249    COMPILER_TARGET_BITS_FLAG="-q"
48250    COMPILER_COMMAND_FILE_FLAG="-f"
48251    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48252  else
48253    COMPILER_TARGET_BITS_FLAG="-m"
48254    COMPILER_COMMAND_FILE_FLAG="@"
48255    COMPILER_BINDCMD_FILE_FLAG=""
48256
48257    # The solstudio linker does not support @-files.
48258    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48259      COMPILER_COMMAND_FILE_FLAG=
48260    fi
48261
48262    # Check if @file is supported by gcc
48263    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48264      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48265$as_echo_n "checking if @file is supported by gcc... " >&6; }
48266      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48267      $ECHO "" "--version" > command.file
48268      if $CXX @command.file 2>&5 >&5; then
48269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48270$as_echo "yes" >&6; }
48271        COMPILER_COMMAND_FILE_FLAG="@"
48272      else
48273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48274$as_echo "no" >&6; }
48275        COMPILER_COMMAND_FILE_FLAG=
48276      fi
48277      rm -rf command.file
48278    fi
48279  fi
48280
48281
48282
48283
48284  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48285  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48286    ARFLAGS="-r"
48287  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48288    ARFLAGS="-X64"
48289  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48290    # lib.exe is used as AR to create static libraries.
48291    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48292  else
48293    ARFLAGS=""
48294  fi
48295
48296
48297  ## Setup strip.
48298  # FIXME: should this really be per platform, or should it be per toolchain type?
48299  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48300  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48301  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48302    STRIPFLAGS="-g"
48303  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48304    STRIPFLAGS="-x"
48305  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48306    STRIPFLAGS="-S"
48307  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48308    STRIPFLAGS="-X32_64"
48309  fi
48310
48311
48312
48313  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48314    CC_OUT_OPTION=-Fo
48315    EXE_OUT_OPTION=-out:
48316    LD_OUT_OPTION=-out:
48317    AR_OUT_OPTION=-out:
48318  else
48319    # The option used to specify the target .o,.a or .so file.
48320    # When compiling, how to specify the to be created object file.
48321    CC_OUT_OPTION='-o$(SPACE)'
48322    # When linking, how to specify the to be created executable.
48323    EXE_OUT_OPTION='-o$(SPACE)'
48324    # When linking, how to specify the to be created dynamically linkable library.
48325    LD_OUT_OPTION='-o$(SPACE)'
48326    # When archiving, how to specify the to be create static archive for object files.
48327    AR_OUT_OPTION='rcs$(SPACE)'
48328  fi
48329
48330
48331
48332
48333
48334  # On Windows, we need to set RC flags.
48335  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48336    RC_FLAGS="-nologo -l0x409"
48337    JVM_RCFLAGS="-nologo"
48338    if test "x$DEBUG_LEVEL" = xrelease; then
48339      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48340      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48341    fi
48342
48343    # The version variables used to create RC_FLAGS may be overridden
48344    # in a custom configure script, or possibly the command line.
48345    # Let those variables be expanded at make time in spec.gmk.
48346    # The \$ are escaped to the shell, and the $(...) variables
48347    # are evaluated by make.
48348    RC_FLAGS="$RC_FLAGS \
48349        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48350        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48351        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48352        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48353        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48354        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48355        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48356
48357    JVM_RCFLAGS="$JVM_RCFLAGS \
48358        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48359        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48360        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48361        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48362        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48363        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48364        -D\"HS_FNAME=jvm.dll\" \
48365        -D\"HS_INTERNAL_NAME=jvm\""
48366  fi
48367
48368
48369
48370  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48371    # silence copyright notice and other headers.
48372    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48373  fi
48374
48375
48376# Now we can test some aspects on the target using configure macros.
48377
48378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48379$as_echo_n "checking for ANSI C header files... " >&6; }
48380if ${ac_cv_header_stdc+:} false; then :
48381  $as_echo_n "(cached) " >&6
48382else
48383  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48384/* end confdefs.h.  */
48385#include <stdlib.h>
48386#include <stdarg.h>
48387#include <string.h>
48388#include <float.h>
48389
48390int
48391main ()
48392{
48393
48394  ;
48395  return 0;
48396}
48397_ACEOF
48398if ac_fn_cxx_try_compile "$LINENO"; then :
48399  ac_cv_header_stdc=yes
48400else
48401  ac_cv_header_stdc=no
48402fi
48403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48404
48405if test $ac_cv_header_stdc = yes; then
48406  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48408/* end confdefs.h.  */
48409#include <string.h>
48410
48411_ACEOF
48412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48413  $EGREP "memchr" >/dev/null 2>&1; then :
48414
48415else
48416  ac_cv_header_stdc=no
48417fi
48418rm -f conftest*
48419
48420fi
48421
48422if test $ac_cv_header_stdc = yes; then
48423  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48425/* end confdefs.h.  */
48426#include <stdlib.h>
48427
48428_ACEOF
48429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48430  $EGREP "free" >/dev/null 2>&1; then :
48431
48432else
48433  ac_cv_header_stdc=no
48434fi
48435rm -f conftest*
48436
48437fi
48438
48439if test $ac_cv_header_stdc = yes; then
48440  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48441  if test "$cross_compiling" = yes; then :
48442  :
48443else
48444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48445/* end confdefs.h.  */
48446#include <ctype.h>
48447#include <stdlib.h>
48448#if ((' ' & 0x0FF) == 0x020)
48449# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48450# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48451#else
48452# define ISLOWER(c) \
48453		   (('a' <= (c) && (c) <= 'i') \
48454		     || ('j' <= (c) && (c) <= 'r') \
48455		     || ('s' <= (c) && (c) <= 'z'))
48456# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48457#endif
48458
48459#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48460int
48461main ()
48462{
48463  int i;
48464  for (i = 0; i < 256; i++)
48465    if (XOR (islower (i), ISLOWER (i))
48466	|| toupper (i) != TOUPPER (i))
48467      return 2;
48468  return 0;
48469}
48470_ACEOF
48471if ac_fn_cxx_try_run "$LINENO"; then :
48472
48473else
48474  ac_cv_header_stdc=no
48475fi
48476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48477  conftest.$ac_objext conftest.beam conftest.$ac_ext
48478fi
48479
48480fi
48481fi
48482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48483$as_echo "$ac_cv_header_stdc" >&6; }
48484if test $ac_cv_header_stdc = yes; then
48485
48486$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48487
48488fi
48489
48490# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48491for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48492		  inttypes.h stdint.h unistd.h
48493do :
48494  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48495ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48496"
48497if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48498  cat >>confdefs.h <<_ACEOF
48499#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48500_ACEOF
48501
48502fi
48503
48504done
48505
48506
48507
48508  ###############################################################################
48509  #
48510  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48511  # (The JVM can use 32 or 64 bit Java pointers but that decision
48512  # is made at runtime.)
48513  #
48514
48515  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48516    # Always specify -m flag on Solaris
48517    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48518
48519  # When we add flags to the "official" CFLAGS etc, we need to
48520  # keep track of these additions in ADDED_CFLAGS etc. These
48521  # will later be checked to make sure only controlled additions
48522  # have been made to CFLAGS etc.
48523  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48524  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48525  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48526
48527  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48528  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48529  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48530
48531  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48532  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48533  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48534
48535  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48536  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48537  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48538
48539  elif test "x$COMPILE_TYPE" = xreduced; then
48540    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48541      # Specify -m if running reduced on unix platforms
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    fi
48564  fi
48565  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48566    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48567    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48568    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48569  fi
48570
48571  # Make compilation sanity check
48572  for ac_header in stdio.h
48573do :
48574  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48575if test "x$ac_cv_header_stdio_h" = xyes; then :
48576  cat >>confdefs.h <<_ACEOF
48577#define HAVE_STDIO_H 1
48578_ACEOF
48579
48580else
48581
48582    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48583$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48584    if test "x$COMPILE_TYPE" = xreduced; then
48585
48586  # Print a helpful message on how to acquire the necessary build dependency.
48587  # reduced is the help tag: freetype, cups, alsa etc
48588  MISSING_DEPENDENCY=reduced
48589
48590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48591    cygwin_help $MISSING_DEPENDENCY
48592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48593    msys_help $MISSING_DEPENDENCY
48594  else
48595    PKGHANDLER_COMMAND=
48596
48597    case $PKGHANDLER in
48598      apt-get)
48599        apt_help     $MISSING_DEPENDENCY ;;
48600      yum)
48601        yum_help     $MISSING_DEPENDENCY ;;
48602      port)
48603        port_help    $MISSING_DEPENDENCY ;;
48604      pkgutil)
48605        pkgutil_help $MISSING_DEPENDENCY ;;
48606      pkgadd)
48607        pkgadd_help  $MISSING_DEPENDENCY ;;
48608    esac
48609
48610    if test "x$PKGHANDLER_COMMAND" != x; then
48611      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48612    fi
48613  fi
48614
48615      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48616$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48617    elif test "x$COMPILE_TYPE" = xcross; then
48618      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48619$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48620    fi
48621    as_fn_error $? "Cannot continue." "$LINENO" 5
48622
48623fi
48624
48625done
48626
48627
48628  # The cast to long int works around a bug in the HP C Compiler
48629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48631# This bug is HP SR number 8606223364.
48632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48633$as_echo_n "checking size of int *... " >&6; }
48634if ${ac_cv_sizeof_int_p+:} false; then :
48635  $as_echo_n "(cached) " >&6
48636else
48637  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48638
48639else
48640  if test "$ac_cv_type_int_p" = yes; then
48641     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48643as_fn_error 77 "cannot compute sizeof (int *)
48644See \`config.log' for more details" "$LINENO" 5; }
48645   else
48646     ac_cv_sizeof_int_p=0
48647   fi
48648fi
48649
48650fi
48651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48652$as_echo "$ac_cv_sizeof_int_p" >&6; }
48653
48654
48655
48656cat >>confdefs.h <<_ACEOF
48657#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48658_ACEOF
48659
48660
48661
48662  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48663  if test "x$ac_cv_sizeof_int_p" = x; then
48664    # The test failed, lets stick to the assumed value.
48665    { $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
48666$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48667  else
48668    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48669
48670    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48671      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48672      # Let's try to implicitely set the compilers target architecture and retry the test
48673      { $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
48674$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;}
48675      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48676$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48677
48678  # When we add flags to the "official" CFLAGS etc, we need to
48679  # keep track of these additions in ADDED_CFLAGS etc. These
48680  # will later be checked to make sure only controlled additions
48681  # have been made to CFLAGS etc.
48682  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48683  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48684  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48685
48686  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48687  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48688  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48689
48690  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48691  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48692  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48693
48694  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48695  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48696  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48697
48698
48699      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48700      unset ac_cv_sizeof_int_p
48701      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48702      cat >>confdefs.h <<_ACEOF
48703#undef SIZEOF_INT_P
48704_ACEOF
48705
48706      # The cast to long int works around a bug in the HP C Compiler
48707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48709# This bug is HP SR number 8606223364.
48710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48711$as_echo_n "checking size of int *... " >&6; }
48712if ${ac_cv_sizeof_int_p+:} false; then :
48713  $as_echo_n "(cached) " >&6
48714else
48715  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48716
48717else
48718  if test "$ac_cv_type_int_p" = yes; then
48719     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48721as_fn_error 77 "cannot compute sizeof (int *)
48722See \`config.log' for more details" "$LINENO" 5; }
48723   else
48724     ac_cv_sizeof_int_p=0
48725   fi
48726fi
48727
48728fi
48729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48730$as_echo "$ac_cv_sizeof_int_p" >&6; }
48731
48732
48733
48734cat >>confdefs.h <<_ACEOF
48735#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48736_ACEOF
48737
48738
48739
48740      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48741
48742      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48743        { $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
48744$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;}
48745        if test "x$COMPILE_TYPE" = xreduced; then
48746
48747  # Print a helpful message on how to acquire the necessary build dependency.
48748  # reduced is the help tag: freetype, cups, alsa etc
48749  MISSING_DEPENDENCY=reduced
48750
48751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48752    cygwin_help $MISSING_DEPENDENCY
48753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48754    msys_help $MISSING_DEPENDENCY
48755  else
48756    PKGHANDLER_COMMAND=
48757
48758    case $PKGHANDLER in
48759      apt-get)
48760        apt_help     $MISSING_DEPENDENCY ;;
48761      yum)
48762        yum_help     $MISSING_DEPENDENCY ;;
48763      port)
48764        port_help    $MISSING_DEPENDENCY ;;
48765      pkgutil)
48766        pkgutil_help $MISSING_DEPENDENCY ;;
48767      pkgadd)
48768        pkgadd_help  $MISSING_DEPENDENCY ;;
48769    esac
48770
48771    if test "x$PKGHANDLER_COMMAND" != x; then
48772      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48773    fi
48774  fi
48775
48776          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48777$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48778        elif test "x$COMPILE_TYPE" = xcross; then
48779          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48780$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48781        fi
48782        as_fn_error $? "Cannot continue." "$LINENO" 5
48783      fi
48784    fi
48785  fi
48786
48787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48788$as_echo_n "checking for target address size... " >&6; }
48789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48790$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48791
48792
48793  ###############################################################################
48794  #
48795  # Is the target little of big endian?
48796  #
48797   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48798$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48799if ${ac_cv_c_bigendian+:} false; then :
48800  $as_echo_n "(cached) " >&6
48801else
48802  ac_cv_c_bigendian=unknown
48803    # See if we're dealing with a universal compiler.
48804    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48805/* end confdefs.h.  */
48806#ifndef __APPLE_CC__
48807	       not a universal capable compiler
48808	     #endif
48809	     typedef int dummy;
48810
48811_ACEOF
48812if ac_fn_cxx_try_compile "$LINENO"; then :
48813
48814	# Check for potential -arch flags.  It is not universal unless
48815	# there are at least two -arch flags with different values.
48816	ac_arch=
48817	ac_prev=
48818	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48819	 if test -n "$ac_prev"; then
48820	   case $ac_word in
48821	     i?86 | x86_64 | ppc | ppc64)
48822	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48823		 ac_arch=$ac_word
48824	       else
48825		 ac_cv_c_bigendian=universal
48826		 break
48827	       fi
48828	       ;;
48829	   esac
48830	   ac_prev=
48831	 elif test "x$ac_word" = "x-arch"; then
48832	   ac_prev=arch
48833	 fi
48834       done
48835fi
48836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48837    if test $ac_cv_c_bigendian = unknown; then
48838      # See if sys/param.h defines the BYTE_ORDER macro.
48839      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48840/* end confdefs.h.  */
48841#include <sys/types.h>
48842	     #include <sys/param.h>
48843
48844int
48845main ()
48846{
48847#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48848		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48849		     && LITTLE_ENDIAN)
48850	      bogus endian macros
48851	     #endif
48852
48853  ;
48854  return 0;
48855}
48856_ACEOF
48857if ac_fn_cxx_try_compile "$LINENO"; then :
48858  # It does; now see whether it defined to BIG_ENDIAN or not.
48859	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48860/* end confdefs.h.  */
48861#include <sys/types.h>
48862		#include <sys/param.h>
48863
48864int
48865main ()
48866{
48867#if BYTE_ORDER != BIG_ENDIAN
48868		 not big endian
48869		#endif
48870
48871  ;
48872  return 0;
48873}
48874_ACEOF
48875if ac_fn_cxx_try_compile "$LINENO"; then :
48876  ac_cv_c_bigendian=yes
48877else
48878  ac_cv_c_bigendian=no
48879fi
48880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48881fi
48882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48883    fi
48884    if test $ac_cv_c_bigendian = unknown; then
48885      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48886      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48887/* end confdefs.h.  */
48888#include <limits.h>
48889
48890int
48891main ()
48892{
48893#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48894	      bogus endian macros
48895	     #endif
48896
48897  ;
48898  return 0;
48899}
48900_ACEOF
48901if ac_fn_cxx_try_compile "$LINENO"; then :
48902  # It does; now see whether it defined to _BIG_ENDIAN or not.
48903	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48904/* end confdefs.h.  */
48905#include <limits.h>
48906
48907int
48908main ()
48909{
48910#ifndef _BIG_ENDIAN
48911		 not big endian
48912		#endif
48913
48914  ;
48915  return 0;
48916}
48917_ACEOF
48918if ac_fn_cxx_try_compile "$LINENO"; then :
48919  ac_cv_c_bigendian=yes
48920else
48921  ac_cv_c_bigendian=no
48922fi
48923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48924fi
48925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48926    fi
48927    if test $ac_cv_c_bigendian = unknown; then
48928      # Compile a test program.
48929      if test "$cross_compiling" = yes; then :
48930  # Try to guess by grepping values from an object file.
48931	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48932/* end confdefs.h.  */
48933short int ascii_mm[] =
48934		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48935		short int ascii_ii[] =
48936		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48937		int use_ascii (int i) {
48938		  return ascii_mm[i] + ascii_ii[i];
48939		}
48940		short int ebcdic_ii[] =
48941		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48942		short int ebcdic_mm[] =
48943		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48944		int use_ebcdic (int i) {
48945		  return ebcdic_mm[i] + ebcdic_ii[i];
48946		}
48947		extern int foo;
48948
48949int
48950main ()
48951{
48952return use_ascii (foo) == use_ebcdic (foo);
48953  ;
48954  return 0;
48955}
48956_ACEOF
48957if ac_fn_cxx_try_compile "$LINENO"; then :
48958  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48959	      ac_cv_c_bigendian=yes
48960	    fi
48961	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48962	      if test "$ac_cv_c_bigendian" = unknown; then
48963		ac_cv_c_bigendian=no
48964	      else
48965		# finding both strings is unlikely to happen, but who knows?
48966		ac_cv_c_bigendian=unknown
48967	      fi
48968	    fi
48969fi
48970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48971else
48972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48973/* end confdefs.h.  */
48974$ac_includes_default
48975int
48976main ()
48977{
48978
48979	     /* Are we little or big endian?  From Harbison&Steele.  */
48980	     union
48981	     {
48982	       long int l;
48983	       char c[sizeof (long int)];
48984	     } u;
48985	     u.l = 1;
48986	     return u.c[sizeof (long int) - 1] == 1;
48987
48988  ;
48989  return 0;
48990}
48991_ACEOF
48992if ac_fn_cxx_try_run "$LINENO"; then :
48993  ac_cv_c_bigendian=no
48994else
48995  ac_cv_c_bigendian=yes
48996fi
48997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48998  conftest.$ac_objext conftest.beam conftest.$ac_ext
48999fi
49000
49001    fi
49002fi
49003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49004$as_echo "$ac_cv_c_bigendian" >&6; }
49005 case $ac_cv_c_bigendian in #(
49006   yes)
49007     ENDIAN="big";; #(
49008   no)
49009     ENDIAN="little" ;; #(
49010   universal)
49011     ENDIAN="universal_endianness"
49012     ;; #(
49013   *)
49014     ENDIAN="unknown" ;;
49015 esac
49016
49017
49018  if test "x$ENDIAN" = xuniversal_endianness; then
49019    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49020  fi
49021  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49022    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
49023  fi
49024
49025
49026# Configure flags for the tools
49027
49028  ###############################################################################
49029  #
49030  # How to compile shared libraries.
49031  #
49032
49033  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49034    PICFLAG="-fPIC"
49035    C_FLAG_REORDER=''
49036    CXX_FLAG_REORDER=''
49037
49038    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49039      # Linking is different on MacOSX
49040      if test "x$STATIC_BUILD" = xtrue; then
49041        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49042      else
49043        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49044        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49045      fi
49046      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49047      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49048      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49049      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49050    else
49051      # Default works for linux, might work on other platforms as well.
49052      SHARED_LIBRARY_FLAGS='-shared'
49053      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49054      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49055      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49056      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49057    fi
49058  elif test "x$TOOLCHAIN_TYPE" = xclang; then
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      PICFLAG=''
49065      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49066      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49067      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49068      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49069      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49070
49071      if test "x$STATIC_BUILD" = xfalse; then
49072        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49073      fi
49074    else
49075      # Default works for linux, might work on other platforms as well.
49076      PICFLAG='-fPIC'
49077      SHARED_LIBRARY_FLAGS='-shared'
49078      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49079      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49080      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49081      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49082    fi
49083  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49084    PICFLAG="-KPIC"
49085    C_FLAG_REORDER='-xF'
49086    CXX_FLAG_REORDER='-xF'
49087    SHARED_LIBRARY_FLAGS="-G"
49088    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49089    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49090    SET_SHARED_LIBRARY_NAME='-h $1'
49091    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49092  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49093    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49094    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49095    # will have to patch this single instruction with a call to some out-of-order code which
49096    # does the load from the TOC. This is of course slow. But in that case we also would have
49097    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49098    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49099    # can be patched directly by the linker and does not require a jump to out-of-order code.
49100    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49101    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49102    # loads for accessing a global variable). But there are rumors that this may be seen as a
49103    # 'performance feature' because of improved code locality of the symbols used in a
49104    # compilation unit.
49105    PICFLAG="-qpic"
49106    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49107    C_FLAG_REORDER=''
49108    CXX_FLAG_REORDER=''
49109    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49110    SET_EXECUTABLE_ORIGIN=""
49111    SET_SHARED_LIBRARY_ORIGIN=''
49112    SET_SHARED_LIBRARY_NAME=''
49113    SET_SHARED_LIBRARY_MAPFILE=''
49114  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49115    PICFLAG=""
49116    C_FLAG_REORDER=''
49117    CXX_FLAG_REORDER=''
49118    SHARED_LIBRARY_FLAGS="-dll"
49119    SET_EXECUTABLE_ORIGIN=''
49120    SET_SHARED_LIBRARY_ORIGIN=''
49121    SET_SHARED_LIBRARY_NAME=''
49122    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49123  fi
49124
49125
49126
49127
49128
49129
49130
49131
49132
49133  # The (cross) compiler is now configured, we can now test capabilities
49134  # of the target platform.
49135
49136
49137
49138  ###############################################################################
49139  #
49140  # Setup the opt flags for different compilers
49141  # and different operating systems.
49142  #
49143
49144  # FIXME: this was indirectly the old default, but just inherited.
49145  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49146  #   C_FLAG_DEPS="-MMD -MF"
49147  # fi
49148
49149  # Generate make dependency files
49150  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49151    C_FLAG_DEPS="-MMD -MF"
49152  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49153    C_FLAG_DEPS="-MMD -MF"
49154  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49155    C_FLAG_DEPS="-xMMD -xMF"
49156  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49157    C_FLAG_DEPS="-qmakedep=gcc -MF"
49158  fi
49159  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49160
49161
49162
49163  # Debug symbols
49164  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49165    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49166      # reduce from default "-g2" option to save space
49167      CFLAGS_DEBUG_SYMBOLS="-g1"
49168      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49169    else
49170      CFLAGS_DEBUG_SYMBOLS="-g"
49171      CXXFLAGS_DEBUG_SYMBOLS="-g"
49172    fi
49173  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49174    CFLAGS_DEBUG_SYMBOLS="-g"
49175    CXXFLAGS_DEBUG_SYMBOLS="-g"
49176  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49177    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49178    # -g0 enables debug symbols without disabling inlining.
49179    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49180  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49181    CFLAGS_DEBUG_SYMBOLS="-g"
49182    CXXFLAGS_DEBUG_SYMBOLS="-g"
49183  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49184    CFLAGS_DEBUG_SYMBOLS="-Zi"
49185    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49186  fi
49187
49188
49189
49190  # Debug symbols for JVM_CFLAGS
49191  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49192    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49193    if test "x$DEBUG_LEVEL" = xslowdebug; then
49194      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49195    else
49196      # -g0 does not disable inlining, which -g does.
49197      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49198    fi
49199  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49200    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49201  else
49202    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49203  fi
49204
49205
49206  # bounds, memory and behavior checking options
49207  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49208    case $DEBUG_LEVEL in
49209    release )
49210      # no adjustment
49211      ;;
49212    fastdebug )
49213      # no adjustment
49214      ;;
49215    slowdebug )
49216      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49217      # get's added conditionally on whether we produce debug symbols or not.
49218      # This is most likely not really correct.
49219
49220      # Add runtime stack smashing and undefined behavior checks.
49221      # Not all versions of gcc support -fstack-protector
49222      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265    # Execute function body
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314    # Execute function body
49315
49316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49317$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49318  supports=yes
49319
49320  saved_cflags="$CFLAGS"
49321  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49322  ac_ext=c
49323ac_cpp='$CPP $CPPFLAGS'
49324ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49325ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49326ac_compiler_gnu=$ac_cv_c_compiler_gnu
49327
49328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49329/* end confdefs.h.  */
49330int i;
49331_ACEOF
49332if ac_fn_c_try_compile "$LINENO"; then :
49333
49334else
49335  supports=no
49336fi
49337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49338  ac_ext=cpp
49339ac_cpp='$CXXCPP $CPPFLAGS'
49340ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49341ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49342ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49343
49344  CFLAGS="$saved_cflags"
49345
49346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49347$as_echo "$supports" >&6; }
49348  if test "x$supports" = "xyes" ; then
49349    :
49350    C_COMP_SUPPORTS="yes"
49351  else
49352    :
49353    C_COMP_SUPPORTS="no"
49354  fi
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378
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    # Execute function body
49415
49416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49417$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49418  supports=yes
49419
49420  saved_cxxflags="$CXXFLAGS"
49421  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49422  ac_ext=cpp
49423ac_cpp='$CXXCPP $CPPFLAGS'
49424ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49425ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49426ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49427
49428  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49429/* end confdefs.h.  */
49430int i;
49431_ACEOF
49432if ac_fn_cxx_try_compile "$LINENO"; then :
49433
49434else
49435  supports=no
49436fi
49437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49438  ac_ext=cpp
49439ac_cpp='$CXXCPP $CPPFLAGS'
49440ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49441ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49442ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49443
49444  CXXFLAGS="$saved_cxxflags"
49445
49446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49447$as_echo "$supports" >&6; }
49448  if test "x$supports" = "xyes" ; then
49449    :
49450    CXX_COMP_SUPPORTS="yes"
49451  else
49452    :
49453    CXX_COMP_SUPPORTS="no"
49454  fi
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49469$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49470  supports=no
49471  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49472
49473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49474$as_echo "$supports" >&6; }
49475  if test "x$supports" = "xyes" ; then
49476    :
49477
49478  else
49479    :
49480    STACK_PROTECTOR_CFLAG=""
49481  fi
49482
49483
49484
49485
49486
49487
49488
49489      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49490      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49491      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49492        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49493      fi
49494      ;;
49495    esac
49496  fi
49497
49498  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49499    if test "x$DEBUG_LEVEL" != xrelease; then
49500      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49501        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49502      fi
49503    fi
49504  fi
49505
49506  # Optimization levels
49507  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49508    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49509
49510    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49511      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49512      C_O_FLAG_HIGHEST_JVM="-xO4"
49513      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49514      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49515      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49516      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49517      C_O_FLAG_DEBUG_JVM=""
49518      C_O_FLAG_NONE="-xregs=no%frameptr"
49519      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49520      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49521      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49522      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49523      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49524      CXX_O_FLAG_DEBUG_JVM=""
49525      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49526      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49527        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49528        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49529      fi
49530    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49531      C_O_FLAG_HIGHEST_JVM="-xO4"
49532      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49533      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49534      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49535      C_O_FLAG_DEBUG=""
49536      C_O_FLAG_DEBUG_JVM=""
49537      C_O_FLAG_NONE=""
49538      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49539      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49540      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49541      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49542      CXX_O_FLAG_DEBUG=""
49543      CXX_O_FLAG_DEBUG_JVM=""
49544      CXX_O_FLAG_NONE=""
49545    fi
49546  else
49547    # The remaining toolchains share opt flags between CC and CXX;
49548    # setup for C and duplicate afterwards.
49549    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49550      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49551        # On MacOSX we optimize for size, something
49552        # we should do for all platforms?
49553        C_O_FLAG_HIGHEST_JVM="-Os"
49554        C_O_FLAG_HIGHEST="-Os"
49555        C_O_FLAG_HI="-Os"
49556        C_O_FLAG_NORM="-Os"
49557        C_O_FLAG_SIZE="-Os"
49558      else
49559        C_O_FLAG_HIGHEST_JVM="-O3"
49560        C_O_FLAG_HIGHEST="-O3"
49561        C_O_FLAG_HI="-O3"
49562        C_O_FLAG_NORM="-O2"
49563        C_O_FLAG_SIZE="-Os"
49564      fi
49565      C_O_FLAG_DEBUG="-O0"
49566      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49567        C_O_FLAG_DEBUG_JVM=""
49568      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49569        C_O_FLAG_DEBUG_JVM="-O0"
49570      fi
49571      C_O_FLAG_NONE="-O0"
49572    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49573      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49574        # On MacOSX we optimize for size, something
49575        # we should do for all platforms?
49576        C_O_FLAG_HIGHEST_JVM="-Os"
49577        C_O_FLAG_HIGHEST="-Os"
49578        C_O_FLAG_HI="-Os"
49579        C_O_FLAG_NORM="-Os"
49580        C_O_FLAG_SIZE="-Os"
49581      else
49582        C_O_FLAG_HIGHEST_JVM="-O3"
49583        C_O_FLAG_HIGHEST="-O3"
49584        C_O_FLAG_HI="-O3"
49585        C_O_FLAG_NORM="-O2"
49586        C_O_FLAG_SIZE="-Os"
49587      fi
49588      C_O_FLAG_DEBUG="-O0"
49589      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49590        C_O_FLAG_DEBUG_JVM=""
49591      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49592        C_O_FLAG_DEBUG_JVM="-O0"
49593      fi
49594      C_O_FLAG_NONE="-O0"
49595    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49596      C_O_FLAG_HIGHEST_JVM="-O3"
49597      C_O_FLAG_HIGHEST="-O3"
49598      C_O_FLAG_HI="-O3 -qstrict"
49599      C_O_FLAG_NORM="-O2"
49600      C_O_FLAG_DEBUG="-qnoopt"
49601      # FIXME: Value below not verified.
49602      C_O_FLAG_DEBUG_JVM=""
49603      C_O_FLAG_NONE="-qnoopt"
49604    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49605      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49606      C_O_FLAG_HIGHEST="-O2"
49607      C_O_FLAG_HI="-O1"
49608      C_O_FLAG_NORM="-O1"
49609      C_O_FLAG_DEBUG="-Od"
49610      C_O_FLAG_DEBUG_JVM=""
49611      C_O_FLAG_NONE="-Od"
49612      C_O_FLAG_SIZE="-Os"
49613    fi
49614    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49615    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49616    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49617    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49618    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49619    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49620    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49621    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49622  fi
49623
49624  # Adjust optimization flags according to debug level.
49625  case $DEBUG_LEVEL in
49626    release )
49627      # no adjustment
49628      ;;
49629    fastdebug )
49630      # Not quite so much optimization
49631      C_O_FLAG_HI="$C_O_FLAG_NORM"
49632      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49633      ;;
49634    slowdebug )
49635      # Disable optimization
49636      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49637      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49638      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49639      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49640      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49641      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49642      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49643      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49644      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49645      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49646      ;;
49647  esac
49648
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667  # Special extras...
49668  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49669    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49670      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49671      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49672    fi
49673    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49674    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49675  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49676    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49677    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49678  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49679    CXXSTD_CXXFLAG="-std=gnu++98"
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722    # Execute function body
49723
49724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49725$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49726  supports=yes
49727
49728  saved_cxxflags="$CXXFLAGS"
49729  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49730  ac_ext=cpp
49731ac_cpp='$CXXCPP $CPPFLAGS'
49732ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49733ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49734ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49735
49736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49737/* end confdefs.h.  */
49738int i;
49739_ACEOF
49740if ac_fn_cxx_try_compile "$LINENO"; then :
49741
49742else
49743  supports=no
49744fi
49745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49746  ac_ext=cpp
49747ac_cpp='$CXXCPP $CPPFLAGS'
49748ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49749ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49750ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49751
49752  CXXFLAGS="$saved_cxxflags"
49753
49754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49755$as_echo "$supports" >&6; }
49756  if test "x$supports" = "xyes" ; then
49757    :
49758
49759  else
49760    :
49761    CXXSTD_CXXFLAG=""
49762  fi
49763
49764
49765
49766
49767
49768
49769
49770
49771
49772
49773
49774
49775    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49776
49777  fi
49778  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49779    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49780    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49781    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49782    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49783    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49784  fi
49785
49786  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49787    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49788    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49789    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49790  fi
49791
49792  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49793  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49794  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49795
49796  ###############################################################################
49797  #
49798  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49799  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49800  #
49801
49802  # Setup compiler/platform specific flags into
49803  #    CFLAGS_JDK    - C Compiler flags
49804  #    CXXFLAGS_JDK  - C++ Compiler flags
49805  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49806  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49807    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49808    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49809    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49810    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49811      # Force compatibility with i586 on 32 bit intel platforms.
49812      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49813      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49814    fi
49815    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49816        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49817    case $OPENJDK_TARGET_CPU_ARCH in
49818      arm )
49819        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49820        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49821        ;;
49822      ppc )
49823        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49824        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49825        ;;
49826      * )
49827        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49828        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49829        ;;
49830    esac
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
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    # Execute function body
49886
49887  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49888  REFERENCE_VERSION=6
49889
49890  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49891    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49892  fi
49893
49894  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49895    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49896  fi
49897
49898  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49899  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49900
49901  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49902    :
49903
49904  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49905  # runs afoul of the more aggressive versions of these optimisations.
49906  # Notably, value range propagation now assumes that the this pointer of C++
49907  # member functions is non-null.
49908  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951    # Execute function body
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000    # Execute function body
50001
50002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50003$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50004  supports=yes
50005
50006  saved_cflags="$CFLAGS"
50007  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50008  ac_ext=c
50009ac_cpp='$CPP $CPPFLAGS'
50010ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50011ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50012ac_compiler_gnu=$ac_cv_c_compiler_gnu
50013
50014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50015/* end confdefs.h.  */
50016int i;
50017_ACEOF
50018if ac_fn_c_try_compile "$LINENO"; then :
50019
50020else
50021  supports=no
50022fi
50023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50024  ac_ext=cpp
50025ac_cpp='$CXXCPP $CPPFLAGS'
50026ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50027ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50028ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50029
50030  CFLAGS="$saved_cflags"
50031
50032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50033$as_echo "$supports" >&6; }
50034  if test "x$supports" = "xyes" ; then
50035    :
50036    C_COMP_SUPPORTS="yes"
50037  else
50038    :
50039    C_COMP_SUPPORTS="no"
50040  fi
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100    # Execute function body
50101
50102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50103$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50104  supports=yes
50105
50106  saved_cxxflags="$CXXFLAGS"
50107  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50108  ac_ext=cpp
50109ac_cpp='$CXXCPP $CPPFLAGS'
50110ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50111ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50112ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50113
50114  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50115/* end confdefs.h.  */
50116int i;
50117_ACEOF
50118if ac_fn_cxx_try_compile "$LINENO"; then :
50119
50120else
50121  supports=no
50122fi
50123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50124  ac_ext=cpp
50125ac_cpp='$CXXCPP $CPPFLAGS'
50126ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50127ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50128ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50129
50130  CXXFLAGS="$saved_cxxflags"
50131
50132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50133$as_echo "$supports" >&6; }
50134  if test "x$supports" = "xyes" ; then
50135    :
50136    CXX_COMP_SUPPORTS="yes"
50137  else
50138    :
50139    CXX_COMP_SUPPORTS="no"
50140  fi
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152
50153
50154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50155$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50156  supports=no
50157  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50158
50159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50160$as_echo "$supports" >&6; }
50161  if test "x$supports" = "xyes" ; then
50162    :
50163
50164  else
50165    :
50166    NO_NULL_POINTER_CHECK_CFLAG=""
50167  fi
50168
50169
50170
50171
50172
50173
50174
50175  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
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
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218    # Execute function body
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267    # Execute function body
50268
50269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50270$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50271  supports=yes
50272
50273  saved_cflags="$CFLAGS"
50274  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
50275  ac_ext=c
50276ac_cpp='$CPP $CPPFLAGS'
50277ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50278ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50279ac_compiler_gnu=$ac_cv_c_compiler_gnu
50280
50281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50282/* end confdefs.h.  */
50283int i;
50284_ACEOF
50285if ac_fn_c_try_compile "$LINENO"; then :
50286
50287else
50288  supports=no
50289fi
50290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50291  ac_ext=cpp
50292ac_cpp='$CXXCPP $CPPFLAGS'
50293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50296
50297  CFLAGS="$saved_cflags"
50298
50299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50300$as_echo "$supports" >&6; }
50301  if test "x$supports" = "xyes" ; then
50302    :
50303    C_COMP_SUPPORTS="yes"
50304  else
50305    :
50306    C_COMP_SUPPORTS="no"
50307  fi
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367    # Execute function body
50368
50369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50370$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50371  supports=yes
50372
50373  saved_cxxflags="$CXXFLAGS"
50374  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
50375  ac_ext=cpp
50376ac_cpp='$CXXCPP $CPPFLAGS'
50377ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50378ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50379ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50380
50381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50382/* end confdefs.h.  */
50383int i;
50384_ACEOF
50385if ac_fn_cxx_try_compile "$LINENO"; then :
50386
50387else
50388  supports=no
50389fi
50390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50391  ac_ext=cpp
50392ac_cpp='$CXXCPP $CPPFLAGS'
50393ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50394ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50395ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50396
50397  CXXFLAGS="$saved_cxxflags"
50398
50399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50400$as_echo "$supports" >&6; }
50401  if test "x$supports" = "xyes" ; then
50402    :
50403    CXX_COMP_SUPPORTS="yes"
50404  else
50405    :
50406    CXX_COMP_SUPPORTS="no"
50407  fi
50408
50409
50410
50411
50412
50413
50414
50415
50416
50417
50418
50419
50420
50421  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50422$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50423  supports=no
50424  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50425
50426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50427$as_echo "$supports" >&6; }
50428  if test "x$supports" = "xyes" ; then
50429    :
50430
50431  else
50432    :
50433    NO_LIFETIME_DSE_CFLAG=""
50434  fi
50435
50436
50437
50438
50439
50440
50441  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50442
50443
50444
50445  else
50446    :
50447
50448  fi
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50464    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50465
50466    # Restrict the debug information created by Clang to avoid
50467    # too big object files and speed the build up a little bit
50468    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50469    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50470    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50471      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50472        # Force compatibility with i586 on 32 bit intel platforms.
50473        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50474        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50475      fi
50476      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50477      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50478          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50479      case $OPENJDK_TARGET_CPU_ARCH in
50480        ppc )
50481          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50482          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50483          ;;
50484        * )
50485          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50486          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50487          ;;
50488      esac
50489    fi
50490  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50491    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50492    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50493    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50494      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50495    fi
50496
50497    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50498    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50499  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50500    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50501    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50502    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50503  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50504    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50505        -MD -Zc:wchar_t- -W3 -wd4800 \
50506        -DWIN32_LEAN_AND_MEAN \
50507        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50508        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50509        -DWIN32 -DIAL"
50510    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50511      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50512    else
50513      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50514    fi
50515    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50516    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50517    # studio.
50518    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50519      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50520      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50521      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50522    fi
50523  fi
50524
50525  ###############################################################################
50526
50527  # Adjust flags according to debug level.
50528  case $DEBUG_LEVEL in
50529    fastdebug | slowdebug )
50530      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50531      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50532      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50533      ;;
50534    release )
50535      ;;
50536    * )
50537      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50538      ;;
50539  esac
50540
50541  # Set some common defines. These works for all compilers, but assume
50542  # -D is universally accepted.
50543
50544  # Setup endianness
50545  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50546    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50547    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50548    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50549    #   Note: -Dmacro         is the same as    #define macro 1
50550    #         -Dmacro=        is the same as    #define macro
50551    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50552      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50553    else
50554      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50555    fi
50556  else
50557    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50558    # are defined in the system?
50559    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50560      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50561    else
50562      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50563    fi
50564  fi
50565
50566  # Setup target OS define. Use OS target name but in upper case.
50567  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50568  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50569
50570  # Setup target CPU
50571  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50572      $OPENJDK_TARGET_ADD_LP64 \
50573      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50574
50575  # Setup debug/release defines
50576  if test "x$DEBUG_LEVEL" = xrelease; then
50577    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50578    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50579      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50580    fi
50581  else
50582    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50583  fi
50584
50585  # Set some additional per-OS defines.
50586  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50587    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50588    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50589        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50590  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50591    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50592    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50593        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50594  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50595    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50596    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50597    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50598    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50599        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50600        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50601        -fno-omit-frame-pointer"
50602  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50603    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50604    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50605    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50606        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50607        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50608  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50609    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50610  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50611    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50612    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50613  fi
50614
50615  # Set some additional per-CPU defines.
50616  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50617    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50618  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50619    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50620  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50621    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50622      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50623      # fixes `relocation truncated to fit' error for gcc 4.1.
50624      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50625      # Use ppc64 instructions, but schedule for power5
50626      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50627    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50628      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50629    fi
50630  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50631    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50632      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50633      # Little endian machine uses ELFv2 ABI.
50634      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50635      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50636      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50637    fi
50638  fi
50639
50640  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50641    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50642  fi
50643
50644  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50645    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50646      # Solaris does not have _LP64=1 in the old build.
50647      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50648      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50649    fi
50650  fi
50651
50652  # Set JVM_CFLAGS warning handling
50653  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50654    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50655        -Wunused-value -Woverloaded-virtual"
50656
50657    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712    # Execute function body
50713
50714  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50715  REFERENCE_VERSION=4.8
50716
50717  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50718    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50719  fi
50720
50721  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50722    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50723  fi
50724
50725  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50726  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50727
50728  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50729    :
50730
50731            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50732            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50733
50734
50735  else
50736    :
50737
50738  fi
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753    fi
50754    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50755      # Non-zero builds have stricter warnings
50756      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50757    else
50758      if test "x$TOOLCHAIN_TYPE" = xclang; then
50759        # Some versions of llvm do not like -Wundef
50760        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50761      fi
50762    fi
50763  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50764    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50765        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50766  fi
50767
50768  # Additional macosx handling
50769  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50770    # Setting these parameters makes it an error to link to macosx APIs that are
50771    # newer than the given OS version and makes the linked binaries compatible
50772    # even if built on a newer version of the OS.
50773    # The expected format is X.Y.Z
50774    MACOSX_VERSION_MIN=10.7.0
50775
50776
50777    # The macro takes the version with no dots, ex: 1070
50778    # Let the flags variables get resolved in make for easier override on make
50779    # command line.
50780    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50781    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50782  fi
50783
50784  # Setup some hard coded includes
50785  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50786      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50787      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50788      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50789      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50790      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50791
50792  # The shared libraries are compiled using the picflag.
50793  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50794      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50795  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50796      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50797
50798  # Executable flags
50799  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50800  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50801
50802
50803
50804
50805
50806
50807  # Setup LDFLAGS et al.
50808  #
50809
50810  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50811    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50812    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50813    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50814    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50815      LDFLAGS_SAFESH="-safeseh"
50816      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50817      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50818      # NOTE: Old build added -machine. Probably not needed.
50819      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50820    else
50821      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50822    fi
50823  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50824      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50825      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50826        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50827        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50828    fi
50829  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50830    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50831    # We have previously set HAS_GNU_HASH if this is the case
50832    if test -n "$HAS_GNU_HASH"; then
50833      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50834      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50835      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50836    fi
50837      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50838        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50839    fi
50840    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50841      # And since we now know that the linker is gnu, then add -z defs, to forbid
50842      # undefined symbols in object files.
50843      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50844      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50845      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50846      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50847      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50848      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50849        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50850      fi
50851      case $DEBUG_LEVEL in
50852        release )
50853          # tell linker to optimize libraries.
50854          # Should this be supplied to the OSS linker as well?
50855          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50856          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50857          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50858          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50859            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50860          fi
50861          ;;
50862        slowdebug )
50863          # Hotspot always let the linker optimize
50864          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50865          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50866            # do relocations at load
50867            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50868            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50869            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50870          fi
50871          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50872            # mark relocations read only
50873            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50874            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50875            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50876          fi
50877          ;;
50878        fastdebug )
50879          # Hotspot always let the linker optimize
50880          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50881          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50882            # mark relocations read only
50883            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50884            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50885            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50886          fi
50887          ;;
50888        * )
50889          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50890          ;;
50891        esac
50892    fi
50893  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50894    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50895    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50896    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50897    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50898    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50899    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50900      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50901    fi
50902  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50903    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50904    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50905    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50906  fi
50907
50908  # Customize LDFLAGS for executables
50909
50910  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50911
50912  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50913    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50914      LDFLAGS_STACK_SIZE=1048576
50915    else
50916      LDFLAGS_STACK_SIZE=327680
50917    fi
50918    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50919  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50920    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50921  fi
50922
50923  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50924
50925  # Customize LDFLAGS for libs
50926  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50927
50928  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50929  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50930    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50931        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50932    JDKLIB_LIBS=""
50933  else
50934    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50935        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50936
50937    if test "xTARGET" = "xTARGET"; then
50938    # On some platforms (mac) the linker warns about non existing -L dirs.
50939    # Add server first if available. Linking aginst client does not always produce the same results.
50940      # Only add client/minimal dir if client/minimal is being built.
50941    # Default to server for other variants.
50942      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50943        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50944      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50945        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50946      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50947        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50948    else
50949        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50950    fi
50951    elif test "xTARGET" = "xBUILD"; then
50952      # When building a buildjdk, it's always only the server variant
50953      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50954          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50955    fi
50956
50957    JDKLIB_LIBS="-ljava -ljvm"
50958    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50959      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50960    fi
50961
50962  fi
50963
50964  # Set JVM_LIBS (per os)
50965  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50966    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50967  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50968    # FIXME: This hard-coded path is not really proper.
50969    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50970      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50971    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50972      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50973    fi
50974    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50975        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50976  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50977    JVM_LIBS="$JVM_LIBS -lm"
50978  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50979    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50980  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50981    JVM_LIBS="$JVM_LIBS -lm"
50982  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50983    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50984        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50985        wsock32.lib winmm.lib version.lib psapi.lib"
50986    fi
50987
50988  # Set JVM_ASFLAGS
50989  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50990    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50991      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50992    fi
50993  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50994    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50995  fi
50996
50997  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013  # Special extras...
51014  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51015    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51016      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51017      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51018    fi
51019    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51020    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51021  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51022    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51023    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51024  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51025    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068    # Execute function body
51069
51070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51071$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51072  supports=yes
51073
51074  saved_cxxflags="$CXXFLAGS"
51075  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51076  ac_ext=cpp
51077ac_cpp='$CXXCPP $CPPFLAGS'
51078ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51079ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51080ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51081
51082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51083/* end confdefs.h.  */
51084int i;
51085_ACEOF
51086if ac_fn_cxx_try_compile "$LINENO"; then :
51087
51088else
51089  supports=no
51090fi
51091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51092  ac_ext=cpp
51093ac_cpp='$CXXCPP $CPPFLAGS'
51094ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51095ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51096ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51097
51098  CXXFLAGS="$saved_cxxflags"
51099
51100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51101$as_echo "$supports" >&6; }
51102  if test "x$supports" = "xyes" ; then
51103    :
51104
51105  else
51106    :
51107    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51108  fi
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120
51121    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51122
51123  fi
51124  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51125    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51126    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51127    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51128    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51129    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51130  fi
51131
51132  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51133    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51134    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51135    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51136  fi
51137
51138  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51139  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51140  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51141
51142  ###############################################################################
51143  #
51144  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51145  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51146  #
51147
51148  # Setup compiler/platform specific flags into
51149  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51150  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51151  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51152  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51153    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51154    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51155    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51156    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51157      # Force compatibility with i586 on 32 bit intel platforms.
51158      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51159      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51160    fi
51161    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51162        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51163    case $OPENJDK_BUILD_CPU_ARCH in
51164      arm )
51165        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51166        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51167        ;;
51168      ppc )
51169        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51170        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51171        ;;
51172      * )
51173        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51174        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51175        ;;
51176    esac
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231    # Execute function body
51232
51233  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51234  REFERENCE_VERSION=6
51235
51236  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51237    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
51238  fi
51239
51240  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51241    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51242  fi
51243
51244  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51245  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51246
51247  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51248    :
51249
51250  else
51251    :
51252
51253  fi
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263
51264
51265
51266
51267
51268  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51269    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51270
51271    # Restrict the debug information created by Clang to avoid
51272    # too big object files and speed the build up a little bit
51273    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51274    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51275    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51276      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51277        # Force compatibility with i586 on 32 bit intel platforms.
51278        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51279        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51280      fi
51281      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51282      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51283          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51284      case $OPENJDK_BUILD_CPU_ARCH in
51285        ppc )
51286          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51287          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51288          ;;
51289        * )
51290          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51291          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51292          ;;
51293      esac
51294    fi
51295  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51296    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51297    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51298    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51299      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51300    fi
51301
51302    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51303    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51304  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51305    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51306    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51307    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51308  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51309    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51310        -MD -Zc:wchar_t- -W3 -wd4800 \
51311        -DWIN32_LEAN_AND_MEAN \
51312        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51313        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51314        -DWIN32 -DIAL"
51315    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51316      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51317    else
51318      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51319    fi
51320    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51321    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51322    # studio.
51323    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51324      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51325      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51326      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51327    fi
51328  fi
51329
51330  ###############################################################################
51331
51332  # Adjust flags according to debug level.
51333  case $DEBUG_LEVEL in
51334    fastdebug | slowdebug )
51335      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51336      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51337      JAVAC_FLAGS="$JAVAC_FLAGS -g"
51338      ;;
51339    release )
51340      ;;
51341    * )
51342      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51343      ;;
51344  esac
51345
51346  # Set some common defines. These works for all compilers, but assume
51347  # -D is universally accepted.
51348
51349  # Setup endianness
51350  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51351    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51352    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51353    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51354    #   Note: -Dmacro         is the same as    #define macro 1
51355    #         -Dmacro=        is the same as    #define macro
51356    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51357      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51358    else
51359      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51360    fi
51361  else
51362    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51363    # are defined in the system?
51364    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51365      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51366    else
51367      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51368    fi
51369  fi
51370
51371  # Setup target OS define. Use OS target name but in upper case.
51372  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51373  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51374
51375  # Setup target CPU
51376  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51377      $OPENJDK_BUILD_ADD_LP64 \
51378      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51379
51380  # Setup debug/release defines
51381  if test "x$DEBUG_LEVEL" = xrelease; then
51382    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51383    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51384      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51385    fi
51386  else
51387    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51388  fi
51389
51390  # Set some additional per-OS defines.
51391  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51392    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51393    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
51394        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51395  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51396    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51397    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51398        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
51399  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51400    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51401    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51402    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51403    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51404        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51405        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51406        -fno-omit-frame-pointer"
51407  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51408    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51409    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51410    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
51411        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51412        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51413  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51414    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51415  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51416    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51417    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51418  fi
51419
51420  # Set some additional per-CPU defines.
51421  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51422    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51423  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51424    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51425  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51426    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51427      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51428      # fixes `relocation truncated to fit' error for gcc 4.1.
51429      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51430      # Use ppc64 instructions, but schedule for power5
51431      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51432    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51433      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51434    fi
51435  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51436    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51437      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51438      # Little endian machine uses ELFv2 ABI.
51439      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51440      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51441      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
51442    fi
51443  fi
51444
51445  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51446    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51447  fi
51448
51449  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51450    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51451      # Solaris does not have _LP64=1 in the old build.
51452      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51453      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51454    fi
51455  fi
51456
51457  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51458  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51459    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51460        -Wunused-value -Woverloaded-virtual"
51461
51462    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517    # Execute function body
51518
51519  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51520  REFERENCE_VERSION=4.8
51521
51522  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51523    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51524  fi
51525
51526  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51527    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51528  fi
51529
51530  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51531  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51532
51533  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51534    :
51535
51536            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51537            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51538
51539
51540  else
51541    :
51542
51543  fi
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558    fi
51559    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51560      # Non-zero builds have stricter warnings
51561      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51562    else
51563      if test "x$TOOLCHAIN_TYPE" = xclang; then
51564        # Some versions of llvm do not like -Wundef
51565        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51566      fi
51567    fi
51568  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51569    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51570        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51571  fi
51572
51573  # Additional macosx handling
51574  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51575    # Setting these parameters makes it an error to link to macosx APIs that are
51576    # newer than the given OS version and makes the linked binaries compatible
51577    # even if built on a newer version of the OS.
51578    # The expected format is X.Y.Z
51579    MACOSX_VERSION_MIN=10.7.0
51580
51581
51582    # The macro takes the version with no dots, ex: 1070
51583    # Let the flags variables get resolved in make for easier override on make
51584    # command line.
51585    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)"
51586    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51587  fi
51588
51589  # Setup some hard coded includes
51590  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51591      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51592      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51593      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51594      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51595      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51596
51597  # The shared libraries are compiled using the picflag.
51598  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51599      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51600  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51601      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51602
51603  # Executable flags
51604  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51605  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51606
51607
51608
51609
51610
51611
51612  # Setup LDFLAGS et al.
51613  #
51614
51615  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51616    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51617    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51618    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51619    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51620      LDFLAGS_SAFESH="-safeseh"
51621      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51622      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51623      # NOTE: Old build added -machine. Probably not needed.
51624      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51625    else
51626      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51627    fi
51628  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51629      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51630      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51631        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51632        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51633    fi
51634  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51635    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51636    # We have previously set HAS_GNU_HASH if this is the case
51637    if test -n "$HAS_GNU_HASH"; then
51638      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51639      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51640      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51641    fi
51642      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51643        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51644    fi
51645    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51646      # And since we now know that the linker is gnu, then add -z defs, to forbid
51647      # undefined symbols in object files.
51648      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51649      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51650      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51651      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51652      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51653      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51654        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51655      fi
51656      case $DEBUG_LEVEL in
51657        release )
51658          # tell linker to optimize libraries.
51659          # Should this be supplied to the OSS linker as well?
51660          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51661          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51662          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51663          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51664            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51665          fi
51666          ;;
51667        slowdebug )
51668          # Hotspot always let the linker optimize
51669          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51670          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51671            # do relocations at load
51672            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51673            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51674            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51675          fi
51676          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51677            # mark relocations read only
51678            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51679            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51680            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51681          fi
51682          ;;
51683        fastdebug )
51684          # Hotspot always let the linker optimize
51685          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51686          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51687            # mark relocations read only
51688            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51689            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51690            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51691          fi
51692          ;;
51693        * )
51694          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51695          ;;
51696        esac
51697    fi
51698  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51699    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51700    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
51701    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51702    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51703    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51704    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51705      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51706    fi
51707  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51708    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51709    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51710    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51711  fi
51712
51713  # Customize LDFLAGS for executables
51714
51715  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51716
51717  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51718    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51719      LDFLAGS_STACK_SIZE=1048576
51720    else
51721      LDFLAGS_STACK_SIZE=327680
51722    fi
51723    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51724  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51725    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51726  fi
51727
51728  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51729
51730  # Customize LDFLAGS for libs
51731  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51732
51733  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51734  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51735    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51736        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51737    OPENJDK_BUILD_JDKLIB_LIBS=""
51738  else
51739    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51740        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51741
51742    if test "xBUILD" = "xTARGET"; then
51743    # On some platforms (mac) the linker warns about non existing -L dirs.
51744    # Add server first if available. Linking aginst client does not always produce the same results.
51745      # Only add client/minimal dir if client/minimal is being built.
51746    # Default to server for other variants.
51747      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51748        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51749      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51750        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51751      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51752        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51753    else
51754        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51755    fi
51756    elif test "xBUILD" = "xBUILD"; then
51757      # When building a buildjdk, it's always only the server variant
51758      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51759          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51760    fi
51761
51762    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51763    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51764      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51765    fi
51766
51767  fi
51768
51769  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51770  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51771    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51772  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51773    # FIXME: This hard-coded path is not really proper.
51774    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51775      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51776    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51777      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51778    fi
51779    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51780        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51781  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51782    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51783  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51784    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51785  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51786    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51787  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51788    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51789        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51790        wsock32.lib winmm.lib version.lib psapi.lib"
51791    fi
51792
51793  # Set OPENJDK_BUILD_JVM_ASFLAGS
51794  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51795    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51796      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51797    fi
51798  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51799    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51800  fi
51801
51802  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818  # Tests are only ever compiled for TARGET
51819  # Flags for compiling test libraries
51820  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51821  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51822
51823  # Flags for compiling test executables
51824  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51825  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51826
51827
51828
51829
51830
51831
51832  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51833  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51834
51835
51836
51837
51838
51839
51840  # Some Zero and Shark settings.
51841  # ZERO_ARCHFLAG tells the compiler which mode to build for
51842  case "${OPENJDK_TARGET_CPU}" in
51843    s390)
51844      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51845      ;;
51846    *)
51847      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51848  esac
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891    # Execute function body
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940    # Execute function body
51941
51942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51943$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51944  supports=yes
51945
51946  saved_cflags="$CFLAGS"
51947  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51948  ac_ext=c
51949ac_cpp='$CPP $CPPFLAGS'
51950ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51951ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51952ac_compiler_gnu=$ac_cv_c_compiler_gnu
51953
51954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51955/* end confdefs.h.  */
51956int i;
51957_ACEOF
51958if ac_fn_c_try_compile "$LINENO"; then :
51959
51960else
51961  supports=no
51962fi
51963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51964  ac_ext=cpp
51965ac_cpp='$CXXCPP $CPPFLAGS'
51966ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51967ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51968ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51969
51970  CFLAGS="$saved_cflags"
51971
51972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51973$as_echo "$supports" >&6; }
51974  if test "x$supports" = "xyes" ; then
51975    :
51976    C_COMP_SUPPORTS="yes"
51977  else
51978    :
51979    C_COMP_SUPPORTS="no"
51980  fi
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040    # Execute function body
52041
52042  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
52043$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
52044  supports=yes
52045
52046  saved_cxxflags="$CXXFLAGS"
52047  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
52048  ac_ext=cpp
52049ac_cpp='$CXXCPP $CPPFLAGS'
52050ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52051ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52052ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52053
52054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52055/* end confdefs.h.  */
52056int i;
52057_ACEOF
52058if ac_fn_cxx_try_compile "$LINENO"; then :
52059
52060else
52061  supports=no
52062fi
52063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52064  ac_ext=cpp
52065ac_cpp='$CXXCPP $CPPFLAGS'
52066ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52067ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52068ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52069
52070  CXXFLAGS="$saved_cxxflags"
52071
52072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52073$as_echo "$supports" >&6; }
52074  if test "x$supports" = "xyes" ; then
52075    :
52076    CXX_COMP_SUPPORTS="yes"
52077  else
52078    :
52079    CXX_COMP_SUPPORTS="no"
52080  fi
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
52095$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
52096  supports=no
52097  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52098
52099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52100$as_echo "$supports" >&6; }
52101  if test "x$supports" = "xyes" ; then
52102    :
52103
52104  else
52105    :
52106    ZERO_ARCHFLAG=""
52107  fi
52108
52109
52110
52111
52112
52113
52114
52115
52116  # Check that the compiler supports -mX (or -qX on AIX) flags
52117  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165    # Execute function body
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214    # Execute function body
52215
52216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52217$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52218  supports=yes
52219
52220  saved_cflags="$CFLAGS"
52221  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52222  ac_ext=c
52223ac_cpp='$CPP $CPPFLAGS'
52224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52226ac_compiler_gnu=$ac_cv_c_compiler_gnu
52227
52228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52229/* end confdefs.h.  */
52230int i;
52231_ACEOF
52232if ac_fn_c_try_compile "$LINENO"; then :
52233
52234else
52235  supports=no
52236fi
52237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52238  ac_ext=cpp
52239ac_cpp='$CXXCPP $CPPFLAGS'
52240ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52241ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52242ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52243
52244  CFLAGS="$saved_cflags"
52245
52246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52247$as_echo "$supports" >&6; }
52248  if test "x$supports" = "xyes" ; then
52249    :
52250    C_COMP_SUPPORTS="yes"
52251  else
52252    :
52253    C_COMP_SUPPORTS="no"
52254  fi
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
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    # Execute function body
52315
52316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52317$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52318  supports=yes
52319
52320  saved_cxxflags="$CXXFLAGS"
52321  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52322  ac_ext=cpp
52323ac_cpp='$CXXCPP $CPPFLAGS'
52324ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52325ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52326ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52327
52328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52329/* end confdefs.h.  */
52330int i;
52331_ACEOF
52332if ac_fn_cxx_try_compile "$LINENO"; then :
52333
52334else
52335  supports=no
52336fi
52337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52338  ac_ext=cpp
52339ac_cpp='$CXXCPP $CPPFLAGS'
52340ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52341ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52342ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52343
52344  CXXFLAGS="$saved_cxxflags"
52345
52346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52347$as_echo "$supports" >&6; }
52348  if test "x$supports" = "xyes" ; then
52349    :
52350    CXX_COMP_SUPPORTS="yes"
52351  else
52352    :
52353    CXX_COMP_SUPPORTS="no"
52354  fi
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52369$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52370  supports=no
52371  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52372
52373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52374$as_echo "$supports" >&6; }
52375  if test "x$supports" = "xyes" ; then
52376    :
52377    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52378  else
52379    :
52380    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52381  fi
52382
52383
52384
52385
52386
52387
52388
52389
52390  # Check whether --enable-warnings-as-errors was given.
52391if test "${enable_warnings_as_errors+set}" = set; then :
52392  enableval=$enable_warnings_as_errors;
52393fi
52394
52395
52396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52397$as_echo_n "checking if native warnings are errors... " >&6; }
52398  if test "x$enable_warnings_as_errors" = "xyes"; then
52399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
52400$as_echo "yes (explicitely set)" >&6; }
52401    WARNINGS_AS_ERRORS=true
52402  elif test "x$enable_warnings_as_errors" = "xno"; then
52403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52404$as_echo "no" >&6; }
52405    WARNINGS_AS_ERRORS=false
52406  elif test "x$enable_warnings_as_errors" = "x"; then
52407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52408$as_echo "yes (default)" >&6; }
52409    WARNINGS_AS_ERRORS=true
52410  else
52411    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52412  fi
52413
52414  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52415    # Set legacy hotspot variable
52416    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52417  else
52418    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52419  fi
52420
52421
52422
52423
52424  case "${TOOLCHAIN_TYPE}" in
52425    microsoft)
52426      DISABLE_WARNING_PREFIX="-wd"
52427      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52428      ;;
52429    solstudio)
52430      DISABLE_WARNING_PREFIX="-erroff="
52431      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52432      ;;
52433    gcc)
52434      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52435
52436
52437
52438
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482    # Execute function body
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531    # Execute function body
52532
52533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52534$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52535  supports=yes
52536
52537  saved_cflags="$CFLAGS"
52538  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52539  ac_ext=c
52540ac_cpp='$CPP $CPPFLAGS'
52541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52543ac_compiler_gnu=$ac_cv_c_compiler_gnu
52544
52545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52546/* end confdefs.h.  */
52547int i;
52548_ACEOF
52549if ac_fn_c_try_compile "$LINENO"; then :
52550
52551else
52552  supports=no
52553fi
52554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52555  ac_ext=cpp
52556ac_cpp='$CXXCPP $CPPFLAGS'
52557ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52558ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52559ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52560
52561  CFLAGS="$saved_cflags"
52562
52563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52564$as_echo "$supports" >&6; }
52565  if test "x$supports" = "xyes" ; then
52566    :
52567    C_COMP_SUPPORTS="yes"
52568  else
52569    :
52570    C_COMP_SUPPORTS="no"
52571  fi
52572
52573
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587
52588
52589
52590
52591
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631    # Execute function body
52632
52633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52634$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52635  supports=yes
52636
52637  saved_cxxflags="$CXXFLAGS"
52638  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52639  ac_ext=cpp
52640ac_cpp='$CXXCPP $CPPFLAGS'
52641ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52642ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52643ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52644
52645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52646/* end confdefs.h.  */
52647int i;
52648_ACEOF
52649if ac_fn_cxx_try_compile "$LINENO"; then :
52650
52651else
52652  supports=no
52653fi
52654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52655  ac_ext=cpp
52656ac_cpp='$CXXCPP $CPPFLAGS'
52657ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52658ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52659ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52660
52661  CXXFLAGS="$saved_cxxflags"
52662
52663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52664$as_echo "$supports" >&6; }
52665  if test "x$supports" = "xyes" ; then
52666    :
52667    CXX_COMP_SUPPORTS="yes"
52668  else
52669    :
52670    CXX_COMP_SUPPORTS="no"
52671  fi
52672
52673
52674
52675
52676
52677
52678
52679
52680
52681
52682
52683
52684
52685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52686$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52687  supports=no
52688  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52689
52690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52691$as_echo "$supports" >&6; }
52692  if test "x$supports" = "xyes" ; then
52693    :
52694    GCC_CAN_DISABLE_WARNINGS=true
52695  else
52696    :
52697    GCC_CAN_DISABLE_WARNINGS=false
52698
52699  fi
52700
52701
52702
52703
52704
52705
52706      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52707        DISABLE_WARNING_PREFIX="-Wno-"
52708      else
52709        DISABLE_WARNING_PREFIX=
52710      fi
52711      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52712      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52713      # CFLAGS since any target specific flags will likely not work with the
52714      # build compiler
52715      CC_OLD="$CC"
52716      CXX_OLD="$CXX"
52717      CC="$BUILD_CC"
52718      CXX="$BUILD_CXX"
52719      CFLAGS_OLD="$CFLAGS"
52720      CFLAGS=""
52721
52722
52723
52724
52725
52726
52727
52728
52729
52730
52731
52732
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
52746
52747
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768    # Execute function body
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817    # Execute function body
52818
52819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52820$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52821  supports=yes
52822
52823  saved_cflags="$CFLAGS"
52824  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52825  ac_ext=c
52826ac_cpp='$CPP $CPPFLAGS'
52827ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52828ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52829ac_compiler_gnu=$ac_cv_c_compiler_gnu
52830
52831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52832/* end confdefs.h.  */
52833int i;
52834_ACEOF
52835if ac_fn_c_try_compile "$LINENO"; then :
52836
52837else
52838  supports=no
52839fi
52840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52841  ac_ext=cpp
52842ac_cpp='$CXXCPP $CPPFLAGS'
52843ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52844ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52845ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52846
52847  CFLAGS="$saved_cflags"
52848
52849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52850$as_echo "$supports" >&6; }
52851  if test "x$supports" = "xyes" ; then
52852    :
52853    C_COMP_SUPPORTS="yes"
52854  else
52855    :
52856    C_COMP_SUPPORTS="no"
52857  fi
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917    # Execute function body
52918
52919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52920$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52921  supports=yes
52922
52923  saved_cxxflags="$CXXFLAGS"
52924  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52925  ac_ext=cpp
52926ac_cpp='$CXXCPP $CPPFLAGS'
52927ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52928ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52929ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52930
52931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52932/* end confdefs.h.  */
52933int i;
52934_ACEOF
52935if ac_fn_cxx_try_compile "$LINENO"; then :
52936
52937else
52938  supports=no
52939fi
52940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52941  ac_ext=cpp
52942ac_cpp='$CXXCPP $CPPFLAGS'
52943ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52944ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52945ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52946
52947  CXXFLAGS="$saved_cxxflags"
52948
52949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52950$as_echo "$supports" >&6; }
52951  if test "x$supports" = "xyes" ; then
52952    :
52953    CXX_COMP_SUPPORTS="yes"
52954  else
52955    :
52956    CXX_COMP_SUPPORTS="no"
52957  fi
52958
52959
52960
52961
52962
52963
52964
52965
52966
52967
52968
52969
52970
52971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52972$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52973  supports=no
52974  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52975
52976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52977$as_echo "$supports" >&6; }
52978  if test "x$supports" = "xyes" ; then
52979    :
52980    BUILD_CC_CAN_DISABLE_WARNINGS=true
52981  else
52982    :
52983    BUILD_CC_CAN_DISABLE_WARNINGS=false
52984
52985  fi
52986
52987
52988
52989
52990
52991
52992      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52993        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52994      else
52995        BUILD_CC_DISABLE_WARNING_PREFIX=
52996      fi
52997      CC="$CC_OLD"
52998      CXX="$CXX_OLD"
52999      CFLAGS="$CFLAGS_OLD"
53000      ;;
53001    clang)
53002      DISABLE_WARNING_PREFIX="-Wno-"
53003      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53004      ;;
53005    xlc)
53006      DISABLE_WARNING_PREFIX="-qsuppress="
53007      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53008      ;;
53009  esac
53010
53011
53012
53013
53014
53015# Setup debug symbols (need objcopy from the toolchain for that)
53016
53017  #
53018  # NATIVE_DEBUG_SYMBOLS
53019  # This must be done after the toolchain is setup, since we're looking at objcopy.
53020  #
53021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53022$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53023
53024# Check whether --with-native-debug-symbols was given.
53025if test "${with_native_debug_symbols+set}" = set; then :
53026  withval=$with_native_debug_symbols;
53027        if test "x$OPENJDK_TARGET_OS" = xaix; then
53028          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53029            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53030          fi
53031        fi
53032
53033else
53034
53035        if test "x$OPENJDK_TARGET_OS" = xaix; then
53036          # AIX doesn't support 'zipped' so use 'internal' as default
53037          with_native_debug_symbols="internal"
53038        else
53039          if test "x$STATIC_BUILD" = xtrue; then
53040            with_native_debug_symbols="none"
53041          else
53042            with_native_debug_symbols="zipped"
53043          fi
53044        fi
53045
53046fi
53047
53048  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53050$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53051
53052  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53053
53054    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53055      if test "x$OBJCOPY" = x; then
53056        # enabling of enable-debug-symbols and can't find objcopy
53057        # this is an error
53058        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53059      fi
53060    fi
53061
53062    COMPILE_WITH_DEBUG_SYMBOLS=true
53063    COPY_DEBUG_SYMBOLS=true
53064    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53065
53066    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53067    DEBUG_BINARIES=false
53068    STRIP_POLICY=min_strip
53069
53070  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53071    COMPILE_WITH_DEBUG_SYMBOLS=false
53072    COPY_DEBUG_SYMBOLS=false
53073    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53074
53075    DEBUG_BINARIES=false
53076    STRIP_POLICY=no_strip
53077  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53078    COMPILE_WITH_DEBUG_SYMBOLS=true
53079    COPY_DEBUG_SYMBOLS=false
53080    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53081
53082    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
53083    DEBUG_BINARIES=true
53084    STRIP_POLICY=no_strip
53085    STRIP=""
53086
53087  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53088
53089    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53090      if test "x$OBJCOPY" = x; then
53091        # enabling of enable-debug-symbols and can't find objcopy
53092        # this is an error
53093        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53094      fi
53095    fi
53096
53097    COMPILE_WITH_DEBUG_SYMBOLS=true
53098    COPY_DEBUG_SYMBOLS=true
53099    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53100
53101    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53102    DEBUG_BINARIES=false
53103    STRIP_POLICY=min_strip
53104  else
53105    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53106  fi
53107
53108  # --enable-debug-symbols is deprecated.
53109  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53110
53111  # Check whether --enable-debug-symbols was given.
53112if test "${enable_debug_symbols+set}" = set; then :
53113  enableval=$enable_debug_symbols;
53114fi
53115
53116  if test "x$enable_debug_symbols" != x; then
53117    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53118$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53119
53120    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53121      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53122$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53123    fi
53124
53125  fi
53126
53127
53128  # --enable-zip-debug-info is deprecated.
53129  # Please use --with-native-debug-symbols=zipped .
53130
53131  # Check whether --enable-zip-debug-info was given.
53132if test "${enable_zip_debug_info+set}" = set; then :
53133  enableval=$enable_zip_debug_info;
53134fi
53135
53136  if test "x$enable_zip_debug_info" != x; then
53137    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53138$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53139
53140    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53141      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53142$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53143    fi
53144
53145  fi
53146
53147
53148
53149
53150
53151
53152  # Legacy values
53153
53154
53155
53156
53157  # Check whether --enable-native-coverage was given.
53158if test "${enable_native_coverage+set}" = set; then :
53159  enableval=$enable_native_coverage;
53160fi
53161
53162  GCOV_ENABLED="false"
53163  if test "x$enable_native_coverage" = "xyes"; then
53164    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53165      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53166$as_echo_n "checking if native coverage is enabled... " >&6; }
53167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53168$as_echo "yes" >&6; }
53169      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53170      GCOV_LDFLAGS="-fprofile-arcs"
53171      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
53172      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
53173      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
53174      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53175      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53176      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53177      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53178      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53179      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53180      GCOV_ENABLED="true"
53181    else
53182      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53183    fi
53184  elif test "x$enable_native_coverage" = "xno"; then
53185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53186$as_echo_n "checking if native coverage is enabled... " >&6; }
53187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53188$as_echo "no" >&6; }
53189  elif test "x$enable_native_coverage" != "x"; then
53190    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53191  fi
53192
53193
53194
53195
53196# Need toolchain to setup dtrace
53197
53198  # Test for dtrace dependencies
53199  # Check whether --enable-dtrace was given.
53200if test "${enable_dtrace+set}" = set; then :
53201  enableval=$enable_dtrace;
53202fi
53203
53204
53205  DTRACE_DEP_MISSING=false
53206
53207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53208$as_echo_n "checking for dtrace tool... " >&6; }
53209  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53211$as_echo "$DTRACE" >&6; }
53212  else
53213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53214$as_echo "not found, cannot build dtrace" >&6; }
53215    DTRACE_DEP_MISSING=true
53216  fi
53217
53218  for ac_header in sys/sdt.h
53219do :
53220  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53221if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53222  cat >>confdefs.h <<_ACEOF
53223#define HAVE_SYS_SDT_H 1
53224_ACEOF
53225 DTRACE_HEADERS_OK=yes
53226else
53227  DTRACE_HEADERS_OK=no
53228fi
53229
53230done
53231
53232  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53233    DTRACE_DEP_MISSING=true
53234  fi
53235
53236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53237$as_echo_n "checking if dtrace should be built... " >&6; }
53238  if test "x$enable_dtrace" = "xyes"; then
53239    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53240      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53241$as_echo "no, missing dependencies" >&6; }
53242
53243  # Print a helpful message on how to acquire the necessary build dependency.
53244  # dtrace is the help tag: freetype, cups, alsa etc
53245  MISSING_DEPENDENCY=dtrace
53246
53247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53248    cygwin_help $MISSING_DEPENDENCY
53249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53250    msys_help $MISSING_DEPENDENCY
53251  else
53252    PKGHANDLER_COMMAND=
53253
53254    case $PKGHANDLER in
53255      apt-get)
53256        apt_help     $MISSING_DEPENDENCY ;;
53257      yum)
53258        yum_help     $MISSING_DEPENDENCY ;;
53259      port)
53260        port_help    $MISSING_DEPENDENCY ;;
53261      pkgutil)
53262        pkgutil_help $MISSING_DEPENDENCY ;;
53263      pkgadd)
53264        pkgadd_help  $MISSING_DEPENDENCY ;;
53265    esac
53266
53267    if test "x$PKGHANDLER_COMMAND" != x; then
53268      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53269    fi
53270  fi
53271
53272      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53273    else
53274      INCLUDE_DTRACE=true
53275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53276$as_echo "yes, forced" >&6; }
53277    fi
53278  elif test "x$enable_dtrace" = "xno"; then
53279    INCLUDE_DTRACE=false
53280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53281$as_echo "no, forced" >&6; }
53282  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53283    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
53284      INCLUDE_DTRACE=false
53285      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
53286$as_echo "no, non-open linux build" >&6; }
53287    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53288      INCLUDE_DTRACE=false
53289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53290$as_echo "no, missing dependencies" >&6; }
53291    else
53292      INCLUDE_DTRACE=true
53293      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53294$as_echo "yes, dependencies present" >&6; }
53295    fi
53296  else
53297    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53298  fi
53299
53300
53301
53302  # The user can in some cases supply additional jvm features. For the custom
53303  # variant, this defines the entire variant.
53304
53305# Check whether --with-jvm-features was given.
53306if test "${with_jvm_features+set}" = set; then :
53307  withval=$with_jvm_features;
53308fi
53309
53310  if test "x$with_jvm_features" != x; then
53311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
53312$as_echo_n "checking additional JVM features... " >&6; }
53313    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
53314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
53315$as_echo "$JVM_FEATURES" >&6; }
53316  fi
53317
53318  # Verify that dependencies are met for explicitly set features.
53319  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
53320    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
53321  fi
53322
53323  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
53324    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
53325  fi
53326
53327  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
53328    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
53329  fi
53330
53331  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53332    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
53333  fi
53334
53335  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53336    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
53337  fi
53338
53339  # Turn on additional features based on other parts of configure
53340  if test "x$INCLUDE_DTRACE" = "xtrue"; then
53341    JVM_FEATURES="$JVM_FEATURES dtrace"
53342  else
53343    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
53344      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
53345    fi
53346  fi
53347
53348  if test "x$STATIC_BUILD" = "xtrue"; then
53349    JVM_FEATURES="$JVM_FEATURES static-build"
53350  else
53351    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
53352      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
53353    fi
53354  fi
53355
53356  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53357    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
53358      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
53359    fi
53360  fi
53361
53362  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53363    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
53364      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
53365    fi
53366  fi
53367
53368  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
53369  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
53370      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
53371      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
53372    JVM_FEATURES_jvmci="jvmci"
53373  else
53374    JVM_FEATURES_jvmci=""
53375  fi
53376
53377  # All variants but minimal (and custom) get these features
53378  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
53379
53380  # Enable features depending on variant.
53381  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53382  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
53383  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
53384  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
53385  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
53386  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
53387  JVM_FEATURES_custom="$JVM_FEATURES"
53388
53389
53390
53391
53392
53393
53394
53395
53396
53397  # Used for verification of Makefiles by check-jvm-feature
53398
53399
53400  # We don't support --with-jvm-interpreter anymore, use zero instead.
53401
53402
53403# Check whether --with-jvm-interpreter was given.
53404if test "${with_jvm_interpreter+set}" = set; then :
53405  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
53406$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
53407fi
53408
53409
53410
53411
53412###############################################################################
53413#
53414# Check dependencies for external and internal libraries.
53415#
53416###############################################################################
53417
53418# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53419
53420  # When using cygwin or msys, we need a wrapper binary that renames
53421  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53422  # @files and rewrites these too! This wrapper binary is
53423  # called fixpath.
53424  FIXPATH=
53425  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53427$as_echo_n "checking if fixpath can be created... " >&6; }
53428    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53429    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53430    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53431    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53432      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53433      FIXPATH="$FIXPATH_BIN -c"
53434    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53435      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53436      # @ was chosen as separator to minimize risk of other tools messing around with it
53437      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53438          | tr ' ' '\n' | grep '^/./' | sort | uniq`
53439      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53440      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53441    fi
53442    FIXPATH_SRC_W="$FIXPATH_SRC"
53443    FIXPATH_BIN_W="$FIXPATH_BIN"
53444
53445  unix_path="$FIXPATH_SRC_W"
53446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53447    windows_path=`$CYGPATH -m "$unix_path"`
53448    FIXPATH_SRC_W="$windows_path"
53449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53450    windows_path=`cmd //c echo $unix_path`
53451    FIXPATH_SRC_W="$windows_path"
53452  fi
53453
53454
53455  unix_path="$FIXPATH_BIN_W"
53456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53457    windows_path=`$CYGPATH -m "$unix_path"`
53458    FIXPATH_BIN_W="$windows_path"
53459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53460    windows_path=`cmd //c echo $unix_path`
53461    FIXPATH_BIN_W="$windows_path"
53462  fi
53463
53464    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53465    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53466    cd $FIXPATH_DIR
53467    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53468    cd $CURDIR
53469
53470    if test ! -x $FIXPATH_BIN; then
53471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53472$as_echo "no" >&6; }
53473      cat $FIXPATH_DIR/fixpath1.log
53474      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53475    fi
53476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53477$as_echo "yes" >&6; }
53478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53479$as_echo_n "checking if fixpath.exe works... " >&6; }
53480    cd $FIXPATH_DIR
53481    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53482        > $FIXPATH_DIR/fixpath2.log 2>&1
53483    cd $CURDIR
53484    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53485      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53486$as_echo "no" >&6; }
53487      cat $FIXPATH_DIR/fixpath2.log
53488      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53489    fi
53490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53491$as_echo "yes" >&6; }
53492
53493    FIXPATH_DETACH_FLAG="--detach"
53494  fi
53495
53496
53497
53498
53499
53500
53501  # Check if X11 is needed
53502  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53503    # No X11 support on windows or macosx
53504    NEEDS_LIB_X11=false
53505  else
53506    if test "x$SUPPORT_HEADFUL" = xno; then
53507      # No X11 support if building headless-only
53508      NEEDS_LIB_X11=false
53509    else
53510      # All other instances need X11
53511      NEEDS_LIB_X11=true
53512    fi
53513  fi
53514
53515  # Check if cups is needed
53516  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53517    # Windows have a separate print system
53518    NEEDS_LIB_CUPS=false
53519  else
53520    NEEDS_LIB_CUPS=true
53521  fi
53522
53523  # Check if freetype is needed
53524  if test "x$OPENJDK" = "xtrue"; then
53525    NEEDS_LIB_FREETYPE=true
53526  else
53527    NEEDS_LIB_FREETYPE=false
53528  fi
53529
53530  # Check if alsa is needed
53531  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53532    NEEDS_LIB_ALSA=true
53533  else
53534    NEEDS_LIB_ALSA=false
53535  fi
53536
53537  # Check if ffi is needed
53538  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53539    NEEDS_LIB_FFI=true
53540  else
53541    NEEDS_LIB_FFI=false
53542  fi
53543
53544
53545  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53546  # dynamic build is configured on command line.
53547
53548# Check whether --with-stdc++lib was given.
53549if test "${with_stdc__lib+set}" = set; then :
53550  withval=$with_stdc__lib;
53551        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53552                && test "x$with_stdc__lib" != xdefault; then
53553          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53554        fi
53555
53556else
53557  with_stdc__lib=default
53558
53559fi
53560
53561
53562  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53563    # Test if -lstdc++ works.
53564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53565$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53566    ac_ext=cpp
53567ac_cpp='$CXXCPP $CPPFLAGS'
53568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53571
53572    OLD_CXXFLAGS="$CXXFLAGS"
53573    CXXFLAGS="$CXXFLAGS -lstdc++"
53574    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53575/* end confdefs.h.  */
53576
53577int
53578main ()
53579{
53580return 0;
53581  ;
53582  return 0;
53583}
53584_ACEOF
53585if ac_fn_cxx_try_link "$LINENO"; then :
53586  has_dynamic_libstdcxx=yes
53587else
53588  has_dynamic_libstdcxx=no
53589fi
53590rm -f core conftest.err conftest.$ac_objext \
53591    conftest$ac_exeext conftest.$ac_ext
53592    CXXFLAGS="$OLD_CXXFLAGS"
53593    ac_ext=cpp
53594ac_cpp='$CXXCPP $CPPFLAGS'
53595ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53596ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53597ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53598
53599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53600$as_echo "$has_dynamic_libstdcxx" >&6; }
53601
53602    # Test if stdc++ can be linked statically.
53603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53604$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53605    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53606    ac_ext=cpp
53607ac_cpp='$CXXCPP $CPPFLAGS'
53608ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53609ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53610ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53611
53612    OLD_LIBS="$LIBS"
53613    OLD_CXX="$CXX"
53614    LIBS="$STATIC_STDCXX_FLAGS"
53615    CXX="$CC"
53616    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53617/* end confdefs.h.  */
53618
53619int
53620main ()
53621{
53622return 0;
53623  ;
53624  return 0;
53625}
53626_ACEOF
53627if ac_fn_cxx_try_link "$LINENO"; then :
53628  has_static_libstdcxx=yes
53629else
53630  has_static_libstdcxx=no
53631fi
53632rm -f core conftest.err conftest.$ac_objext \
53633    conftest$ac_exeext conftest.$ac_ext
53634    LIBS="$OLD_LIBS"
53635    CXX="$OLD_CXX"
53636    ac_ext=cpp
53637ac_cpp='$CXXCPP $CPPFLAGS'
53638ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53639ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53640ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53641
53642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53643$as_echo "$has_static_libstdcxx" >&6; }
53644
53645    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53646      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53647    fi
53648
53649    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53650      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53651    fi
53652
53653    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53654      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53655    fi
53656
53657    # If dynamic was requested, it's available since it would fail above otherwise.
53658    # If dynamic wasn't requested, go with static unless it isn't available.
53659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53660$as_echo_n "checking how to link with libstdc++... " >&6; }
53661    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53662      LIBCXX="$LIBCXX -lstdc++"
53663      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53664      JVM_LIBS="-lstdc++ $JVM_LIBS"
53665      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53666      # just use the same setting as for the TARGET toolchain.
53667      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53668      LDCXX="$CXX"
53669      STATIC_CXX_SETTING="STATIC_CXX=false"
53670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53671$as_echo "dynamic" >&6; }
53672    else
53673      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53674      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53675      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53676      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53677      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53678      # just use the same setting as for the TARGET toolchain.
53679      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53680      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53681      LDCXX="$CC"
53682      STATIC_CXX_SETTING="STATIC_CXX=true"
53683      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53684$as_echo "static" >&6; }
53685    fi
53686  fi
53687
53688
53689  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53690  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53691    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53692  fi
53693
53694  # TODO better (platform agnostic) test
53695  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53696    LIBCXX="-lstdc++"
53697  fi
53698
53699
53700  # Setup Windows runtime dlls
53701  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53702
53703
53704# Check whether --with-msvcr-dll was given.
53705if test "${with_msvcr_dll+set}" = set; then :
53706  withval=$with_msvcr_dll;
53707fi
53708
53709
53710  if test "x$with_msvcr_dll" != x; then
53711    # If given explicitely by user, do not probe. If not present, fail directly.
53712
53713  DLL_NAME="$MSVCR_NAME"
53714  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53715  METHOD="--with-msvcr-dll"
53716  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53717    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53718$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53719
53720    # Need to check if the found msvcr is correct architecture
53721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53722$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53723    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53725      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53726      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53727      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53728        CORRECT_MSVCR_ARCH="PE32 executable"
53729      else
53730        CORRECT_MSVCR_ARCH="PE32+ executable"
53731      fi
53732    else
53733      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53734        CORRECT_MSVCR_ARCH=386
53735      else
53736        CORRECT_MSVCR_ARCH=x86-64
53737      fi
53738    fi
53739    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53741$as_echo "ok" >&6; }
53742      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53743
53744  # Only process if variable expands to non-empty
53745
53746  if test "x$MSVC_DLL" != x; then
53747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53748
53749  # Input might be given as Windows format, start by converting to
53750  # unix format.
53751  path="$MSVC_DLL"
53752  new_path=`$CYGPATH -u "$path"`
53753
53754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53757  # "foo.exe" is OK but "foo" is an error.
53758  #
53759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53760  # It is also a way to make sure we got the proper file name for the real test later on.
53761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53762  if test "x$test_shortpath" = x; then
53763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53764$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53765    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53766  fi
53767
53768  # Call helper function which possibly converts this using DOS-style short mode.
53769  # If so, the updated path is stored in $new_path.
53770
53771  input_path="$new_path"
53772  # Check if we need to convert this using DOS-style short mode. If the path
53773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53774  # take no chances and rewrite it.
53775  # Note: m4 eats our [], so we need to use [ and ] instead.
53776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53777  if test "x$has_forbidden_chars" != x; then
53778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53782      # Going to short mode and back again did indeed matter. Since short mode is
53783      # case insensitive, let's make it lowercase to improve readability.
53784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53785      # Now convert it back to Unix-style (cygpath)
53786      input_path=`$CYGPATH -u "$shortmode_path"`
53787      new_path="$input_path"
53788    fi
53789  fi
53790
53791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53792  if test "x$test_cygdrive_prefix" = x; then
53793    # As a simple fix, exclude /usr/bin since it's not a real path.
53794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53796      # a path prefixed by /cygdrive for fixpath to work.
53797      new_path="$CYGWIN_ROOT_PATH$input_path"
53798    fi
53799  fi
53800
53801
53802  if test "x$path" != "x$new_path"; then
53803    MSVC_DLL="$new_path"
53804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53805$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53806  fi
53807
53808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53809
53810  path="$MSVC_DLL"
53811  has_colon=`$ECHO $path | $GREP ^.:`
53812  new_path="$path"
53813  if test "x$has_colon" = x; then
53814    # Not in mixed or Windows style, start by that.
53815    new_path=`cmd //c echo $path`
53816  fi
53817
53818
53819  input_path="$new_path"
53820  # Check if we need to convert this using DOS-style short mode. If the path
53821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53822  # take no chances and rewrite it.
53823  # Note: m4 eats our [], so we need to use [ and ] instead.
53824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53825  if test "x$has_forbidden_chars" != x; then
53826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53828  fi
53829
53830
53831  windows_path="$new_path"
53832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53833    unix_path=`$CYGPATH -u "$windows_path"`
53834    new_path="$unix_path"
53835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53837    new_path="$unix_path"
53838  fi
53839
53840  if test "x$path" != "x$new_path"; then
53841    MSVC_DLL="$new_path"
53842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53843$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53844  fi
53845
53846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53848
53849    else
53850      # We're on a unix platform. Hooray! :)
53851      path="$MSVC_DLL"
53852      has_space=`$ECHO "$path" | $GREP " "`
53853      if test "x$has_space" != x; then
53854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53855$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53856        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53857      fi
53858
53859      # Use eval to expand a potential ~
53860      eval path="$path"
53861      if test ! -f "$path" && test ! -d "$path"; then
53862        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53863      fi
53864
53865      if test -d "$path"; then
53866        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53867      else
53868        dir="`$DIRNAME "$path"`"
53869        base="`$BASENAME "$path"`"
53870        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53871      fi
53872    fi
53873  fi
53874
53875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53876$as_echo_n "checking for $DLL_NAME... " >&6; }
53877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53878$as_echo "$MSVC_DLL" >&6; }
53879    else
53880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53881$as_echo "incorrect, ignoring" >&6; }
53882      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53883$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53884    fi
53885  fi
53886
53887    if test "x$MSVC_DLL" = x; then
53888      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53889    fi
53890    MSVCR_DLL="$MSVC_DLL"
53891  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53892
53893  DLL_NAME="$MSVCR_NAME"
53894  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53895  METHOD="devkit"
53896  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53897    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53898$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53899
53900    # Need to check if the found msvcr is correct architecture
53901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53902$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53903    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53905      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53906      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53907      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53908        CORRECT_MSVCR_ARCH="PE32 executable"
53909      else
53910        CORRECT_MSVCR_ARCH="PE32+ executable"
53911      fi
53912    else
53913      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53914        CORRECT_MSVCR_ARCH=386
53915      else
53916        CORRECT_MSVCR_ARCH=x86-64
53917      fi
53918    fi
53919    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53921$as_echo "ok" >&6; }
53922      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53923
53924  # Only process if variable expands to non-empty
53925
53926  if test "x$MSVC_DLL" != x; then
53927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53928
53929  # Input might be given as Windows format, start by converting to
53930  # unix format.
53931  path="$MSVC_DLL"
53932  new_path=`$CYGPATH -u "$path"`
53933
53934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53937  # "foo.exe" is OK but "foo" is an error.
53938  #
53939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53940  # It is also a way to make sure we got the proper file name for the real test later on.
53941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53942  if test "x$test_shortpath" = x; then
53943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53944$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53945    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53946  fi
53947
53948  # Call helper function which possibly converts this using DOS-style short mode.
53949  # If so, the updated path is stored in $new_path.
53950
53951  input_path="$new_path"
53952  # Check if we need to convert this using DOS-style short mode. If the path
53953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53954  # take no chances and rewrite it.
53955  # Note: m4 eats our [], so we need to use [ and ] instead.
53956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53957  if test "x$has_forbidden_chars" != x; then
53958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53962      # Going to short mode and back again did indeed matter. Since short mode is
53963      # case insensitive, let's make it lowercase to improve readability.
53964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53965      # Now convert it back to Unix-style (cygpath)
53966      input_path=`$CYGPATH -u "$shortmode_path"`
53967      new_path="$input_path"
53968    fi
53969  fi
53970
53971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53972  if test "x$test_cygdrive_prefix" = x; then
53973    # As a simple fix, exclude /usr/bin since it's not a real path.
53974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53976      # a path prefixed by /cygdrive for fixpath to work.
53977      new_path="$CYGWIN_ROOT_PATH$input_path"
53978    fi
53979  fi
53980
53981
53982  if test "x$path" != "x$new_path"; then
53983    MSVC_DLL="$new_path"
53984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53985$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53986  fi
53987
53988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53989
53990  path="$MSVC_DLL"
53991  has_colon=`$ECHO $path | $GREP ^.:`
53992  new_path="$path"
53993  if test "x$has_colon" = x; then
53994    # Not in mixed or Windows style, start by that.
53995    new_path=`cmd //c echo $path`
53996  fi
53997
53998
53999  input_path="$new_path"
54000  # Check if we need to convert this using DOS-style short mode. If the path
54001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54002  # take no chances and rewrite it.
54003  # Note: m4 eats our [], so we need to use [ and ] instead.
54004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54005  if test "x$has_forbidden_chars" != x; then
54006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54008  fi
54009
54010
54011  windows_path="$new_path"
54012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54013    unix_path=`$CYGPATH -u "$windows_path"`
54014    new_path="$unix_path"
54015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54017    new_path="$unix_path"
54018  fi
54019
54020  if test "x$path" != "x$new_path"; then
54021    MSVC_DLL="$new_path"
54022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54023$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54024  fi
54025
54026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54028
54029    else
54030      # We're on a unix platform. Hooray! :)
54031      path="$MSVC_DLL"
54032      has_space=`$ECHO "$path" | $GREP " "`
54033      if test "x$has_space" != x; then
54034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54035$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54037      fi
54038
54039      # Use eval to expand a potential ~
54040      eval path="$path"
54041      if test ! -f "$path" && test ! -d "$path"; then
54042        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54043      fi
54044
54045      if test -d "$path"; then
54046        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54047      else
54048        dir="`$DIRNAME "$path"`"
54049        base="`$BASENAME "$path"`"
54050        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54051      fi
54052    fi
54053  fi
54054
54055      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54056$as_echo_n "checking for $DLL_NAME... " >&6; }
54057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54058$as_echo "$MSVC_DLL" >&6; }
54059    else
54060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54061$as_echo "incorrect, ignoring" >&6; }
54062      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54063$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54064    fi
54065  fi
54066
54067    if test "x$MSVC_DLL" = x; then
54068      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54069    fi
54070    MSVCR_DLL="$MSVC_DLL"
54071  else
54072
54073  DLL_NAME="${MSVCR_NAME}"
54074  MSVC_DLL=
54075
54076  if test "x$MSVC_DLL" = x; then
54077    # Probe: Using well-known location from Visual Studio 10.0
54078    if test "x$VCINSTALLDIR" != x; then
54079      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54080
54081  windows_path="$CYGWIN_VC_INSTALL_DIR"
54082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54083    unix_path=`$CYGPATH -u "$windows_path"`
54084    CYGWIN_VC_INSTALL_DIR="$unix_path"
54085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54087    CYGWIN_VC_INSTALL_DIR="$unix_path"
54088  fi
54089
54090      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54091        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54092      else
54093        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54094      fi
54095      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54096
54097  DLL_NAME="$DLL_NAME"
54098  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54099  METHOD="well-known location in VCINSTALLDIR"
54100  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54101    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54102$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54103
54104    # Need to check if the found msvcr is correct architecture
54105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54106$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54107    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54109      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54110      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54111      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54112        CORRECT_MSVCR_ARCH="PE32 executable"
54113      else
54114        CORRECT_MSVCR_ARCH="PE32+ executable"
54115      fi
54116    else
54117      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54118        CORRECT_MSVCR_ARCH=386
54119      else
54120        CORRECT_MSVCR_ARCH=x86-64
54121      fi
54122    fi
54123    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54125$as_echo "ok" >&6; }
54126      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54127
54128  # Only process if variable expands to non-empty
54129
54130  if test "x$MSVC_DLL" != x; then
54131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54132
54133  # Input might be given as Windows format, start by converting to
54134  # unix format.
54135  path="$MSVC_DLL"
54136  new_path=`$CYGPATH -u "$path"`
54137
54138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54141  # "foo.exe" is OK but "foo" is an error.
54142  #
54143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54144  # It is also a way to make sure we got the proper file name for the real test later on.
54145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54146  if test "x$test_shortpath" = x; then
54147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54148$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54149    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54150  fi
54151
54152  # Call helper function which possibly converts this using DOS-style short mode.
54153  # If so, the updated path is stored in $new_path.
54154
54155  input_path="$new_path"
54156  # Check if we need to convert this using DOS-style short mode. If the path
54157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54158  # take no chances and rewrite it.
54159  # Note: m4 eats our [], so we need to use [ and ] instead.
54160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54161  if test "x$has_forbidden_chars" != x; then
54162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54166      # Going to short mode and back again did indeed matter. Since short mode is
54167      # case insensitive, let's make it lowercase to improve readability.
54168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54169      # Now convert it back to Unix-style (cygpath)
54170      input_path=`$CYGPATH -u "$shortmode_path"`
54171      new_path="$input_path"
54172    fi
54173  fi
54174
54175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54176  if test "x$test_cygdrive_prefix" = x; then
54177    # As a simple fix, exclude /usr/bin since it's not a real path.
54178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54180      # a path prefixed by /cygdrive for fixpath to work.
54181      new_path="$CYGWIN_ROOT_PATH$input_path"
54182    fi
54183  fi
54184
54185
54186  if test "x$path" != "x$new_path"; then
54187    MSVC_DLL="$new_path"
54188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54189$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54190  fi
54191
54192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54193
54194  path="$MSVC_DLL"
54195  has_colon=`$ECHO $path | $GREP ^.:`
54196  new_path="$path"
54197  if test "x$has_colon" = x; then
54198    # Not in mixed or Windows style, start by that.
54199    new_path=`cmd //c echo $path`
54200  fi
54201
54202
54203  input_path="$new_path"
54204  # Check if we need to convert this using DOS-style short mode. If the path
54205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54206  # take no chances and rewrite it.
54207  # Note: m4 eats our [], so we need to use [ and ] instead.
54208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54209  if test "x$has_forbidden_chars" != x; then
54210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54212  fi
54213
54214
54215  windows_path="$new_path"
54216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54217    unix_path=`$CYGPATH -u "$windows_path"`
54218    new_path="$unix_path"
54219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54221    new_path="$unix_path"
54222  fi
54223
54224  if test "x$path" != "x$new_path"; then
54225    MSVC_DLL="$new_path"
54226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54227$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54228  fi
54229
54230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54232
54233    else
54234      # We're on a unix platform. Hooray! :)
54235      path="$MSVC_DLL"
54236      has_space=`$ECHO "$path" | $GREP " "`
54237      if test "x$has_space" != x; then
54238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54239$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54241      fi
54242
54243      # Use eval to expand a potential ~
54244      eval path="$path"
54245      if test ! -f "$path" && test ! -d "$path"; then
54246        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54247      fi
54248
54249      if test -d "$path"; then
54250        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54251      else
54252        dir="`$DIRNAME "$path"`"
54253        base="`$BASENAME "$path"`"
54254        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54255      fi
54256    fi
54257  fi
54258
54259      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54260$as_echo_n "checking for $DLL_NAME... " >&6; }
54261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54262$as_echo "$MSVC_DLL" >&6; }
54263    else
54264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54265$as_echo "incorrect, ignoring" >&6; }
54266      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54267$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54268    fi
54269  fi
54270
54271    fi
54272  fi
54273
54274  if test "x$MSVC_DLL" = x; then
54275    # Probe: Check in the Boot JDK directory.
54276    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54277
54278  DLL_NAME="$DLL_NAME"
54279  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54280  METHOD="well-known location in Boot JDK"
54281  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54282    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54283$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54284
54285    # Need to check if the found msvcr is correct architecture
54286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54287$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54288    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54290      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54291      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54292      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54293        CORRECT_MSVCR_ARCH="PE32 executable"
54294      else
54295        CORRECT_MSVCR_ARCH="PE32+ executable"
54296      fi
54297    else
54298      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54299        CORRECT_MSVCR_ARCH=386
54300      else
54301        CORRECT_MSVCR_ARCH=x86-64
54302      fi
54303    fi
54304    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54306$as_echo "ok" >&6; }
54307      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54308
54309  # Only process if variable expands to non-empty
54310
54311  if test "x$MSVC_DLL" != x; then
54312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54313
54314  # Input might be given as Windows format, start by converting to
54315  # unix format.
54316  path="$MSVC_DLL"
54317  new_path=`$CYGPATH -u "$path"`
54318
54319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54322  # "foo.exe" is OK but "foo" is an error.
54323  #
54324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54325  # It is also a way to make sure we got the proper file name for the real test later on.
54326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54327  if test "x$test_shortpath" = x; then
54328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54329$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54330    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54331  fi
54332
54333  # Call helper function which possibly converts this using DOS-style short mode.
54334  # If so, the updated path is stored in $new_path.
54335
54336  input_path="$new_path"
54337  # Check if we need to convert this using DOS-style short mode. If the path
54338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54339  # take no chances and rewrite it.
54340  # Note: m4 eats our [], so we need to use [ and ] instead.
54341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54342  if test "x$has_forbidden_chars" != x; then
54343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54347      # Going to short mode and back again did indeed matter. Since short mode is
54348      # case insensitive, let's make it lowercase to improve readability.
54349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54350      # Now convert it back to Unix-style (cygpath)
54351      input_path=`$CYGPATH -u "$shortmode_path"`
54352      new_path="$input_path"
54353    fi
54354  fi
54355
54356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54357  if test "x$test_cygdrive_prefix" = x; then
54358    # As a simple fix, exclude /usr/bin since it's not a real path.
54359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54361      # a path prefixed by /cygdrive for fixpath to work.
54362      new_path="$CYGWIN_ROOT_PATH$input_path"
54363    fi
54364  fi
54365
54366
54367  if test "x$path" != "x$new_path"; then
54368    MSVC_DLL="$new_path"
54369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54370$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54371  fi
54372
54373    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54374
54375  path="$MSVC_DLL"
54376  has_colon=`$ECHO $path | $GREP ^.:`
54377  new_path="$path"
54378  if test "x$has_colon" = x; then
54379    # Not in mixed or Windows style, start by that.
54380    new_path=`cmd //c echo $path`
54381  fi
54382
54383
54384  input_path="$new_path"
54385  # Check if we need to convert this using DOS-style short mode. If the path
54386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54387  # take no chances and rewrite it.
54388  # Note: m4 eats our [], so we need to use [ and ] instead.
54389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54390  if test "x$has_forbidden_chars" != x; then
54391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54393  fi
54394
54395
54396  windows_path="$new_path"
54397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54398    unix_path=`$CYGPATH -u "$windows_path"`
54399    new_path="$unix_path"
54400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54402    new_path="$unix_path"
54403  fi
54404
54405  if test "x$path" != "x$new_path"; then
54406    MSVC_DLL="$new_path"
54407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54408$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54409  fi
54410
54411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54413
54414    else
54415      # We're on a unix platform. Hooray! :)
54416      path="$MSVC_DLL"
54417      has_space=`$ECHO "$path" | $GREP " "`
54418      if test "x$has_space" != x; then
54419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54420$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54421        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54422      fi
54423
54424      # Use eval to expand a potential ~
54425      eval path="$path"
54426      if test ! -f "$path" && test ! -d "$path"; then
54427        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54428      fi
54429
54430      if test -d "$path"; then
54431        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54432      else
54433        dir="`$DIRNAME "$path"`"
54434        base="`$BASENAME "$path"`"
54435        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54436      fi
54437    fi
54438  fi
54439
54440      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54441$as_echo_n "checking for $DLL_NAME... " >&6; }
54442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54443$as_echo "$MSVC_DLL" >&6; }
54444    else
54445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54446$as_echo "incorrect, ignoring" >&6; }
54447      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54448$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54449    fi
54450  fi
54451
54452  fi
54453
54454  if test "x$MSVC_DLL" = x; then
54455    # Probe: Look in the Windows system32 directory
54456    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54457
54458  windows_path="$CYGWIN_SYSTEMROOT"
54459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54460    unix_path=`$CYGPATH -u "$windows_path"`
54461    CYGWIN_SYSTEMROOT="$unix_path"
54462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54464    CYGWIN_SYSTEMROOT="$unix_path"
54465  fi
54466
54467    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54468
54469  DLL_NAME="$DLL_NAME"
54470  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54471  METHOD="well-known location in SYSTEMROOT"
54472  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54473    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54474$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54475
54476    # Need to check if the found msvcr is correct architecture
54477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54478$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54479    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54481      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54482      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54483      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54484        CORRECT_MSVCR_ARCH="PE32 executable"
54485      else
54486        CORRECT_MSVCR_ARCH="PE32+ executable"
54487      fi
54488    else
54489      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54490        CORRECT_MSVCR_ARCH=386
54491      else
54492        CORRECT_MSVCR_ARCH=x86-64
54493      fi
54494    fi
54495    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54497$as_echo "ok" >&6; }
54498      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54499
54500  # Only process if variable expands to non-empty
54501
54502  if test "x$MSVC_DLL" != x; then
54503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54504
54505  # Input might be given as Windows format, start by converting to
54506  # unix format.
54507  path="$MSVC_DLL"
54508  new_path=`$CYGPATH -u "$path"`
54509
54510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54513  # "foo.exe" is OK but "foo" is an error.
54514  #
54515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54516  # It is also a way to make sure we got the proper file name for the real test later on.
54517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54518  if test "x$test_shortpath" = x; then
54519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54520$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54521    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54522  fi
54523
54524  # Call helper function which possibly converts this using DOS-style short mode.
54525  # If so, the updated path is stored in $new_path.
54526
54527  input_path="$new_path"
54528  # Check if we need to convert this using DOS-style short mode. If the path
54529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54530  # take no chances and rewrite it.
54531  # Note: m4 eats our [], so we need to use [ and ] instead.
54532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54533  if test "x$has_forbidden_chars" != x; then
54534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54538      # Going to short mode and back again did indeed matter. Since short mode is
54539      # case insensitive, let's make it lowercase to improve readability.
54540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54541      # Now convert it back to Unix-style (cygpath)
54542      input_path=`$CYGPATH -u "$shortmode_path"`
54543      new_path="$input_path"
54544    fi
54545  fi
54546
54547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54548  if test "x$test_cygdrive_prefix" = x; then
54549    # As a simple fix, exclude /usr/bin since it's not a real path.
54550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54552      # a path prefixed by /cygdrive for fixpath to work.
54553      new_path="$CYGWIN_ROOT_PATH$input_path"
54554    fi
54555  fi
54556
54557
54558  if test "x$path" != "x$new_path"; then
54559    MSVC_DLL="$new_path"
54560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54561$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54562  fi
54563
54564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54565
54566  path="$MSVC_DLL"
54567  has_colon=`$ECHO $path | $GREP ^.:`
54568  new_path="$path"
54569  if test "x$has_colon" = x; then
54570    # Not in mixed or Windows style, start by that.
54571    new_path=`cmd //c echo $path`
54572  fi
54573
54574
54575  input_path="$new_path"
54576  # Check if we need to convert this using DOS-style short mode. If the path
54577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54578  # take no chances and rewrite it.
54579  # Note: m4 eats our [], so we need to use [ and ] instead.
54580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54581  if test "x$has_forbidden_chars" != x; then
54582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54584  fi
54585
54586
54587  windows_path="$new_path"
54588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54589    unix_path=`$CYGPATH -u "$windows_path"`
54590    new_path="$unix_path"
54591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54593    new_path="$unix_path"
54594  fi
54595
54596  if test "x$path" != "x$new_path"; then
54597    MSVC_DLL="$new_path"
54598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54599$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54600  fi
54601
54602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54604
54605    else
54606      # We're on a unix platform. Hooray! :)
54607      path="$MSVC_DLL"
54608      has_space=`$ECHO "$path" | $GREP " "`
54609      if test "x$has_space" != x; then
54610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54611$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54612        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54613      fi
54614
54615      # Use eval to expand a potential ~
54616      eval path="$path"
54617      if test ! -f "$path" && test ! -d "$path"; then
54618        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54619      fi
54620
54621      if test -d "$path"; then
54622        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54623      else
54624        dir="`$DIRNAME "$path"`"
54625        base="`$BASENAME "$path"`"
54626        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54627      fi
54628    fi
54629  fi
54630
54631      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54632$as_echo_n "checking for $DLL_NAME... " >&6; }
54633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54634$as_echo "$MSVC_DLL" >&6; }
54635    else
54636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54637$as_echo "incorrect, ignoring" >&6; }
54638      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54639$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54640    fi
54641  fi
54642
54643  fi
54644
54645  if test "x$MSVC_DLL" = x; then
54646    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54647    if test "x$VS100COMNTOOLS" != x; then
54648      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54649
54650  windows_path="$CYGWIN_VS_TOOLS_DIR"
54651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54652    unix_path=`$CYGPATH -u "$windows_path"`
54653    CYGWIN_VS_TOOLS_DIR="$unix_path"
54654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54656    CYGWIN_VS_TOOLS_DIR="$unix_path"
54657  fi
54658
54659      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54660        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54661	    | $GREP -i /x64/ | $HEAD --lines 1`
54662      else
54663        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54664	    | $GREP -i /x86/ | $HEAD --lines 1`
54665      fi
54666
54667  DLL_NAME="$DLL_NAME"
54668  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54669  METHOD="search of VS100COMNTOOLS"
54670  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54671    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54672$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54673
54674    # Need to check if the found msvcr is correct architecture
54675    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54676$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54677    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54679      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54680      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54681      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54682        CORRECT_MSVCR_ARCH="PE32 executable"
54683      else
54684        CORRECT_MSVCR_ARCH="PE32+ executable"
54685      fi
54686    else
54687      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54688        CORRECT_MSVCR_ARCH=386
54689      else
54690        CORRECT_MSVCR_ARCH=x86-64
54691      fi
54692    fi
54693    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54695$as_echo "ok" >&6; }
54696      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54697
54698  # Only process if variable expands to non-empty
54699
54700  if test "x$MSVC_DLL" != x; then
54701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54702
54703  # Input might be given as Windows format, start by converting to
54704  # unix format.
54705  path="$MSVC_DLL"
54706  new_path=`$CYGPATH -u "$path"`
54707
54708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54711  # "foo.exe" is OK but "foo" is an error.
54712  #
54713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54714  # It is also a way to make sure we got the proper file name for the real test later on.
54715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54716  if test "x$test_shortpath" = x; then
54717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54718$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54719    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54720  fi
54721
54722  # Call helper function which possibly converts this using DOS-style short mode.
54723  # If so, the updated path is stored in $new_path.
54724
54725  input_path="$new_path"
54726  # Check if we need to convert this using DOS-style short mode. If the path
54727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54728  # take no chances and rewrite it.
54729  # Note: m4 eats our [], so we need to use [ and ] instead.
54730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54731  if test "x$has_forbidden_chars" != x; then
54732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54736      # Going to short mode and back again did indeed matter. Since short mode is
54737      # case insensitive, let's make it lowercase to improve readability.
54738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54739      # Now convert it back to Unix-style (cygpath)
54740      input_path=`$CYGPATH -u "$shortmode_path"`
54741      new_path="$input_path"
54742    fi
54743  fi
54744
54745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54746  if test "x$test_cygdrive_prefix" = x; then
54747    # As a simple fix, exclude /usr/bin since it's not a real path.
54748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54750      # a path prefixed by /cygdrive for fixpath to work.
54751      new_path="$CYGWIN_ROOT_PATH$input_path"
54752    fi
54753  fi
54754
54755
54756  if test "x$path" != "x$new_path"; then
54757    MSVC_DLL="$new_path"
54758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54759$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54760  fi
54761
54762    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54763
54764  path="$MSVC_DLL"
54765  has_colon=`$ECHO $path | $GREP ^.:`
54766  new_path="$path"
54767  if test "x$has_colon" = x; then
54768    # Not in mixed or Windows style, start by that.
54769    new_path=`cmd //c echo $path`
54770  fi
54771
54772
54773  input_path="$new_path"
54774  # Check if we need to convert this using DOS-style short mode. If the path
54775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54776  # take no chances and rewrite it.
54777  # Note: m4 eats our [], so we need to use [ and ] instead.
54778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54779  if test "x$has_forbidden_chars" != x; then
54780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54782  fi
54783
54784
54785  windows_path="$new_path"
54786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54787    unix_path=`$CYGPATH -u "$windows_path"`
54788    new_path="$unix_path"
54789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54791    new_path="$unix_path"
54792  fi
54793
54794  if test "x$path" != "x$new_path"; then
54795    MSVC_DLL="$new_path"
54796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54797$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54798  fi
54799
54800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54802
54803    else
54804      # We're on a unix platform. Hooray! :)
54805      path="$MSVC_DLL"
54806      has_space=`$ECHO "$path" | $GREP " "`
54807      if test "x$has_space" != x; then
54808        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54809$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54810        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54811      fi
54812
54813      # Use eval to expand a potential ~
54814      eval path="$path"
54815      if test ! -f "$path" && test ! -d "$path"; then
54816        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54817      fi
54818
54819      if test -d "$path"; then
54820        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54821      else
54822        dir="`$DIRNAME "$path"`"
54823        base="`$BASENAME "$path"`"
54824        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54825      fi
54826    fi
54827  fi
54828
54829      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54830$as_echo_n "checking for $DLL_NAME... " >&6; }
54831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54832$as_echo "$MSVC_DLL" >&6; }
54833    else
54834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54835$as_echo "incorrect, ignoring" >&6; }
54836      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54837$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54838    fi
54839  fi
54840
54841    fi
54842  fi
54843
54844  if test "x$MSVC_DLL" = x; then
54845    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54846    # (This was the original behaviour; kept since it might turn something up)
54847    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54848      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54849        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54850	    | $GREP x64 | $HEAD --lines 1`
54851      else
54852        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54853	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54854        if test "x$POSSIBLE_MSVC_DLL" = x; then
54855          # We're grasping at straws now...
54856          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54857	      | $HEAD --lines 1`
54858        fi
54859      fi
54860
54861
54862  DLL_NAME="$DLL_NAME"
54863  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54864  METHOD="search of VCINSTALLDIR"
54865  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54866    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54867$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54868
54869    # Need to check if the found msvcr is correct architecture
54870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54871$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54872    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54874      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54875      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54876      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54877        CORRECT_MSVCR_ARCH="PE32 executable"
54878      else
54879        CORRECT_MSVCR_ARCH="PE32+ executable"
54880      fi
54881    else
54882      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54883        CORRECT_MSVCR_ARCH=386
54884      else
54885        CORRECT_MSVCR_ARCH=x86-64
54886      fi
54887    fi
54888    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54890$as_echo "ok" >&6; }
54891      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54892
54893  # Only process if variable expands to non-empty
54894
54895  if test "x$MSVC_DLL" != x; then
54896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54897
54898  # Input might be given as Windows format, start by converting to
54899  # unix format.
54900  path="$MSVC_DLL"
54901  new_path=`$CYGPATH -u "$path"`
54902
54903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54906  # "foo.exe" is OK but "foo" is an error.
54907  #
54908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54909  # It is also a way to make sure we got the proper file name for the real test later on.
54910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54911  if test "x$test_shortpath" = x; then
54912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54913$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54914    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54915  fi
54916
54917  # Call helper function which possibly converts this using DOS-style short mode.
54918  # If so, the updated path is stored in $new_path.
54919
54920  input_path="$new_path"
54921  # Check if we need to convert this using DOS-style short mode. If the path
54922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54923  # take no chances and rewrite it.
54924  # Note: m4 eats our [], so we need to use [ and ] instead.
54925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54926  if test "x$has_forbidden_chars" != x; then
54927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54931      # Going to short mode and back again did indeed matter. Since short mode is
54932      # case insensitive, let's make it lowercase to improve readability.
54933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54934      # Now convert it back to Unix-style (cygpath)
54935      input_path=`$CYGPATH -u "$shortmode_path"`
54936      new_path="$input_path"
54937    fi
54938  fi
54939
54940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54941  if test "x$test_cygdrive_prefix" = x; then
54942    # As a simple fix, exclude /usr/bin since it's not a real path.
54943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54945      # a path prefixed by /cygdrive for fixpath to work.
54946      new_path="$CYGWIN_ROOT_PATH$input_path"
54947    fi
54948  fi
54949
54950
54951  if test "x$path" != "x$new_path"; then
54952    MSVC_DLL="$new_path"
54953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54954$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54955  fi
54956
54957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54958
54959  path="$MSVC_DLL"
54960  has_colon=`$ECHO $path | $GREP ^.:`
54961  new_path="$path"
54962  if test "x$has_colon" = x; then
54963    # Not in mixed or Windows style, start by that.
54964    new_path=`cmd //c echo $path`
54965  fi
54966
54967
54968  input_path="$new_path"
54969  # Check if we need to convert this using DOS-style short mode. If the path
54970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54971  # take no chances and rewrite it.
54972  # Note: m4 eats our [], so we need to use [ and ] instead.
54973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54974  if test "x$has_forbidden_chars" != x; then
54975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54977  fi
54978
54979
54980  windows_path="$new_path"
54981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54982    unix_path=`$CYGPATH -u "$windows_path"`
54983    new_path="$unix_path"
54984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54986    new_path="$unix_path"
54987  fi
54988
54989  if test "x$path" != "x$new_path"; then
54990    MSVC_DLL="$new_path"
54991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54992$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54993  fi
54994
54995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54997
54998    else
54999      # We're on a unix platform. Hooray! :)
55000      path="$MSVC_DLL"
55001      has_space=`$ECHO "$path" | $GREP " "`
55002      if test "x$has_space" != x; then
55003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55004$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55006      fi
55007
55008      # Use eval to expand a potential ~
55009      eval path="$path"
55010      if test ! -f "$path" && test ! -d "$path"; then
55011        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55012      fi
55013
55014      if test -d "$path"; then
55015        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55016      else
55017        dir="`$DIRNAME "$path"`"
55018        base="`$BASENAME "$path"`"
55019        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55020      fi
55021    fi
55022  fi
55023
55024      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55025$as_echo_n "checking for $DLL_NAME... " >&6; }
55026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55027$as_echo "$MSVC_DLL" >&6; }
55028    else
55029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55030$as_echo "incorrect, ignoring" >&6; }
55031      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55032$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55033    fi
55034  fi
55035
55036    fi
55037  fi
55038
55039  if test "x$MSVC_DLL" = x; then
55040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55041$as_echo_n "checking for $DLL_NAME... " >&6; }
55042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55043$as_echo "no" >&6; }
55044    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55045  fi
55046
55047    MSVCR_DLL="$MSVC_DLL"
55048  fi
55049
55050
55051
55052# Check whether --with-msvcp-dll was given.
55053if test "${with_msvcp_dll+set}" = set; then :
55054  withval=$with_msvcp_dll;
55055fi
55056
55057
55058  if test "x$MSVCP_NAME" != "x"; then
55059    if test "x$with_msvcp_dll" != x; then
55060      # If given explicitely by user, do not probe. If not present, fail directly.
55061
55062  DLL_NAME="$MSVCP_NAME"
55063  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55064  METHOD="--with-msvcp-dll"
55065  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55066    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55067$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55068
55069    # Need to check if the found msvcr is correct architecture
55070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55071$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55072    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55074      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55075      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55076      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55077        CORRECT_MSVCR_ARCH="PE32 executable"
55078      else
55079        CORRECT_MSVCR_ARCH="PE32+ executable"
55080      fi
55081    else
55082      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55083        CORRECT_MSVCR_ARCH=386
55084      else
55085        CORRECT_MSVCR_ARCH=x86-64
55086      fi
55087    fi
55088    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55090$as_echo "ok" >&6; }
55091      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55092
55093  # Only process if variable expands to non-empty
55094
55095  if test "x$MSVC_DLL" != x; then
55096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55097
55098  # Input might be given as Windows format, start by converting to
55099  # unix format.
55100  path="$MSVC_DLL"
55101  new_path=`$CYGPATH -u "$path"`
55102
55103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55106  # "foo.exe" is OK but "foo" is an error.
55107  #
55108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55109  # It is also a way to make sure we got the proper file name for the real test later on.
55110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55111  if test "x$test_shortpath" = x; then
55112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55113$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55114    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55115  fi
55116
55117  # Call helper function which possibly converts this using DOS-style short mode.
55118  # If so, the updated path is stored in $new_path.
55119
55120  input_path="$new_path"
55121  # Check if we need to convert this using DOS-style short mode. If the path
55122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55123  # take no chances and rewrite it.
55124  # Note: m4 eats our [], so we need to use [ and ] instead.
55125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55126  if test "x$has_forbidden_chars" != x; then
55127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55131      # Going to short mode and back again did indeed matter. Since short mode is
55132      # case insensitive, let's make it lowercase to improve readability.
55133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55134      # Now convert it back to Unix-style (cygpath)
55135      input_path=`$CYGPATH -u "$shortmode_path"`
55136      new_path="$input_path"
55137    fi
55138  fi
55139
55140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55141  if test "x$test_cygdrive_prefix" = x; then
55142    # As a simple fix, exclude /usr/bin since it's not a real path.
55143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55145      # a path prefixed by /cygdrive for fixpath to work.
55146      new_path="$CYGWIN_ROOT_PATH$input_path"
55147    fi
55148  fi
55149
55150
55151  if test "x$path" != "x$new_path"; then
55152    MSVC_DLL="$new_path"
55153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55154$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55155  fi
55156
55157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55158
55159  path="$MSVC_DLL"
55160  has_colon=`$ECHO $path | $GREP ^.:`
55161  new_path="$path"
55162  if test "x$has_colon" = x; then
55163    # Not in mixed or Windows style, start by that.
55164    new_path=`cmd //c echo $path`
55165  fi
55166
55167
55168  input_path="$new_path"
55169  # Check if we need to convert this using DOS-style short mode. If the path
55170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55171  # take no chances and rewrite it.
55172  # Note: m4 eats our [], so we need to use [ and ] instead.
55173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55174  if test "x$has_forbidden_chars" != x; then
55175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55177  fi
55178
55179
55180  windows_path="$new_path"
55181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55182    unix_path=`$CYGPATH -u "$windows_path"`
55183    new_path="$unix_path"
55184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55186    new_path="$unix_path"
55187  fi
55188
55189  if test "x$path" != "x$new_path"; then
55190    MSVC_DLL="$new_path"
55191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55192$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55193  fi
55194
55195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55197
55198    else
55199      # We're on a unix platform. Hooray! :)
55200      path="$MSVC_DLL"
55201      has_space=`$ECHO "$path" | $GREP " "`
55202      if test "x$has_space" != x; then
55203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55204$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55206      fi
55207
55208      # Use eval to expand a potential ~
55209      eval path="$path"
55210      if test ! -f "$path" && test ! -d "$path"; then
55211        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55212      fi
55213
55214      if test -d "$path"; then
55215        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55216      else
55217        dir="`$DIRNAME "$path"`"
55218        base="`$BASENAME "$path"`"
55219        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55220      fi
55221    fi
55222  fi
55223
55224      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55225$as_echo_n "checking for $DLL_NAME... " >&6; }
55226      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55227$as_echo "$MSVC_DLL" >&6; }
55228    else
55229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55230$as_echo "incorrect, ignoring" >&6; }
55231      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55232$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55233    fi
55234  fi
55235
55236      if test "x$MSVC_DLL" = x; then
55237        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55238      fi
55239      MSVCP_DLL="$MSVC_DLL"
55240    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55241
55242  DLL_NAME="$MSVCP_NAME"
55243  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55244  METHOD="devkit"
55245  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55246    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55247$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55248
55249    # Need to check if the found msvcr is correct architecture
55250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55251$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55252    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55253    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55254      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55255      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55256      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55257        CORRECT_MSVCR_ARCH="PE32 executable"
55258      else
55259        CORRECT_MSVCR_ARCH="PE32+ executable"
55260      fi
55261    else
55262      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55263        CORRECT_MSVCR_ARCH=386
55264      else
55265        CORRECT_MSVCR_ARCH=x86-64
55266      fi
55267    fi
55268    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55270$as_echo "ok" >&6; }
55271      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55272
55273  # Only process if variable expands to non-empty
55274
55275  if test "x$MSVC_DLL" != x; then
55276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55277
55278  # Input might be given as Windows format, start by converting to
55279  # unix format.
55280  path="$MSVC_DLL"
55281  new_path=`$CYGPATH -u "$path"`
55282
55283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55286  # "foo.exe" is OK but "foo" is an error.
55287  #
55288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55289  # It is also a way to make sure we got the proper file name for the real test later on.
55290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55291  if test "x$test_shortpath" = x; then
55292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55293$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55294    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55295  fi
55296
55297  # Call helper function which possibly converts this using DOS-style short mode.
55298  # If so, the updated path is stored in $new_path.
55299
55300  input_path="$new_path"
55301  # Check if we need to convert this using DOS-style short mode. If the path
55302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55303  # take no chances and rewrite it.
55304  # Note: m4 eats our [], so we need to use [ and ] instead.
55305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55306  if test "x$has_forbidden_chars" != x; then
55307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55311      # Going to short mode and back again did indeed matter. Since short mode is
55312      # case insensitive, let's make it lowercase to improve readability.
55313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55314      # Now convert it back to Unix-style (cygpath)
55315      input_path=`$CYGPATH -u "$shortmode_path"`
55316      new_path="$input_path"
55317    fi
55318  fi
55319
55320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55321  if test "x$test_cygdrive_prefix" = x; then
55322    # As a simple fix, exclude /usr/bin since it's not a real path.
55323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55325      # a path prefixed by /cygdrive for fixpath to work.
55326      new_path="$CYGWIN_ROOT_PATH$input_path"
55327    fi
55328  fi
55329
55330
55331  if test "x$path" != "x$new_path"; then
55332    MSVC_DLL="$new_path"
55333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55334$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55335  fi
55336
55337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55338
55339  path="$MSVC_DLL"
55340  has_colon=`$ECHO $path | $GREP ^.:`
55341  new_path="$path"
55342  if test "x$has_colon" = x; then
55343    # Not in mixed or Windows style, start by that.
55344    new_path=`cmd //c echo $path`
55345  fi
55346
55347
55348  input_path="$new_path"
55349  # Check if we need to convert this using DOS-style short mode. If the path
55350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55351  # take no chances and rewrite it.
55352  # Note: m4 eats our [], so we need to use [ and ] instead.
55353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55354  if test "x$has_forbidden_chars" != x; then
55355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55357  fi
55358
55359
55360  windows_path="$new_path"
55361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55362    unix_path=`$CYGPATH -u "$windows_path"`
55363    new_path="$unix_path"
55364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55366    new_path="$unix_path"
55367  fi
55368
55369  if test "x$path" != "x$new_path"; then
55370    MSVC_DLL="$new_path"
55371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55372$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55373  fi
55374
55375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55377
55378    else
55379      # We're on a unix platform. Hooray! :)
55380      path="$MSVC_DLL"
55381      has_space=`$ECHO "$path" | $GREP " "`
55382      if test "x$has_space" != x; then
55383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55384$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55386      fi
55387
55388      # Use eval to expand a potential ~
55389      eval path="$path"
55390      if test ! -f "$path" && test ! -d "$path"; then
55391        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55392      fi
55393
55394      if test -d "$path"; then
55395        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55396      else
55397        dir="`$DIRNAME "$path"`"
55398        base="`$BASENAME "$path"`"
55399        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55400      fi
55401    fi
55402  fi
55403
55404      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55405$as_echo_n "checking for $DLL_NAME... " >&6; }
55406      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55407$as_echo "$MSVC_DLL" >&6; }
55408    else
55409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55410$as_echo "incorrect, ignoring" >&6; }
55411      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55412$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55413    fi
55414  fi
55415
55416      if test "x$MSVC_DLL" = x; then
55417        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55418      fi
55419      MSVCP_DLL="$MSVC_DLL"
55420    else
55421
55422  DLL_NAME="${MSVCP_NAME}"
55423  MSVC_DLL=
55424
55425  if test "x$MSVC_DLL" = x; then
55426    # Probe: Using well-known location from Visual Studio 10.0
55427    if test "x$VCINSTALLDIR" != x; then
55428      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55429
55430  windows_path="$CYGWIN_VC_INSTALL_DIR"
55431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55432    unix_path=`$CYGPATH -u "$windows_path"`
55433    CYGWIN_VC_INSTALL_DIR="$unix_path"
55434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55436    CYGWIN_VC_INSTALL_DIR="$unix_path"
55437  fi
55438
55439      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55440        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55441      else
55442        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55443      fi
55444      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55445
55446  DLL_NAME="$DLL_NAME"
55447  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55448  METHOD="well-known location in VCINSTALLDIR"
55449  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55450    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55451$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55452
55453    # Need to check if the found msvcr is correct architecture
55454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55455$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55456    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55458      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55459      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55460      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55461        CORRECT_MSVCR_ARCH="PE32 executable"
55462      else
55463        CORRECT_MSVCR_ARCH="PE32+ executable"
55464      fi
55465    else
55466      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55467        CORRECT_MSVCR_ARCH=386
55468      else
55469        CORRECT_MSVCR_ARCH=x86-64
55470      fi
55471    fi
55472    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55474$as_echo "ok" >&6; }
55475      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55476
55477  # Only process if variable expands to non-empty
55478
55479  if test "x$MSVC_DLL" != x; then
55480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55481
55482  # Input might be given as Windows format, start by converting to
55483  # unix format.
55484  path="$MSVC_DLL"
55485  new_path=`$CYGPATH -u "$path"`
55486
55487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55490  # "foo.exe" is OK but "foo" is an error.
55491  #
55492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55493  # It is also a way to make sure we got the proper file name for the real test later on.
55494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55495  if test "x$test_shortpath" = x; then
55496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55497$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55498    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55499  fi
55500
55501  # Call helper function which possibly converts this using DOS-style short mode.
55502  # If so, the updated path is stored in $new_path.
55503
55504  input_path="$new_path"
55505  # Check if we need to convert this using DOS-style short mode. If the path
55506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55507  # take no chances and rewrite it.
55508  # Note: m4 eats our [], so we need to use [ and ] instead.
55509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55510  if test "x$has_forbidden_chars" != x; then
55511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55515      # Going to short mode and back again did indeed matter. Since short mode is
55516      # case insensitive, let's make it lowercase to improve readability.
55517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55518      # Now convert it back to Unix-style (cygpath)
55519      input_path=`$CYGPATH -u "$shortmode_path"`
55520      new_path="$input_path"
55521    fi
55522  fi
55523
55524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55525  if test "x$test_cygdrive_prefix" = x; then
55526    # As a simple fix, exclude /usr/bin since it's not a real path.
55527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55529      # a path prefixed by /cygdrive for fixpath to work.
55530      new_path="$CYGWIN_ROOT_PATH$input_path"
55531    fi
55532  fi
55533
55534
55535  if test "x$path" != "x$new_path"; then
55536    MSVC_DLL="$new_path"
55537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55538$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55539  fi
55540
55541    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55542
55543  path="$MSVC_DLL"
55544  has_colon=`$ECHO $path | $GREP ^.:`
55545  new_path="$path"
55546  if test "x$has_colon" = x; then
55547    # Not in mixed or Windows style, start by that.
55548    new_path=`cmd //c echo $path`
55549  fi
55550
55551
55552  input_path="$new_path"
55553  # Check if we need to convert this using DOS-style short mode. If the path
55554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55555  # take no chances and rewrite it.
55556  # Note: m4 eats our [], so we need to use [ and ] instead.
55557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55558  if test "x$has_forbidden_chars" != x; then
55559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55561  fi
55562
55563
55564  windows_path="$new_path"
55565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55566    unix_path=`$CYGPATH -u "$windows_path"`
55567    new_path="$unix_path"
55568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55570    new_path="$unix_path"
55571  fi
55572
55573  if test "x$path" != "x$new_path"; then
55574    MSVC_DLL="$new_path"
55575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55576$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55577  fi
55578
55579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55581
55582    else
55583      # We're on a unix platform. Hooray! :)
55584      path="$MSVC_DLL"
55585      has_space=`$ECHO "$path" | $GREP " "`
55586      if test "x$has_space" != x; then
55587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55588$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55589        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55590      fi
55591
55592      # Use eval to expand a potential ~
55593      eval path="$path"
55594      if test ! -f "$path" && test ! -d "$path"; then
55595        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55596      fi
55597
55598      if test -d "$path"; then
55599        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55600      else
55601        dir="`$DIRNAME "$path"`"
55602        base="`$BASENAME "$path"`"
55603        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55604      fi
55605    fi
55606  fi
55607
55608      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55609$as_echo_n "checking for $DLL_NAME... " >&6; }
55610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55611$as_echo "$MSVC_DLL" >&6; }
55612    else
55613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55614$as_echo "incorrect, ignoring" >&6; }
55615      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55616$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55617    fi
55618  fi
55619
55620    fi
55621  fi
55622
55623  if test "x$MSVC_DLL" = x; then
55624    # Probe: Check in the Boot JDK directory.
55625    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55626
55627  DLL_NAME="$DLL_NAME"
55628  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55629  METHOD="well-known location in Boot JDK"
55630  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55631    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55632$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55633
55634    # Need to check if the found msvcr is correct architecture
55635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55636$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55637    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55639      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55640      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55641      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55642        CORRECT_MSVCR_ARCH="PE32 executable"
55643      else
55644        CORRECT_MSVCR_ARCH="PE32+ executable"
55645      fi
55646    else
55647      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55648        CORRECT_MSVCR_ARCH=386
55649      else
55650        CORRECT_MSVCR_ARCH=x86-64
55651      fi
55652    fi
55653    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55655$as_echo "ok" >&6; }
55656      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55657
55658  # Only process if variable expands to non-empty
55659
55660  if test "x$MSVC_DLL" != x; then
55661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55662
55663  # Input might be given as Windows format, start by converting to
55664  # unix format.
55665  path="$MSVC_DLL"
55666  new_path=`$CYGPATH -u "$path"`
55667
55668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55671  # "foo.exe" is OK but "foo" is an error.
55672  #
55673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55674  # It is also a way to make sure we got the proper file name for the real test later on.
55675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55676  if test "x$test_shortpath" = x; then
55677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55678$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55679    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55680  fi
55681
55682  # Call helper function which possibly converts this using DOS-style short mode.
55683  # If so, the updated path is stored in $new_path.
55684
55685  input_path="$new_path"
55686  # Check if we need to convert this using DOS-style short mode. If the path
55687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55688  # take no chances and rewrite it.
55689  # Note: m4 eats our [], so we need to use [ and ] instead.
55690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55691  if test "x$has_forbidden_chars" != x; then
55692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55696      # Going to short mode and back again did indeed matter. Since short mode is
55697      # case insensitive, let's make it lowercase to improve readability.
55698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55699      # Now convert it back to Unix-style (cygpath)
55700      input_path=`$CYGPATH -u "$shortmode_path"`
55701      new_path="$input_path"
55702    fi
55703  fi
55704
55705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55706  if test "x$test_cygdrive_prefix" = x; then
55707    # As a simple fix, exclude /usr/bin since it's not a real path.
55708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55710      # a path prefixed by /cygdrive for fixpath to work.
55711      new_path="$CYGWIN_ROOT_PATH$input_path"
55712    fi
55713  fi
55714
55715
55716  if test "x$path" != "x$new_path"; then
55717    MSVC_DLL="$new_path"
55718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55719$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55720  fi
55721
55722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55723
55724  path="$MSVC_DLL"
55725  has_colon=`$ECHO $path | $GREP ^.:`
55726  new_path="$path"
55727  if test "x$has_colon" = x; then
55728    # Not in mixed or Windows style, start by that.
55729    new_path=`cmd //c echo $path`
55730  fi
55731
55732
55733  input_path="$new_path"
55734  # Check if we need to convert this using DOS-style short mode. If the path
55735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55736  # take no chances and rewrite it.
55737  # Note: m4 eats our [], so we need to use [ and ] instead.
55738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55739  if test "x$has_forbidden_chars" != x; then
55740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55742  fi
55743
55744
55745  windows_path="$new_path"
55746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55747    unix_path=`$CYGPATH -u "$windows_path"`
55748    new_path="$unix_path"
55749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55751    new_path="$unix_path"
55752  fi
55753
55754  if test "x$path" != "x$new_path"; then
55755    MSVC_DLL="$new_path"
55756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55757$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55758  fi
55759
55760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55762
55763    else
55764      # We're on a unix platform. Hooray! :)
55765      path="$MSVC_DLL"
55766      has_space=`$ECHO "$path" | $GREP " "`
55767      if test "x$has_space" != x; then
55768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55769$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55771      fi
55772
55773      # Use eval to expand a potential ~
55774      eval path="$path"
55775      if test ! -f "$path" && test ! -d "$path"; then
55776        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55777      fi
55778
55779      if test -d "$path"; then
55780        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55781      else
55782        dir="`$DIRNAME "$path"`"
55783        base="`$BASENAME "$path"`"
55784        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55785      fi
55786    fi
55787  fi
55788
55789      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55790$as_echo_n "checking for $DLL_NAME... " >&6; }
55791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55792$as_echo "$MSVC_DLL" >&6; }
55793    else
55794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55795$as_echo "incorrect, ignoring" >&6; }
55796      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55797$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55798    fi
55799  fi
55800
55801  fi
55802
55803  if test "x$MSVC_DLL" = x; then
55804    # Probe: Look in the Windows system32 directory
55805    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55806
55807  windows_path="$CYGWIN_SYSTEMROOT"
55808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55809    unix_path=`$CYGPATH -u "$windows_path"`
55810    CYGWIN_SYSTEMROOT="$unix_path"
55811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55813    CYGWIN_SYSTEMROOT="$unix_path"
55814  fi
55815
55816    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55817
55818  DLL_NAME="$DLL_NAME"
55819  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55820  METHOD="well-known location in SYSTEMROOT"
55821  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55822    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55823$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55824
55825    # Need to check if the found msvcr is correct architecture
55826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55827$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55828    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55830      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55831      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55832      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55833        CORRECT_MSVCR_ARCH="PE32 executable"
55834      else
55835        CORRECT_MSVCR_ARCH="PE32+ executable"
55836      fi
55837    else
55838      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55839        CORRECT_MSVCR_ARCH=386
55840      else
55841        CORRECT_MSVCR_ARCH=x86-64
55842      fi
55843    fi
55844    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55846$as_echo "ok" >&6; }
55847      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55848
55849  # Only process if variable expands to non-empty
55850
55851  if test "x$MSVC_DLL" != x; then
55852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55853
55854  # Input might be given as Windows format, start by converting to
55855  # unix format.
55856  path="$MSVC_DLL"
55857  new_path=`$CYGPATH -u "$path"`
55858
55859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55862  # "foo.exe" is OK but "foo" is an error.
55863  #
55864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55865  # It is also a way to make sure we got the proper file name for the real test later on.
55866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55867  if test "x$test_shortpath" = x; then
55868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55869$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55870    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55871  fi
55872
55873  # Call helper function which possibly converts this using DOS-style short mode.
55874  # If so, the updated path is stored in $new_path.
55875
55876  input_path="$new_path"
55877  # Check if we need to convert this using DOS-style short mode. If the path
55878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55879  # take no chances and rewrite it.
55880  # Note: m4 eats our [], so we need to use [ and ] instead.
55881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55882  if test "x$has_forbidden_chars" != x; then
55883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55887      # Going to short mode and back again did indeed matter. Since short mode is
55888      # case insensitive, let's make it lowercase to improve readability.
55889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55890      # Now convert it back to Unix-style (cygpath)
55891      input_path=`$CYGPATH -u "$shortmode_path"`
55892      new_path="$input_path"
55893    fi
55894  fi
55895
55896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55897  if test "x$test_cygdrive_prefix" = x; then
55898    # As a simple fix, exclude /usr/bin since it's not a real path.
55899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55901      # a path prefixed by /cygdrive for fixpath to work.
55902      new_path="$CYGWIN_ROOT_PATH$input_path"
55903    fi
55904  fi
55905
55906
55907  if test "x$path" != "x$new_path"; then
55908    MSVC_DLL="$new_path"
55909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55910$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55911  fi
55912
55913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55914
55915  path="$MSVC_DLL"
55916  has_colon=`$ECHO $path | $GREP ^.:`
55917  new_path="$path"
55918  if test "x$has_colon" = x; then
55919    # Not in mixed or Windows style, start by that.
55920    new_path=`cmd //c echo $path`
55921  fi
55922
55923
55924  input_path="$new_path"
55925  # Check if we need to convert this using DOS-style short mode. If the path
55926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55927  # take no chances and rewrite it.
55928  # Note: m4 eats our [], so we need to use [ and ] instead.
55929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55930  if test "x$has_forbidden_chars" != x; then
55931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55933  fi
55934
55935
55936  windows_path="$new_path"
55937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55938    unix_path=`$CYGPATH -u "$windows_path"`
55939    new_path="$unix_path"
55940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55942    new_path="$unix_path"
55943  fi
55944
55945  if test "x$path" != "x$new_path"; then
55946    MSVC_DLL="$new_path"
55947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55948$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55949  fi
55950
55951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55953
55954    else
55955      # We're on a unix platform. Hooray! :)
55956      path="$MSVC_DLL"
55957      has_space=`$ECHO "$path" | $GREP " "`
55958      if test "x$has_space" != x; then
55959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55960$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55962      fi
55963
55964      # Use eval to expand a potential ~
55965      eval path="$path"
55966      if test ! -f "$path" && test ! -d "$path"; then
55967        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55968      fi
55969
55970      if test -d "$path"; then
55971        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55972      else
55973        dir="`$DIRNAME "$path"`"
55974        base="`$BASENAME "$path"`"
55975        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55976      fi
55977    fi
55978  fi
55979
55980      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55981$as_echo_n "checking for $DLL_NAME... " >&6; }
55982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55983$as_echo "$MSVC_DLL" >&6; }
55984    else
55985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55986$as_echo "incorrect, ignoring" >&6; }
55987      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55988$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55989    fi
55990  fi
55991
55992  fi
55993
55994  if test "x$MSVC_DLL" = x; then
55995    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55996    if test "x$VS100COMNTOOLS" != x; then
55997      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55998
55999  windows_path="$CYGWIN_VS_TOOLS_DIR"
56000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56001    unix_path=`$CYGPATH -u "$windows_path"`
56002    CYGWIN_VS_TOOLS_DIR="$unix_path"
56003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56005    CYGWIN_VS_TOOLS_DIR="$unix_path"
56006  fi
56007
56008      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56009        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56010	    | $GREP -i /x64/ | $HEAD --lines 1`
56011      else
56012        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56013	    | $GREP -i /x86/ | $HEAD --lines 1`
56014      fi
56015
56016  DLL_NAME="$DLL_NAME"
56017  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56018  METHOD="search of VS100COMNTOOLS"
56019  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56020    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56021$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56022
56023    # Need to check if the found msvcr is correct architecture
56024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56025$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56026    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56028      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56029      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56030      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56031        CORRECT_MSVCR_ARCH="PE32 executable"
56032      else
56033        CORRECT_MSVCR_ARCH="PE32+ executable"
56034      fi
56035    else
56036      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56037        CORRECT_MSVCR_ARCH=386
56038      else
56039        CORRECT_MSVCR_ARCH=x86-64
56040      fi
56041    fi
56042    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56044$as_echo "ok" >&6; }
56045      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56046
56047  # Only process if variable expands to non-empty
56048
56049  if test "x$MSVC_DLL" != x; then
56050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56051
56052  # Input might be given as Windows format, start by converting to
56053  # unix format.
56054  path="$MSVC_DLL"
56055  new_path=`$CYGPATH -u "$path"`
56056
56057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56060  # "foo.exe" is OK but "foo" is an error.
56061  #
56062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56063  # It is also a way to make sure we got the proper file name for the real test later on.
56064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56065  if test "x$test_shortpath" = x; then
56066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56067$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56068    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56069  fi
56070
56071  # Call helper function which possibly converts this using DOS-style short mode.
56072  # If so, the updated path is stored in $new_path.
56073
56074  input_path="$new_path"
56075  # Check if we need to convert this using DOS-style short mode. If the path
56076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56077  # take no chances and rewrite it.
56078  # Note: m4 eats our [], so we need to use [ and ] instead.
56079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56080  if test "x$has_forbidden_chars" != x; then
56081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56085      # Going to short mode and back again did indeed matter. Since short mode is
56086      # case insensitive, let's make it lowercase to improve readability.
56087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56088      # Now convert it back to Unix-style (cygpath)
56089      input_path=`$CYGPATH -u "$shortmode_path"`
56090      new_path="$input_path"
56091    fi
56092  fi
56093
56094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56095  if test "x$test_cygdrive_prefix" = x; then
56096    # As a simple fix, exclude /usr/bin since it's not a real path.
56097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56099      # a path prefixed by /cygdrive for fixpath to work.
56100      new_path="$CYGWIN_ROOT_PATH$input_path"
56101    fi
56102  fi
56103
56104
56105  if test "x$path" != "x$new_path"; then
56106    MSVC_DLL="$new_path"
56107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56108$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56109  fi
56110
56111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56112
56113  path="$MSVC_DLL"
56114  has_colon=`$ECHO $path | $GREP ^.:`
56115  new_path="$path"
56116  if test "x$has_colon" = x; then
56117    # Not in mixed or Windows style, start by that.
56118    new_path=`cmd //c echo $path`
56119  fi
56120
56121
56122  input_path="$new_path"
56123  # Check if we need to convert this using DOS-style short mode. If the path
56124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56125  # take no chances and rewrite it.
56126  # Note: m4 eats our [], so we need to use [ and ] instead.
56127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56128  if test "x$has_forbidden_chars" != x; then
56129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56131  fi
56132
56133
56134  windows_path="$new_path"
56135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56136    unix_path=`$CYGPATH -u "$windows_path"`
56137    new_path="$unix_path"
56138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56140    new_path="$unix_path"
56141  fi
56142
56143  if test "x$path" != "x$new_path"; then
56144    MSVC_DLL="$new_path"
56145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56146$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56147  fi
56148
56149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56151
56152    else
56153      # We're on a unix platform. Hooray! :)
56154      path="$MSVC_DLL"
56155      has_space=`$ECHO "$path" | $GREP " "`
56156      if test "x$has_space" != x; then
56157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56158$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56159        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56160      fi
56161
56162      # Use eval to expand a potential ~
56163      eval path="$path"
56164      if test ! -f "$path" && test ! -d "$path"; then
56165        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56166      fi
56167
56168      if test -d "$path"; then
56169        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56170      else
56171        dir="`$DIRNAME "$path"`"
56172        base="`$BASENAME "$path"`"
56173        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56174      fi
56175    fi
56176  fi
56177
56178      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56179$as_echo_n "checking for $DLL_NAME... " >&6; }
56180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56181$as_echo "$MSVC_DLL" >&6; }
56182    else
56183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56184$as_echo "incorrect, ignoring" >&6; }
56185      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56186$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56187    fi
56188  fi
56189
56190    fi
56191  fi
56192
56193  if test "x$MSVC_DLL" = x; then
56194    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56195    # (This was the original behaviour; kept since it might turn something up)
56196    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56197      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56198        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56199	    | $GREP x64 | $HEAD --lines 1`
56200      else
56201        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56202	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56203        if test "x$POSSIBLE_MSVC_DLL" = x; then
56204          # We're grasping at straws now...
56205          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56206	      | $HEAD --lines 1`
56207        fi
56208      fi
56209
56210
56211  DLL_NAME="$DLL_NAME"
56212  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56213  METHOD="search of VCINSTALLDIR"
56214  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56215    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56216$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56217
56218    # Need to check if the found msvcr is correct architecture
56219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56220$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56221    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56223      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56224      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56225      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56226        CORRECT_MSVCR_ARCH="PE32 executable"
56227      else
56228        CORRECT_MSVCR_ARCH="PE32+ executable"
56229      fi
56230    else
56231      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56232        CORRECT_MSVCR_ARCH=386
56233      else
56234        CORRECT_MSVCR_ARCH=x86-64
56235      fi
56236    fi
56237    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56238      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56239$as_echo "ok" >&6; }
56240      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56241
56242  # Only process if variable expands to non-empty
56243
56244  if test "x$MSVC_DLL" != x; then
56245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56246
56247  # Input might be given as Windows format, start by converting to
56248  # unix format.
56249  path="$MSVC_DLL"
56250  new_path=`$CYGPATH -u "$path"`
56251
56252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56255  # "foo.exe" is OK but "foo" is an error.
56256  #
56257  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56258  # It is also a way to make sure we got the proper file name for the real test later on.
56259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56260  if test "x$test_shortpath" = x; then
56261    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56262$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56263    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56264  fi
56265
56266  # Call helper function which possibly converts this using DOS-style short mode.
56267  # If so, the updated path is stored in $new_path.
56268
56269  input_path="$new_path"
56270  # Check if we need to convert this using DOS-style short mode. If the path
56271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56272  # take no chances and rewrite it.
56273  # Note: m4 eats our [], so we need to use [ and ] instead.
56274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56275  if test "x$has_forbidden_chars" != x; then
56276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56280      # Going to short mode and back again did indeed matter. Since short mode is
56281      # case insensitive, let's make it lowercase to improve readability.
56282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56283      # Now convert it back to Unix-style (cygpath)
56284      input_path=`$CYGPATH -u "$shortmode_path"`
56285      new_path="$input_path"
56286    fi
56287  fi
56288
56289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56290  if test "x$test_cygdrive_prefix" = x; then
56291    # As a simple fix, exclude /usr/bin since it's not a real path.
56292    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56294      # a path prefixed by /cygdrive for fixpath to work.
56295      new_path="$CYGWIN_ROOT_PATH$input_path"
56296    fi
56297  fi
56298
56299
56300  if test "x$path" != "x$new_path"; then
56301    MSVC_DLL="$new_path"
56302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56303$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56304  fi
56305
56306    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56307
56308  path="$MSVC_DLL"
56309  has_colon=`$ECHO $path | $GREP ^.:`
56310  new_path="$path"
56311  if test "x$has_colon" = x; then
56312    # Not in mixed or Windows style, start by that.
56313    new_path=`cmd //c echo $path`
56314  fi
56315
56316
56317  input_path="$new_path"
56318  # Check if we need to convert this using DOS-style short mode. If the path
56319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56320  # take no chances and rewrite it.
56321  # Note: m4 eats our [], so we need to use [ and ] instead.
56322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56323  if test "x$has_forbidden_chars" != x; then
56324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56325    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56326  fi
56327
56328
56329  windows_path="$new_path"
56330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56331    unix_path=`$CYGPATH -u "$windows_path"`
56332    new_path="$unix_path"
56333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56335    new_path="$unix_path"
56336  fi
56337
56338  if test "x$path" != "x$new_path"; then
56339    MSVC_DLL="$new_path"
56340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56341$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56342  fi
56343
56344  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56345  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56346
56347    else
56348      # We're on a unix platform. Hooray! :)
56349      path="$MSVC_DLL"
56350      has_space=`$ECHO "$path" | $GREP " "`
56351      if test "x$has_space" != x; then
56352        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56353$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56354        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56355      fi
56356
56357      # Use eval to expand a potential ~
56358      eval path="$path"
56359      if test ! -f "$path" && test ! -d "$path"; then
56360        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56361      fi
56362
56363      if test -d "$path"; then
56364        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56365      else
56366        dir="`$DIRNAME "$path"`"
56367        base="`$BASENAME "$path"`"
56368        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56369      fi
56370    fi
56371  fi
56372
56373      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56374$as_echo_n "checking for $DLL_NAME... " >&6; }
56375      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56376$as_echo "$MSVC_DLL" >&6; }
56377    else
56378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56379$as_echo "incorrect, ignoring" >&6; }
56380      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56381$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56382    fi
56383  fi
56384
56385    fi
56386  fi
56387
56388  if test "x$MSVC_DLL" = x; then
56389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56390$as_echo_n "checking for $DLL_NAME... " >&6; }
56391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56392$as_echo "no" >&6; }
56393    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56394  fi
56395
56396      MSVCP_DLL="$MSVC_DLL"
56397    fi
56398
56399  fi
56400
56401  fi
56402
56403
56404  if test "x$NEEDS_LIB_X11" = xfalse; then
56405    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56406      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56407$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56408    fi
56409    X_CFLAGS=
56410    X_LIBS=
56411  else
56412
56413    if test "x${with_x}" = xno; then
56414      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56415    fi
56416
56417    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56418      # The user has specified a X11 base directory. Use it for includes and
56419      # libraries, unless explicitely overridden.
56420      if test "x$x_includes" = xNONE; then
56421        x_includes="${with_x}/include"
56422      fi
56423      if test "x$x_libraries" = xNONE; then
56424        x_libraries="${with_x}/lib"
56425      fi
56426    else
56427      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56428      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56429      # --x-libraries for the sysroot, if that seems to be correct.
56430      if test "x$SYSROOT" != "x"; then
56431        if test "x$x_includes" = xNONE; then
56432          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56433            x_includes="$SYSROOT/usr/X11R6/include"
56434          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56435            x_includes="$SYSROOT/usr/include"
56436          fi
56437        fi
56438        if test "x$x_libraries" = xNONE; then
56439          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56440            x_libraries="$SYSROOT/usr/X11R6/lib"
56441          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56442            x_libraries="$SYSROOT/usr/lib64"
56443          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56444            x_libraries="$SYSROOT/usr/lib"
56445          fi
56446        fi
56447      fi
56448    fi
56449
56450    # Now let autoconf do it's magic
56451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56452$as_echo_n "checking for X... " >&6; }
56453
56454
56455# Check whether --with-x was given.
56456if test "${with_x+set}" = set; then :
56457  withval=$with_x;
56458fi
56459
56460# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56461if test "x$with_x" = xno; then
56462  # The user explicitly disabled X.
56463  have_x=disabled
56464else
56465  case $x_includes,$x_libraries in #(
56466    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56467    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56468  $as_echo_n "(cached) " >&6
56469else
56470  # One or both of the vars are not set, and there is no cached value.
56471ac_x_includes=no ac_x_libraries=no
56472rm -f -r conftest.dir
56473if mkdir conftest.dir; then
56474  cd conftest.dir
56475  cat >Imakefile <<'_ACEOF'
56476incroot:
56477	@echo incroot='${INCROOT}'
56478usrlibdir:
56479	@echo usrlibdir='${USRLIBDIR}'
56480libdir:
56481	@echo libdir='${LIBDIR}'
56482_ACEOF
56483  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56484    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56485    for ac_var in incroot usrlibdir libdir; do
56486      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56487    done
56488    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56489    for ac_extension in a so sl dylib la dll; do
56490      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56491	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56492	ac_im_usrlibdir=$ac_im_libdir; break
56493      fi
56494    done
56495    # Screen out bogus values from the imake configuration.  They are
56496    # bogus both because they are the default anyway, and because
56497    # using them would break gcc on systems where it needs fixed includes.
56498    case $ac_im_incroot in
56499	/usr/include) ac_x_includes= ;;
56500	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56501    esac
56502    case $ac_im_usrlibdir in
56503	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56504	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56505    esac
56506  fi
56507  cd ..
56508  rm -f -r conftest.dir
56509fi
56510
56511# Standard set of common directories for X headers.
56512# Check X11 before X11Rn because it is often a symlink to the current release.
56513ac_x_header_dirs='
56514/usr/X11/include
56515/usr/X11R7/include
56516/usr/X11R6/include
56517/usr/X11R5/include
56518/usr/X11R4/include
56519
56520/usr/include/X11
56521/usr/include/X11R7
56522/usr/include/X11R6
56523/usr/include/X11R5
56524/usr/include/X11R4
56525
56526/usr/local/X11/include
56527/usr/local/X11R7/include
56528/usr/local/X11R6/include
56529/usr/local/X11R5/include
56530/usr/local/X11R4/include
56531
56532/usr/local/include/X11
56533/usr/local/include/X11R7
56534/usr/local/include/X11R6
56535/usr/local/include/X11R5
56536/usr/local/include/X11R4
56537
56538/usr/X386/include
56539/usr/x386/include
56540/usr/XFree86/include/X11
56541
56542/usr/include
56543/usr/local/include
56544/usr/unsupported/include
56545/usr/athena/include
56546/usr/local/x11r5/include
56547/usr/lpp/Xamples/include
56548
56549/usr/openwin/include
56550/usr/openwin/share/include'
56551
56552if test "$ac_x_includes" = no; then
56553  # Guess where to find include files, by looking for Xlib.h.
56554  # First, try using that file with no special directory specified.
56555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56556/* end confdefs.h.  */
56557#include <X11/Xlib.h>
56558_ACEOF
56559if ac_fn_cxx_try_cpp "$LINENO"; then :
56560  # We can compile using X headers with no special include directory.
56561ac_x_includes=
56562else
56563  for ac_dir in $ac_x_header_dirs; do
56564  if test -r "$ac_dir/X11/Xlib.h"; then
56565    ac_x_includes=$ac_dir
56566    break
56567  fi
56568done
56569fi
56570rm -f conftest.err conftest.i conftest.$ac_ext
56571fi # $ac_x_includes = no
56572
56573if test "$ac_x_libraries" = no; then
56574  # Check for the libraries.
56575  # See if we find them without any special options.
56576  # Don't add to $LIBS permanently.
56577  ac_save_LIBS=$LIBS
56578  LIBS="-lX11 $LIBS"
56579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56580/* end confdefs.h.  */
56581#include <X11/Xlib.h>
56582int
56583main ()
56584{
56585XrmInitialize ()
56586  ;
56587  return 0;
56588}
56589_ACEOF
56590if ac_fn_cxx_try_link "$LINENO"; then :
56591  LIBS=$ac_save_LIBS
56592# We can link X programs with no special library path.
56593ac_x_libraries=
56594else
56595  LIBS=$ac_save_LIBS
56596for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56597do
56598  # Don't even attempt the hair of trying to link an X program!
56599  for ac_extension in a so sl dylib la dll; do
56600    if test -r "$ac_dir/libX11.$ac_extension"; then
56601      ac_x_libraries=$ac_dir
56602      break 2
56603    fi
56604  done
56605done
56606fi
56607rm -f core conftest.err conftest.$ac_objext \
56608    conftest$ac_exeext conftest.$ac_ext
56609fi # $ac_x_libraries = no
56610
56611case $ac_x_includes,$ac_x_libraries in #(
56612  no,* | *,no | *\'*)
56613    # Didn't find X, or a directory has "'" in its name.
56614    ac_cv_have_x="have_x=no";; #(
56615  *)
56616    # Record where we found X for the cache.
56617    ac_cv_have_x="have_x=yes\
56618	ac_x_includes='$ac_x_includes'\
56619	ac_x_libraries='$ac_x_libraries'"
56620esac
56621fi
56622;; #(
56623    *) have_x=yes;;
56624  esac
56625  eval "$ac_cv_have_x"
56626fi # $with_x != no
56627
56628if test "$have_x" != yes; then
56629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56630$as_echo "$have_x" >&6; }
56631  no_x=yes
56632else
56633  # If each of the values was on the command line, it overrides each guess.
56634  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56635  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56636  # Update the cache value to reflect the command line values.
56637  ac_cv_have_x="have_x=yes\
56638	ac_x_includes='$x_includes'\
56639	ac_x_libraries='$x_libraries'"
56640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56641$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56642fi
56643
56644    if test "$no_x" = yes; then
56645  # Not all programs may use this symbol, but it does not hurt to define it.
56646
56647$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56648
56649  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56650else
56651  if test -n "$x_includes"; then
56652    X_CFLAGS="$X_CFLAGS -I$x_includes"
56653  fi
56654
56655  # It would also be nice to do this for all -L options, not just this one.
56656  if test -n "$x_libraries"; then
56657    X_LIBS="$X_LIBS -L$x_libraries"
56658    # For Solaris; some versions of Sun CC require a space after -R and
56659    # others require no space.  Words are not sufficient . . . .
56660    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56661$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56662    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56663    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56664    ac_cxx_werror_flag=yes
56665    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56666/* end confdefs.h.  */
56667
56668int
56669main ()
56670{
56671
56672  ;
56673  return 0;
56674}
56675_ACEOF
56676if ac_fn_cxx_try_link "$LINENO"; then :
56677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56678$as_echo "no" >&6; }
56679       X_LIBS="$X_LIBS -R$x_libraries"
56680else
56681  LIBS="$ac_xsave_LIBS -R $x_libraries"
56682       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56683/* end confdefs.h.  */
56684
56685int
56686main ()
56687{
56688
56689  ;
56690  return 0;
56691}
56692_ACEOF
56693if ac_fn_cxx_try_link "$LINENO"; then :
56694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56695$as_echo "yes" >&6; }
56696	  X_LIBS="$X_LIBS -R $x_libraries"
56697else
56698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56699$as_echo "neither works" >&6; }
56700fi
56701rm -f core conftest.err conftest.$ac_objext \
56702    conftest$ac_exeext conftest.$ac_ext
56703fi
56704rm -f core conftest.err conftest.$ac_objext \
56705    conftest$ac_exeext conftest.$ac_ext
56706    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56707    LIBS=$ac_xsave_LIBS
56708  fi
56709
56710  # Check for system-dependent libraries X programs must link with.
56711  # Do this before checking for the system-independent R6 libraries
56712  # (-lICE), since we may need -lsocket or whatever for X linking.
56713
56714  if test "$ISC" = yes; then
56715    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56716  else
56717    # Martyn Johnson says this is needed for Ultrix, if the X
56718    # libraries were built with DECnet support.  And Karl Berry says
56719    # the Alpha needs dnet_stub (dnet does not exist).
56720    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56721    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56722/* end confdefs.h.  */
56723
56724/* Override any GCC internal prototype to avoid an error.
56725   Use char because int might match the return type of a GCC
56726   builtin and then its argument prototype would still apply.  */
56727#ifdef __cplusplus
56728extern "C"
56729#endif
56730char XOpenDisplay ();
56731int
56732main ()
56733{
56734return XOpenDisplay ();
56735  ;
56736  return 0;
56737}
56738_ACEOF
56739if ac_fn_cxx_try_link "$LINENO"; then :
56740
56741else
56742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56743$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56744if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56745  $as_echo_n "(cached) " >&6
56746else
56747  ac_check_lib_save_LIBS=$LIBS
56748LIBS="-ldnet  $LIBS"
56749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56750/* end confdefs.h.  */
56751
56752/* Override any GCC internal prototype to avoid an error.
56753   Use char because int might match the return type of a GCC
56754   builtin and then its argument prototype would still apply.  */
56755#ifdef __cplusplus
56756extern "C"
56757#endif
56758char dnet_ntoa ();
56759int
56760main ()
56761{
56762return dnet_ntoa ();
56763  ;
56764  return 0;
56765}
56766_ACEOF
56767if ac_fn_cxx_try_link "$LINENO"; then :
56768  ac_cv_lib_dnet_dnet_ntoa=yes
56769else
56770  ac_cv_lib_dnet_dnet_ntoa=no
56771fi
56772rm -f core conftest.err conftest.$ac_objext \
56773    conftest$ac_exeext conftest.$ac_ext
56774LIBS=$ac_check_lib_save_LIBS
56775fi
56776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56777$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56778if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56779  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56780fi
56781
56782    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56783      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56784$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56785if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56786  $as_echo_n "(cached) " >&6
56787else
56788  ac_check_lib_save_LIBS=$LIBS
56789LIBS="-ldnet_stub  $LIBS"
56790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56791/* end confdefs.h.  */
56792
56793/* Override any GCC internal prototype to avoid an error.
56794   Use char because int might match the return type of a GCC
56795   builtin and then its argument prototype would still apply.  */
56796#ifdef __cplusplus
56797extern "C"
56798#endif
56799char dnet_ntoa ();
56800int
56801main ()
56802{
56803return dnet_ntoa ();
56804  ;
56805  return 0;
56806}
56807_ACEOF
56808if ac_fn_cxx_try_link "$LINENO"; then :
56809  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56810else
56811  ac_cv_lib_dnet_stub_dnet_ntoa=no
56812fi
56813rm -f core conftest.err conftest.$ac_objext \
56814    conftest$ac_exeext conftest.$ac_ext
56815LIBS=$ac_check_lib_save_LIBS
56816fi
56817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56818$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56819if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56820  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56821fi
56822
56823    fi
56824fi
56825rm -f core conftest.err conftest.$ac_objext \
56826    conftest$ac_exeext conftest.$ac_ext
56827    LIBS="$ac_xsave_LIBS"
56828
56829    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56830    # to get the SysV transport functions.
56831    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56832    # needs -lnsl.
56833    # The nsl library prevents programs from opening the X display
56834    # on Irix 5.2, according to T.E. Dickey.
56835    # The functions gethostbyname, getservbyname, and inet_addr are
56836    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56837    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56838if test "x$ac_cv_func_gethostbyname" = xyes; then :
56839
56840fi
56841
56842    if test $ac_cv_func_gethostbyname = no; then
56843      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56844$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56845if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56846  $as_echo_n "(cached) " >&6
56847else
56848  ac_check_lib_save_LIBS=$LIBS
56849LIBS="-lnsl  $LIBS"
56850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56851/* end confdefs.h.  */
56852
56853/* Override any GCC internal prototype to avoid an error.
56854   Use char because int might match the return type of a GCC
56855   builtin and then its argument prototype would still apply.  */
56856#ifdef __cplusplus
56857extern "C"
56858#endif
56859char gethostbyname ();
56860int
56861main ()
56862{
56863return gethostbyname ();
56864  ;
56865  return 0;
56866}
56867_ACEOF
56868if ac_fn_cxx_try_link "$LINENO"; then :
56869  ac_cv_lib_nsl_gethostbyname=yes
56870else
56871  ac_cv_lib_nsl_gethostbyname=no
56872fi
56873rm -f core conftest.err conftest.$ac_objext \
56874    conftest$ac_exeext conftest.$ac_ext
56875LIBS=$ac_check_lib_save_LIBS
56876fi
56877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56878$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56879if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56880  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56881fi
56882
56883      if test $ac_cv_lib_nsl_gethostbyname = no; then
56884	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56885$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56886if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56887  $as_echo_n "(cached) " >&6
56888else
56889  ac_check_lib_save_LIBS=$LIBS
56890LIBS="-lbsd  $LIBS"
56891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56892/* end confdefs.h.  */
56893
56894/* Override any GCC internal prototype to avoid an error.
56895   Use char because int might match the return type of a GCC
56896   builtin and then its argument prototype would still apply.  */
56897#ifdef __cplusplus
56898extern "C"
56899#endif
56900char gethostbyname ();
56901int
56902main ()
56903{
56904return gethostbyname ();
56905  ;
56906  return 0;
56907}
56908_ACEOF
56909if ac_fn_cxx_try_link "$LINENO"; then :
56910  ac_cv_lib_bsd_gethostbyname=yes
56911else
56912  ac_cv_lib_bsd_gethostbyname=no
56913fi
56914rm -f core conftest.err conftest.$ac_objext \
56915    conftest$ac_exeext conftest.$ac_ext
56916LIBS=$ac_check_lib_save_LIBS
56917fi
56918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56919$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56920if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56921  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56922fi
56923
56924      fi
56925    fi
56926
56927    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56928    # socket/setsockopt and other routines are undefined under SCO ODT
56929    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56930    # on later versions), says Simon Leinen: it contains gethostby*
56931    # variants that don't use the name server (or something).  -lsocket
56932    # must be given before -lnsl if both are needed.  We assume that
56933    # if connect needs -lnsl, so does gethostbyname.
56934    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56935if test "x$ac_cv_func_connect" = xyes; then :
56936
56937fi
56938
56939    if test $ac_cv_func_connect = no; then
56940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56941$as_echo_n "checking for connect in -lsocket... " >&6; }
56942if ${ac_cv_lib_socket_connect+:} false; then :
56943  $as_echo_n "(cached) " >&6
56944else
56945  ac_check_lib_save_LIBS=$LIBS
56946LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56948/* end confdefs.h.  */
56949
56950/* Override any GCC internal prototype to avoid an error.
56951   Use char because int might match the return type of a GCC
56952   builtin and then its argument prototype would still apply.  */
56953#ifdef __cplusplus
56954extern "C"
56955#endif
56956char connect ();
56957int
56958main ()
56959{
56960return connect ();
56961  ;
56962  return 0;
56963}
56964_ACEOF
56965if ac_fn_cxx_try_link "$LINENO"; then :
56966  ac_cv_lib_socket_connect=yes
56967else
56968  ac_cv_lib_socket_connect=no
56969fi
56970rm -f core conftest.err conftest.$ac_objext \
56971    conftest$ac_exeext conftest.$ac_ext
56972LIBS=$ac_check_lib_save_LIBS
56973fi
56974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56975$as_echo "$ac_cv_lib_socket_connect" >&6; }
56976if test "x$ac_cv_lib_socket_connect" = xyes; then :
56977  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56978fi
56979
56980    fi
56981
56982    # Guillermo Gomez says -lposix is necessary on A/UX.
56983    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56984if test "x$ac_cv_func_remove" = xyes; then :
56985
56986fi
56987
56988    if test $ac_cv_func_remove = no; then
56989      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56990$as_echo_n "checking for remove in -lposix... " >&6; }
56991if ${ac_cv_lib_posix_remove+:} false; then :
56992  $as_echo_n "(cached) " >&6
56993else
56994  ac_check_lib_save_LIBS=$LIBS
56995LIBS="-lposix  $LIBS"
56996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56997/* end confdefs.h.  */
56998
56999/* Override any GCC internal prototype to avoid an error.
57000   Use char because int might match the return type of a GCC
57001   builtin and then its argument prototype would still apply.  */
57002#ifdef __cplusplus
57003extern "C"
57004#endif
57005char remove ();
57006int
57007main ()
57008{
57009return remove ();
57010  ;
57011  return 0;
57012}
57013_ACEOF
57014if ac_fn_cxx_try_link "$LINENO"; then :
57015  ac_cv_lib_posix_remove=yes
57016else
57017  ac_cv_lib_posix_remove=no
57018fi
57019rm -f core conftest.err conftest.$ac_objext \
57020    conftest$ac_exeext conftest.$ac_ext
57021LIBS=$ac_check_lib_save_LIBS
57022fi
57023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57024$as_echo "$ac_cv_lib_posix_remove" >&6; }
57025if test "x$ac_cv_lib_posix_remove" = xyes; then :
57026  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57027fi
57028
57029    fi
57030
57031    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57032    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57033if test "x$ac_cv_func_shmat" = xyes; then :
57034
57035fi
57036
57037    if test $ac_cv_func_shmat = no; then
57038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57039$as_echo_n "checking for shmat in -lipc... " >&6; }
57040if ${ac_cv_lib_ipc_shmat+:} false; then :
57041  $as_echo_n "(cached) " >&6
57042else
57043  ac_check_lib_save_LIBS=$LIBS
57044LIBS="-lipc  $LIBS"
57045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57046/* end confdefs.h.  */
57047
57048/* Override any GCC internal prototype to avoid an error.
57049   Use char because int might match the return type of a GCC
57050   builtin and then its argument prototype would still apply.  */
57051#ifdef __cplusplus
57052extern "C"
57053#endif
57054char shmat ();
57055int
57056main ()
57057{
57058return shmat ();
57059  ;
57060  return 0;
57061}
57062_ACEOF
57063if ac_fn_cxx_try_link "$LINENO"; then :
57064  ac_cv_lib_ipc_shmat=yes
57065else
57066  ac_cv_lib_ipc_shmat=no
57067fi
57068rm -f core conftest.err conftest.$ac_objext \
57069    conftest$ac_exeext conftest.$ac_ext
57070LIBS=$ac_check_lib_save_LIBS
57071fi
57072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57073$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57074if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57075  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57076fi
57077
57078    fi
57079  fi
57080
57081  # Check for libraries that X11R6 Xt/Xaw programs need.
57082  ac_save_LDFLAGS=$LDFLAGS
57083  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57084  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57085  # check for ICE first), but we must link in the order -lSM -lICE or
57086  # we get undefined symbols.  So assume we have SM if we have ICE.
57087  # These have to be linked with before -lX11, unlike the other
57088  # libraries we check for below, so use a different variable.
57089  # John Interrante, Karl Berry
57090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57091$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57092if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57093  $as_echo_n "(cached) " >&6
57094else
57095  ac_check_lib_save_LIBS=$LIBS
57096LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57098/* end confdefs.h.  */
57099
57100/* Override any GCC internal prototype to avoid an error.
57101   Use char because int might match the return type of a GCC
57102   builtin and then its argument prototype would still apply.  */
57103#ifdef __cplusplus
57104extern "C"
57105#endif
57106char IceConnectionNumber ();
57107int
57108main ()
57109{
57110return IceConnectionNumber ();
57111  ;
57112  return 0;
57113}
57114_ACEOF
57115if ac_fn_cxx_try_link "$LINENO"; then :
57116  ac_cv_lib_ICE_IceConnectionNumber=yes
57117else
57118  ac_cv_lib_ICE_IceConnectionNumber=no
57119fi
57120rm -f core conftest.err conftest.$ac_objext \
57121    conftest$ac_exeext conftest.$ac_ext
57122LIBS=$ac_check_lib_save_LIBS
57123fi
57124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57125$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57126if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57127  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57128fi
57129
57130  LDFLAGS=$ac_save_LDFLAGS
57131
57132fi
57133
57134
57135    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57136    # this doesn't make sense so we remove it.
57137    if test "x$COMPILE_TYPE" = xcross; then
57138      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57139    fi
57140
57141    if test "x$no_x" = xyes; then
57142
57143  # Print a helpful message on how to acquire the necessary build dependency.
57144  # x11 is the help tag: freetype, cups, alsa etc
57145  MISSING_DEPENDENCY=x11
57146
57147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57148    cygwin_help $MISSING_DEPENDENCY
57149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57150    msys_help $MISSING_DEPENDENCY
57151  else
57152    PKGHANDLER_COMMAND=
57153
57154    case $PKGHANDLER in
57155      apt-get)
57156        apt_help     $MISSING_DEPENDENCY ;;
57157      yum)
57158        yum_help     $MISSING_DEPENDENCY ;;
57159      port)
57160        port_help    $MISSING_DEPENDENCY ;;
57161      pkgutil)
57162        pkgutil_help $MISSING_DEPENDENCY ;;
57163      pkgadd)
57164        pkgadd_help  $MISSING_DEPENDENCY ;;
57165    esac
57166
57167    if test "x$PKGHANDLER_COMMAND" != x; then
57168      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57169    fi
57170  fi
57171
57172      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57173    fi
57174
57175    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57176      OPENWIN_HOME="/usr/openwin"
57177      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57178      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57179          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57180          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57181          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57182    fi
57183
57184    ac_ext=c
57185ac_cpp='$CPP $CPPFLAGS'
57186ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57187ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57188ac_compiler_gnu=$ac_cv_c_compiler_gnu
57189
57190    OLD_CFLAGS="$CFLAGS"
57191    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57192
57193    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57194    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57195do :
57196  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57197ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57198          # include <X11/Xlib.h>
57199          # include <X11/Xutil.h>
57200
57201
57202"
57203if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57204  cat >>confdefs.h <<_ACEOF
57205#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57206_ACEOF
57207 X11_HEADERS_OK=yes
57208else
57209  X11_HEADERS_OK=no; break
57210fi
57211
57212done
57213
57214
57215    if test "x$X11_HEADERS_OK" = xno; then
57216
57217  # Print a helpful message on how to acquire the necessary build dependency.
57218  # x11 is the help tag: freetype, cups, alsa etc
57219  MISSING_DEPENDENCY=x11
57220
57221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57222    cygwin_help $MISSING_DEPENDENCY
57223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57224    msys_help $MISSING_DEPENDENCY
57225  else
57226    PKGHANDLER_COMMAND=
57227
57228    case $PKGHANDLER in
57229      apt-get)
57230        apt_help     $MISSING_DEPENDENCY ;;
57231      yum)
57232        yum_help     $MISSING_DEPENDENCY ;;
57233      port)
57234        port_help    $MISSING_DEPENDENCY ;;
57235      pkgutil)
57236        pkgutil_help $MISSING_DEPENDENCY ;;
57237      pkgadd)
57238        pkgadd_help  $MISSING_DEPENDENCY ;;
57239    esac
57240
57241    if test "x$PKGHANDLER_COMMAND" != x; then
57242      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57243    fi
57244  fi
57245
57246      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57247    fi
57248
57249    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57250    # defined in libawt_xawt.
57251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57252$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57253    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57254/* end confdefs.h.  */
57255#include <X11/extensions/Xrender.h>
57256int
57257main ()
57258{
57259XLinearGradient x;
57260  ;
57261  return 0;
57262}
57263_ACEOF
57264if ac_fn_c_try_compile "$LINENO"; then :
57265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57266$as_echo "yes" >&6; }
57267else
57268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57269$as_echo "no" >&6; }
57270         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57271fi
57272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57273
57274    CFLAGS="$OLD_CFLAGS"
57275    ac_ext=cpp
57276ac_cpp='$CXXCPP $CPPFLAGS'
57277ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57278ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57279ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57280
57281  fi # NEEDS_LIB_X11
57282
57283
57284
57285
57286
57287
57288# Check whether --with-cups was given.
57289if test "${with_cups+set}" = set; then :
57290  withval=$with_cups;
57291fi
57292
57293
57294# Check whether --with-cups-include was given.
57295if test "${with_cups_include+set}" = set; then :
57296  withval=$with_cups_include;
57297fi
57298
57299
57300  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57301    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57302        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57303      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57304$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57305    fi
57306    CUPS_CFLAGS=
57307  else
57308    CUPS_FOUND=no
57309
57310    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57311      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57312    fi
57313
57314    if test "x${with_cups}" != x; then
57315      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57316$as_echo_n "checking for cups headers... " >&6; }
57317      if test -s "${with_cups}/include/cups/cups.h"; then
57318        CUPS_CFLAGS="-I${with_cups}/include"
57319        CUPS_FOUND=yes
57320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57321$as_echo "$CUPS_FOUND" >&6; }
57322      else
57323        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57324      fi
57325    fi
57326    if test "x${with_cups_include}" != x; then
57327      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57328$as_echo_n "checking for cups headers... " >&6; }
57329      if test -s "${with_cups_include}/cups/cups.h"; then
57330        CUPS_CFLAGS="-I${with_cups_include}"
57331        CUPS_FOUND=yes
57332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57333$as_echo "$CUPS_FOUND" >&6; }
57334      else
57335        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57336      fi
57337    fi
57338    if test "x$CUPS_FOUND" = xno; then
57339      # Are the cups headers installed in the default /usr/include location?
57340      for ac_header in cups/cups.h cups/ppd.h
57341do :
57342  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57343ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57344if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57345  cat >>confdefs.h <<_ACEOF
57346#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57347_ACEOF
57348
57349          CUPS_FOUND=yes
57350          CUPS_CFLAGS=
57351          DEFAULT_CUPS=yes
57352
57353fi
57354
57355done
57356
57357    fi
57358    if test "x$CUPS_FOUND" = xno; then
57359      # Getting nervous now? Lets poke around for standard Solaris third-party
57360      # package installation locations.
57361      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57362$as_echo_n "checking for cups headers... " >&6; }
57363      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
57364        # An SFW package seems to be installed!
57365        CUPS_FOUND=yes
57366        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
57367      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
57368        # A CSW package seems to be installed!
57369        CUPS_FOUND=yes
57370        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
57371      fi
57372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57373$as_echo "$CUPS_FOUND" >&6; }
57374    fi
57375    if test "x$CUPS_FOUND" = xno; then
57376
57377  # Print a helpful message on how to acquire the necessary build dependency.
57378  # cups is the help tag: freetype, cups, alsa etc
57379  MISSING_DEPENDENCY=cups
57380
57381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57382    cygwin_help $MISSING_DEPENDENCY
57383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57384    msys_help $MISSING_DEPENDENCY
57385  else
57386    PKGHANDLER_COMMAND=
57387
57388    case $PKGHANDLER in
57389      apt-get)
57390        apt_help     $MISSING_DEPENDENCY ;;
57391      yum)
57392        yum_help     $MISSING_DEPENDENCY ;;
57393      port)
57394        port_help    $MISSING_DEPENDENCY ;;
57395      pkgutil)
57396        pkgutil_help $MISSING_DEPENDENCY ;;
57397      pkgadd)
57398        pkgadd_help  $MISSING_DEPENDENCY ;;
57399    esac
57400
57401    if test "x$PKGHANDLER_COMMAND" != x; then
57402      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57403    fi
57404  fi
57405
57406      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57407    fi
57408  fi
57409
57410
57411
57412
57413
57414# Check whether --with-freetype was given.
57415if test "${with_freetype+set}" = set; then :
57416  withval=$with_freetype;
57417fi
57418
57419
57420# Check whether --with-freetype-include was given.
57421if test "${with_freetype_include+set}" = set; then :
57422  withval=$with_freetype_include;
57423fi
57424
57425
57426# Check whether --with-freetype-lib was given.
57427if test "${with_freetype_lib+set}" = set; then :
57428  withval=$with_freetype_lib;
57429fi
57430
57431
57432# Check whether --with-freetype-src was given.
57433if test "${with_freetype_src+set}" = set; then :
57434  withval=$with_freetype_src;
57435fi
57436
57437  # Check whether --enable-freetype-bundling was given.
57438if test "${enable_freetype_bundling+set}" = set; then :
57439  enableval=$enable_freetype_bundling;
57440fi
57441
57442
57443  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57444  FREETYPE_BASE_NAME=freetype
57445  FREETYPE_CFLAGS=
57446  FREETYPE_LIBS=
57447  FREETYPE_BUNDLE_LIB_PATH=
57448
57449  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57450    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57451        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57452        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57453        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57454      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57455$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57456    fi
57457    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57458      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57459$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57460    fi
57461  else
57462    # freetype is needed to build; go get it!
57463
57464    BUNDLE_FREETYPE="$enable_freetype_bundling"
57465
57466    if  test "x$with_freetype_src" != x; then
57467      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57468        # Try to build freetype if --with-freetype-src was given on Windows
57469
57470  FREETYPE_SRC_PATH="$with_freetype_src"
57471  BUILD_FREETYPE=yes
57472
57473  # Check if the freetype sources are acessible..
57474  if ! test -d $FREETYPE_SRC_PATH; then
57475    { $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
57476$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57477    BUILD_FREETYPE=no
57478  fi
57479  # ..and contain a vc2010 project file
57480  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57481  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57482    { $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
57483$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57484    BUILD_FREETYPE=no
57485  fi
57486  # Now check if configure found a version of 'msbuild.exe'
57487  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57488    { $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
57489$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;}
57490    BUILD_FREETYPE=no
57491  fi
57492
57493  # Ready to go..
57494  if test "x$BUILD_FREETYPE" = xyes; then
57495    # msbuild requires trailing slashes for output directories
57496    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57497    freetype_lib_path_unix="$freetype_lib_path"
57498    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57499
57500  unix_path="$vcxproj_path"
57501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57502    windows_path=`$CYGPATH -m "$unix_path"`
57503    vcxproj_path="$windows_path"
57504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57505    windows_path=`cmd //c echo $unix_path`
57506    vcxproj_path="$windows_path"
57507  fi
57508
57509
57510  unix_path="$freetype_lib_path"
57511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57512    windows_path=`$CYGPATH -m "$unix_path"`
57513    freetype_lib_path="$windows_path"
57514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57515    windows_path=`cmd //c echo $unix_path`
57516    freetype_lib_path="$windows_path"
57517  fi
57518
57519
57520  unix_path="$freetype_obj_path"
57521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57522    windows_path=`$CYGPATH -m "$unix_path"`
57523    freetype_obj_path="$windows_path"
57524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57525    windows_path=`cmd //c echo $unix_path`
57526    freetype_obj_path="$windows_path"
57527  fi
57528
57529    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57530      freetype_platform=x64
57531    else
57532      freetype_platform=win32
57533    fi
57534
57535    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57536    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57537    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57538    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57539    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57540$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57541
57542    # First we try to build the freetype.dll
57543    $ECHO -e "@echo off\n"\
57544        "$MSBUILD $vcxproj_path "\
57545        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57546        "/p:Configuration=\"Release Multithreaded\" "\
57547        "/p:Platform=$freetype_platform "\
57548        "/p:ConfigurationType=DynamicLibrary "\
57549        "/p:TargetName=freetype "\
57550        "/p:OutDir=\"$freetype_lib_path\" "\
57551        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57552    cmd /c freetype.bat
57553
57554    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57555      # If that succeeds we also build freetype.lib
57556      $ECHO -e "@echo off\n"\
57557          "$MSBUILD $vcxproj_path "\
57558          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57559          "/p:Configuration=\"Release Multithreaded\" "\
57560          "/p:Platform=$freetype_platform "\
57561          "/p:ConfigurationType=StaticLibrary "\
57562          "/p:TargetName=freetype "\
57563          "/p:OutDir=\"$freetype_lib_path\" "\
57564          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57565      cmd /c freetype.bat
57566
57567      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57568        # Once we build both, lib and dll, set freetype lib and include path appropriately
57569        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57570        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57571        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57572$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57573      else
57574        BUILD_FREETYPE=no
57575      fi
57576    else
57577      BUILD_FREETYPE=no
57578    fi
57579  fi
57580
57581        if test "x$BUILD_FREETYPE" = xyes; then
57582          # Okay, we built it. Check that it works.
57583
57584  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57585  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57586  METHOD="--with-freetype-src"
57587
57588  # Let's start with an optimistic view of the world :-)
57589  FOUND_FREETYPE=yes
57590
57591  # First look for the canonical freetype main include file ft2build.h.
57592  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57593    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57594    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57595    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57596      # Fail.
57597      FOUND_FREETYPE=no
57598    fi
57599  fi
57600
57601  if test "x$FOUND_FREETYPE" = xyes; then
57602    # Include file found, let's continue the sanity check.
57603    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57604$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57605
57606    # Reset to default value
57607    FREETYPE_BASE_NAME=freetype
57608    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57609    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57610      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57611          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57612        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57613        # for the .6 version explicitly.
57614        FREETYPE_BASE_NAME=freetype.6
57615        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57616        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57617$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57618      else
57619        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57620$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57621        FOUND_FREETYPE=no
57622      fi
57623    else
57624      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57625        # On Windows, we will need both .lib and .dll file.
57626        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57627          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57628$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57629          FOUND_FREETYPE=no
57630        fi
57631      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57632          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57633        # Found lib in isa dir, use that instead.
57634        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57635        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57636$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57637      fi
57638    fi
57639  fi
57640
57641  if test "x$FOUND_FREETYPE" = xyes; then
57642
57643  # Only process if variable expands to non-empty
57644
57645  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57647
57648  # Input might be given as Windows format, start by converting to
57649  # unix format.
57650  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57651  new_path=`$CYGPATH -u "$path"`
57652
57653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57656  # "foo.exe" is OK but "foo" is an error.
57657  #
57658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57659  # It is also a way to make sure we got the proper file name for the real test later on.
57660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57661  if test "x$test_shortpath" = x; then
57662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57663$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57664    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57665  fi
57666
57667  # Call helper function which possibly converts this using DOS-style short mode.
57668  # If so, the updated path is stored in $new_path.
57669
57670  input_path="$new_path"
57671  # Check if we need to convert this using DOS-style short mode. If the path
57672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57673  # take no chances and rewrite it.
57674  # Note: m4 eats our [], so we need to use [ and ] instead.
57675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57676  if test "x$has_forbidden_chars" != x; then
57677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57681      # Going to short mode and back again did indeed matter. Since short mode is
57682      # case insensitive, let's make it lowercase to improve readability.
57683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57684      # Now convert it back to Unix-style (cygpath)
57685      input_path=`$CYGPATH -u "$shortmode_path"`
57686      new_path="$input_path"
57687    fi
57688  fi
57689
57690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57691  if test "x$test_cygdrive_prefix" = x; then
57692    # As a simple fix, exclude /usr/bin since it's not a real path.
57693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57695      # a path prefixed by /cygdrive for fixpath to work.
57696      new_path="$CYGWIN_ROOT_PATH$input_path"
57697    fi
57698  fi
57699
57700
57701  if test "x$path" != "x$new_path"; then
57702    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57704$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57705  fi
57706
57707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57708
57709  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57710  has_colon=`$ECHO $path | $GREP ^.:`
57711  new_path="$path"
57712  if test "x$has_colon" = x; then
57713    # Not in mixed or Windows style, start by that.
57714    new_path=`cmd //c echo $path`
57715  fi
57716
57717
57718  input_path="$new_path"
57719  # Check if we need to convert this using DOS-style short mode. If the path
57720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57721  # take no chances and rewrite it.
57722  # Note: m4 eats our [], so we need to use [ and ] instead.
57723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57724  if test "x$has_forbidden_chars" != x; then
57725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57727  fi
57728
57729
57730  windows_path="$new_path"
57731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57732    unix_path=`$CYGPATH -u "$windows_path"`
57733    new_path="$unix_path"
57734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57736    new_path="$unix_path"
57737  fi
57738
57739  if test "x$path" != "x$new_path"; then
57740    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57742$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57743  fi
57744
57745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57747
57748    else
57749      # We're on a unix platform. Hooray! :)
57750      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57751      has_space=`$ECHO "$path" | $GREP " "`
57752      if test "x$has_space" != x; then
57753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57754$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57756      fi
57757
57758      # Use eval to expand a potential ~
57759      eval path="$path"
57760      if test ! -f "$path" && test ! -d "$path"; then
57761        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57762      fi
57763
57764      if test -d "$path"; then
57765        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57766      else
57767        dir="`$DIRNAME "$path"`"
57768        base="`$BASENAME "$path"`"
57769        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57770      fi
57771    fi
57772  fi
57773
57774
57775  # Only process if variable expands to non-empty
57776
57777  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57779
57780  # Input might be given as Windows format, start by converting to
57781  # unix format.
57782  path="$POTENTIAL_FREETYPE_LIB_PATH"
57783  new_path=`$CYGPATH -u "$path"`
57784
57785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57788  # "foo.exe" is OK but "foo" is an error.
57789  #
57790  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57791  # It is also a way to make sure we got the proper file name for the real test later on.
57792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57793  if test "x$test_shortpath" = x; then
57794    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57795$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57796    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57797  fi
57798
57799  # Call helper function which possibly converts this using DOS-style short mode.
57800  # If so, the updated path is stored in $new_path.
57801
57802  input_path="$new_path"
57803  # Check if we need to convert this using DOS-style short mode. If the path
57804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57805  # take no chances and rewrite it.
57806  # Note: m4 eats our [], so we need to use [ and ] instead.
57807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57808  if test "x$has_forbidden_chars" != x; then
57809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57813      # Going to short mode and back again did indeed matter. Since short mode is
57814      # case insensitive, let's make it lowercase to improve readability.
57815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57816      # Now convert it back to Unix-style (cygpath)
57817      input_path=`$CYGPATH -u "$shortmode_path"`
57818      new_path="$input_path"
57819    fi
57820  fi
57821
57822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57823  if test "x$test_cygdrive_prefix" = x; then
57824    # As a simple fix, exclude /usr/bin since it's not a real path.
57825    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57827      # a path prefixed by /cygdrive for fixpath to work.
57828      new_path="$CYGWIN_ROOT_PATH$input_path"
57829    fi
57830  fi
57831
57832
57833  if test "x$path" != "x$new_path"; then
57834    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57836$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57837  fi
57838
57839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57840
57841  path="$POTENTIAL_FREETYPE_LIB_PATH"
57842  has_colon=`$ECHO $path | $GREP ^.:`
57843  new_path="$path"
57844  if test "x$has_colon" = x; then
57845    # Not in mixed or Windows style, start by that.
57846    new_path=`cmd //c echo $path`
57847  fi
57848
57849
57850  input_path="$new_path"
57851  # Check if we need to convert this using DOS-style short mode. If the path
57852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57853  # take no chances and rewrite it.
57854  # Note: m4 eats our [], so we need to use [ and ] instead.
57855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57856  if test "x$has_forbidden_chars" != x; then
57857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57859  fi
57860
57861
57862  windows_path="$new_path"
57863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57864    unix_path=`$CYGPATH -u "$windows_path"`
57865    new_path="$unix_path"
57866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57868    new_path="$unix_path"
57869  fi
57870
57871  if test "x$path" != "x$new_path"; then
57872    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57874$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57875  fi
57876
57877  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57878  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57879
57880    else
57881      # We're on a unix platform. Hooray! :)
57882      path="$POTENTIAL_FREETYPE_LIB_PATH"
57883      has_space=`$ECHO "$path" | $GREP " "`
57884      if test "x$has_space" != x; then
57885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57886$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57887        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57888      fi
57889
57890      # Use eval to expand a potential ~
57891      eval path="$path"
57892      if test ! -f "$path" && test ! -d "$path"; then
57893        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57894      fi
57895
57896      if test -d "$path"; then
57897        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57898      else
57899        dir="`$DIRNAME "$path"`"
57900        base="`$BASENAME "$path"`"
57901        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57902      fi
57903    fi
57904  fi
57905
57906
57907    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57909$as_echo_n "checking for freetype includes... " >&6; }
57910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57911$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57912    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57914$as_echo_n "checking for freetype libraries... " >&6; }
57915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57916$as_echo "$FREETYPE_LIB_PATH" >&6; }
57917  fi
57918
57919          if test "x$FOUND_FREETYPE" != xyes; then
57920            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57921          fi
57922        else
57923          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57924$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57925          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57926        fi
57927      else
57928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57929$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57930      fi
57931    fi
57932
57933    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57934      # User has specified settings
57935
57936      if test "x$BUNDLE_FREETYPE" = x; then
57937        # If not specified, default is to bundle freetype
57938        BUNDLE_FREETYPE=yes
57939      fi
57940
57941      if test "x$with_freetype" != x; then
57942        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57943        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57944      fi
57945
57946      # Allow --with-freetype-lib and --with-freetype-include to override
57947      if test "x$with_freetype_include" != x; then
57948        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57949      fi
57950      if test "x$with_freetype_lib" != x; then
57951        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57952      fi
57953
57954      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57955        # Okay, we got it. Check that it works.
57956
57957  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57958  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57959  METHOD="--with-freetype"
57960
57961  # Let's start with an optimistic view of the world :-)
57962  FOUND_FREETYPE=yes
57963
57964  # First look for the canonical freetype main include file ft2build.h.
57965  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57966    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57967    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57968    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57969      # Fail.
57970      FOUND_FREETYPE=no
57971    fi
57972  fi
57973
57974  if test "x$FOUND_FREETYPE" = xyes; then
57975    # Include file found, let's continue the sanity check.
57976    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57977$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57978
57979    # Reset to default value
57980    FREETYPE_BASE_NAME=freetype
57981    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57982    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57983      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57984          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57985        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57986        # for the .6 version explicitly.
57987        FREETYPE_BASE_NAME=freetype.6
57988        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57989        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57990$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57991      else
57992        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57993$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57994        FOUND_FREETYPE=no
57995      fi
57996    else
57997      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57998        # On Windows, we will need both .lib and .dll file.
57999        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58000          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58001$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58002          FOUND_FREETYPE=no
58003        fi
58004      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58005          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58006        # Found lib in isa dir, use that instead.
58007        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58008        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58009$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58010      fi
58011    fi
58012  fi
58013
58014  if test "x$FOUND_FREETYPE" = xyes; then
58015
58016  # Only process if variable expands to non-empty
58017
58018  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58020
58021  # Input might be given as Windows format, start by converting to
58022  # unix format.
58023  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58024  new_path=`$CYGPATH -u "$path"`
58025
58026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58029  # "foo.exe" is OK but "foo" is an error.
58030  #
58031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58032  # It is also a way to make sure we got the proper file name for the real test later on.
58033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58034  if test "x$test_shortpath" = x; then
58035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58036$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58037    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58038  fi
58039
58040  # Call helper function which possibly converts this using DOS-style short mode.
58041  # If so, the updated path is stored in $new_path.
58042
58043  input_path="$new_path"
58044  # Check if we need to convert this using DOS-style short mode. If the path
58045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58046  # take no chances and rewrite it.
58047  # Note: m4 eats our [], so we need to use [ and ] instead.
58048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58049  if test "x$has_forbidden_chars" != x; then
58050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58054      # Going to short mode and back again did indeed matter. Since short mode is
58055      # case insensitive, let's make it lowercase to improve readability.
58056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58057      # Now convert it back to Unix-style (cygpath)
58058      input_path=`$CYGPATH -u "$shortmode_path"`
58059      new_path="$input_path"
58060    fi
58061  fi
58062
58063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58064  if test "x$test_cygdrive_prefix" = x; then
58065    # As a simple fix, exclude /usr/bin since it's not a real path.
58066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58068      # a path prefixed by /cygdrive for fixpath to work.
58069      new_path="$CYGWIN_ROOT_PATH$input_path"
58070    fi
58071  fi
58072
58073
58074  if test "x$path" != "x$new_path"; then
58075    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58077$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58078  fi
58079
58080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58081
58082  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58083  has_colon=`$ECHO $path | $GREP ^.:`
58084  new_path="$path"
58085  if test "x$has_colon" = x; then
58086    # Not in mixed or Windows style, start by that.
58087    new_path=`cmd //c echo $path`
58088  fi
58089
58090
58091  input_path="$new_path"
58092  # Check if we need to convert this using DOS-style short mode. If the path
58093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58094  # take no chances and rewrite it.
58095  # Note: m4 eats our [], so we need to use [ and ] instead.
58096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58097  if test "x$has_forbidden_chars" != x; then
58098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58100  fi
58101
58102
58103  windows_path="$new_path"
58104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58105    unix_path=`$CYGPATH -u "$windows_path"`
58106    new_path="$unix_path"
58107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58109    new_path="$unix_path"
58110  fi
58111
58112  if test "x$path" != "x$new_path"; then
58113    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58115$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58116  fi
58117
58118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58120
58121    else
58122      # We're on a unix platform. Hooray! :)
58123      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58124      has_space=`$ECHO "$path" | $GREP " "`
58125      if test "x$has_space" != x; then
58126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58127$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58129      fi
58130
58131      # Use eval to expand a potential ~
58132      eval path="$path"
58133      if test ! -f "$path" && test ! -d "$path"; then
58134        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58135      fi
58136
58137      if test -d "$path"; then
58138        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58139      else
58140        dir="`$DIRNAME "$path"`"
58141        base="`$BASENAME "$path"`"
58142        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58143      fi
58144    fi
58145  fi
58146
58147
58148  # Only process if variable expands to non-empty
58149
58150  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58152
58153  # Input might be given as Windows format, start by converting to
58154  # unix format.
58155  path="$POTENTIAL_FREETYPE_LIB_PATH"
58156  new_path=`$CYGPATH -u "$path"`
58157
58158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58161  # "foo.exe" is OK but "foo" is an error.
58162  #
58163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58164  # It is also a way to make sure we got the proper file name for the real test later on.
58165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58166  if test "x$test_shortpath" = x; then
58167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58168$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58169    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58170  fi
58171
58172  # Call helper function which possibly converts this using DOS-style short mode.
58173  # If so, the updated path is stored in $new_path.
58174
58175  input_path="$new_path"
58176  # Check if we need to convert this using DOS-style short mode. If the path
58177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58178  # take no chances and rewrite it.
58179  # Note: m4 eats our [], so we need to use [ and ] instead.
58180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58181  if test "x$has_forbidden_chars" != x; then
58182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58186      # Going to short mode and back again did indeed matter. Since short mode is
58187      # case insensitive, let's make it lowercase to improve readability.
58188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58189      # Now convert it back to Unix-style (cygpath)
58190      input_path=`$CYGPATH -u "$shortmode_path"`
58191      new_path="$input_path"
58192    fi
58193  fi
58194
58195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58196  if test "x$test_cygdrive_prefix" = x; then
58197    # As a simple fix, exclude /usr/bin since it's not a real path.
58198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58200      # a path prefixed by /cygdrive for fixpath to work.
58201      new_path="$CYGWIN_ROOT_PATH$input_path"
58202    fi
58203  fi
58204
58205
58206  if test "x$path" != "x$new_path"; then
58207    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58210  fi
58211
58212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58213
58214  path="$POTENTIAL_FREETYPE_LIB_PATH"
58215  has_colon=`$ECHO $path | $GREP ^.:`
58216  new_path="$path"
58217  if test "x$has_colon" = x; then
58218    # Not in mixed or Windows style, start by that.
58219    new_path=`cmd //c echo $path`
58220  fi
58221
58222
58223  input_path="$new_path"
58224  # Check if we need to convert this using DOS-style short mode. If the path
58225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58226  # take no chances and rewrite it.
58227  # Note: m4 eats our [], so we need to use [ and ] instead.
58228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58229  if test "x$has_forbidden_chars" != x; then
58230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58232  fi
58233
58234
58235  windows_path="$new_path"
58236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58237    unix_path=`$CYGPATH -u "$windows_path"`
58238    new_path="$unix_path"
58239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58241    new_path="$unix_path"
58242  fi
58243
58244  if test "x$path" != "x$new_path"; then
58245    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58248  fi
58249
58250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58252
58253    else
58254      # We're on a unix platform. Hooray! :)
58255      path="$POTENTIAL_FREETYPE_LIB_PATH"
58256      has_space=`$ECHO "$path" | $GREP " "`
58257      if test "x$has_space" != x; then
58258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58260        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58261      fi
58262
58263      # Use eval to expand a potential ~
58264      eval path="$path"
58265      if test ! -f "$path" && test ! -d "$path"; then
58266        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58267      fi
58268
58269      if test -d "$path"; then
58270        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58271      else
58272        dir="`$DIRNAME "$path"`"
58273        base="`$BASENAME "$path"`"
58274        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58275      fi
58276    fi
58277  fi
58278
58279
58280    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58282$as_echo_n "checking for freetype includes... " >&6; }
58283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58284$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58285    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58287$as_echo_n "checking for freetype libraries... " >&6; }
58288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58289$as_echo "$FREETYPE_LIB_PATH" >&6; }
58290  fi
58291
58292        if test "x$FOUND_FREETYPE" != xyes; then
58293          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58294        fi
58295      else
58296        # User specified only one of lib or include. This is an error.
58297        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58298          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58299$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58300          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58301        else
58302          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58303$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58304          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58305        fi
58306      fi
58307    else
58308      # User did not specify settings, but we need freetype. Try to locate it.
58309
58310      if test "x$BUNDLE_FREETYPE" = x; then
58311        # If not specified, default is to bundle freetype only on windows
58312        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58313          BUNDLE_FREETYPE=yes
58314        else
58315          BUNDLE_FREETYPE=no
58316        fi
58317      fi
58318
58319      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58320      if test "x$SYSROOT" = x; then
58321        if test "x$FOUND_FREETYPE" != xyes; then
58322          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58323          if test "x$PKG_CONFIG" != x; then
58324
58325pkg_failed=no
58326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58327$as_echo_n "checking for FREETYPE... " >&6; }
58328
58329if test -n "$FREETYPE_CFLAGS"; then
58330    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58331 elif test -n "$PKG_CONFIG"; then
58332    if test -n "$PKG_CONFIG" && \
58333    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58334  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58335  ac_status=$?
58336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58337  test $ac_status = 0; }; then
58338  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58339else
58340  pkg_failed=yes
58341fi
58342 else
58343    pkg_failed=untried
58344fi
58345if test -n "$FREETYPE_LIBS"; then
58346    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58347 elif test -n "$PKG_CONFIG"; then
58348    if test -n "$PKG_CONFIG" && \
58349    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58350  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58351  ac_status=$?
58352  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58353  test $ac_status = 0; }; then
58354  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58355else
58356  pkg_failed=yes
58357fi
58358 else
58359    pkg_failed=untried
58360fi
58361
58362
58363
58364if test $pkg_failed = yes; then
58365
58366if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58367        _pkg_short_errors_supported=yes
58368else
58369        _pkg_short_errors_supported=no
58370fi
58371        if test $_pkg_short_errors_supported = yes; then
58372	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58373        else
58374	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58375        fi
58376	# Put the nasty error message in config.log where it belongs
58377	echo "$FREETYPE_PKG_ERRORS" >&5
58378
58379	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58380$as_echo "no" >&6; }
58381                FOUND_FREETYPE=no
58382elif test $pkg_failed = untried; then
58383	FOUND_FREETYPE=no
58384else
58385	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58386	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58388$as_echo "yes" >&6; }
58389	FOUND_FREETYPE=yes
58390fi
58391            if test "x$FOUND_FREETYPE" = xyes; then
58392              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58393              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58394              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58395              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58396                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58397              fi
58398              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58399              if test "x$BUNDLE_FREETYPE" = xyes; then
58400                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58401$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58402                FOUND_FREETYPE=no
58403              else
58404                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58405$as_echo_n "checking for freetype... " >&6; }
58406                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58407$as_echo "yes (using pkg-config)" >&6; }
58408              fi
58409            fi
58410          fi
58411        fi
58412      fi
58413
58414      if test "x$FOUND_FREETYPE" != xyes; then
58415        # Check in well-known locations
58416        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58417          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58418
58419  windows_path="$FREETYPE_BASE_DIR"
58420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58421    unix_path=`$CYGPATH -u "$windows_path"`
58422    FREETYPE_BASE_DIR="$unix_path"
58423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58425    FREETYPE_BASE_DIR="$unix_path"
58426  fi
58427
58428
58429  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58430  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58431  METHOD="well-known location"
58432
58433  # Let's start with an optimistic view of the world :-)
58434  FOUND_FREETYPE=yes
58435
58436  # First look for the canonical freetype main include file ft2build.h.
58437  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58438    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58439    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58440    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58441      # Fail.
58442      FOUND_FREETYPE=no
58443    fi
58444  fi
58445
58446  if test "x$FOUND_FREETYPE" = xyes; then
58447    # Include file found, let's continue the sanity check.
58448    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58449$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58450
58451    # Reset to default value
58452    FREETYPE_BASE_NAME=freetype
58453    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58454    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58455      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58456          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58457        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58458        # for the .6 version explicitly.
58459        FREETYPE_BASE_NAME=freetype.6
58460        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58461        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58462$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58463      else
58464        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58465$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58466        FOUND_FREETYPE=no
58467      fi
58468    else
58469      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58470        # On Windows, we will need both .lib and .dll file.
58471        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58472          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58473$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58474          FOUND_FREETYPE=no
58475        fi
58476      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58477          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58478        # Found lib in isa dir, use that instead.
58479        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58480        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58481$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58482      fi
58483    fi
58484  fi
58485
58486  if test "x$FOUND_FREETYPE" = xyes; then
58487
58488  # Only process if variable expands to non-empty
58489
58490  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58492
58493  # Input might be given as Windows format, start by converting to
58494  # unix format.
58495  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58496  new_path=`$CYGPATH -u "$path"`
58497
58498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58501  # "foo.exe" is OK but "foo" is an error.
58502  #
58503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58504  # It is also a way to make sure we got the proper file name for the real test later on.
58505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58506  if test "x$test_shortpath" = x; then
58507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58508$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58509    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58510  fi
58511
58512  # Call helper function which possibly converts this using DOS-style short mode.
58513  # If so, the updated path is stored in $new_path.
58514
58515  input_path="$new_path"
58516  # Check if we need to convert this using DOS-style short mode. If the path
58517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58518  # take no chances and rewrite it.
58519  # Note: m4 eats our [], so we need to use [ and ] instead.
58520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58521  if test "x$has_forbidden_chars" != x; then
58522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58526      # Going to short mode and back again did indeed matter. Since short mode is
58527      # case insensitive, let's make it lowercase to improve readability.
58528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58529      # Now convert it back to Unix-style (cygpath)
58530      input_path=`$CYGPATH -u "$shortmode_path"`
58531      new_path="$input_path"
58532    fi
58533  fi
58534
58535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58536  if test "x$test_cygdrive_prefix" = x; then
58537    # As a simple fix, exclude /usr/bin since it's not a real path.
58538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58540      # a path prefixed by /cygdrive for fixpath to work.
58541      new_path="$CYGWIN_ROOT_PATH$input_path"
58542    fi
58543  fi
58544
58545
58546  if test "x$path" != "x$new_path"; then
58547    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58549$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58550  fi
58551
58552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58553
58554  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58555  has_colon=`$ECHO $path | $GREP ^.:`
58556  new_path="$path"
58557  if test "x$has_colon" = x; then
58558    # Not in mixed or Windows style, start by that.
58559    new_path=`cmd //c echo $path`
58560  fi
58561
58562
58563  input_path="$new_path"
58564  # Check if we need to convert this using DOS-style short mode. If the path
58565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58566  # take no chances and rewrite it.
58567  # Note: m4 eats our [], so we need to use [ and ] instead.
58568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58569  if test "x$has_forbidden_chars" != x; then
58570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58572  fi
58573
58574
58575  windows_path="$new_path"
58576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58577    unix_path=`$CYGPATH -u "$windows_path"`
58578    new_path="$unix_path"
58579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58581    new_path="$unix_path"
58582  fi
58583
58584  if test "x$path" != "x$new_path"; then
58585    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58588  fi
58589
58590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58592
58593    else
58594      # We're on a unix platform. Hooray! :)
58595      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58596      has_space=`$ECHO "$path" | $GREP " "`
58597      if test "x$has_space" != x; then
58598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58599$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58601      fi
58602
58603      # Use eval to expand a potential ~
58604      eval path="$path"
58605      if test ! -f "$path" && test ! -d "$path"; then
58606        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58607      fi
58608
58609      if test -d "$path"; then
58610        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58611      else
58612        dir="`$DIRNAME "$path"`"
58613        base="`$BASENAME "$path"`"
58614        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58615      fi
58616    fi
58617  fi
58618
58619
58620  # Only process if variable expands to non-empty
58621
58622  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58624
58625  # Input might be given as Windows format, start by converting to
58626  # unix format.
58627  path="$POTENTIAL_FREETYPE_LIB_PATH"
58628  new_path=`$CYGPATH -u "$path"`
58629
58630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58633  # "foo.exe" is OK but "foo" is an error.
58634  #
58635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58636  # It is also a way to make sure we got the proper file name for the real test later on.
58637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58638  if test "x$test_shortpath" = x; then
58639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58642  fi
58643
58644  # Call helper function which possibly converts this using DOS-style short mode.
58645  # If so, the updated path is stored in $new_path.
58646
58647  input_path="$new_path"
58648  # Check if we need to convert this using DOS-style short mode. If the path
58649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58650  # take no chances and rewrite it.
58651  # Note: m4 eats our [], so we need to use [ and ] instead.
58652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58653  if test "x$has_forbidden_chars" != x; then
58654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58658      # Going to short mode and back again did indeed matter. Since short mode is
58659      # case insensitive, let's make it lowercase to improve readability.
58660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58661      # Now convert it back to Unix-style (cygpath)
58662      input_path=`$CYGPATH -u "$shortmode_path"`
58663      new_path="$input_path"
58664    fi
58665  fi
58666
58667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58668  if test "x$test_cygdrive_prefix" = x; then
58669    # As a simple fix, exclude /usr/bin since it's not a real path.
58670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58672      # a path prefixed by /cygdrive for fixpath to work.
58673      new_path="$CYGWIN_ROOT_PATH$input_path"
58674    fi
58675  fi
58676
58677
58678  if test "x$path" != "x$new_path"; then
58679    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58682  fi
58683
58684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58685
58686  path="$POTENTIAL_FREETYPE_LIB_PATH"
58687  has_colon=`$ECHO $path | $GREP ^.:`
58688  new_path="$path"
58689  if test "x$has_colon" = x; then
58690    # Not in mixed or Windows style, start by that.
58691    new_path=`cmd //c echo $path`
58692  fi
58693
58694
58695  input_path="$new_path"
58696  # Check if we need to convert this using DOS-style short mode. If the path
58697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58698  # take no chances and rewrite it.
58699  # Note: m4 eats our [], so we need to use [ and ] instead.
58700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58701  if test "x$has_forbidden_chars" != x; then
58702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58704  fi
58705
58706
58707  windows_path="$new_path"
58708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58709    unix_path=`$CYGPATH -u "$windows_path"`
58710    new_path="$unix_path"
58711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58713    new_path="$unix_path"
58714  fi
58715
58716  if test "x$path" != "x$new_path"; then
58717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58720  fi
58721
58722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58724
58725    else
58726      # We're on a unix platform. Hooray! :)
58727      path="$POTENTIAL_FREETYPE_LIB_PATH"
58728      has_space=`$ECHO "$path" | $GREP " "`
58729      if test "x$has_space" != x; then
58730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58733      fi
58734
58735      # Use eval to expand a potential ~
58736      eval path="$path"
58737      if test ! -f "$path" && test ! -d "$path"; then
58738        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58739      fi
58740
58741      if test -d "$path"; then
58742        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58743      else
58744        dir="`$DIRNAME "$path"`"
58745        base="`$BASENAME "$path"`"
58746        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58747      fi
58748    fi
58749  fi
58750
58751
58752    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58754$as_echo_n "checking for freetype includes... " >&6; }
58755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58756$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58757    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58759$as_echo_n "checking for freetype libraries... " >&6; }
58760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58761$as_echo "$FREETYPE_LIB_PATH" >&6; }
58762  fi
58763
58764          if test "x$FOUND_FREETYPE" != xyes; then
58765            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58766
58767  windows_path="$FREETYPE_BASE_DIR"
58768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58769    unix_path=`$CYGPATH -u "$windows_path"`
58770    FREETYPE_BASE_DIR="$unix_path"
58771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58773    FREETYPE_BASE_DIR="$unix_path"
58774  fi
58775
58776
58777  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58778  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58779  METHOD="well-known location"
58780
58781  # Let's start with an optimistic view of the world :-)
58782  FOUND_FREETYPE=yes
58783
58784  # First look for the canonical freetype main include file ft2build.h.
58785  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58786    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58787    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58788    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58789      # Fail.
58790      FOUND_FREETYPE=no
58791    fi
58792  fi
58793
58794  if test "x$FOUND_FREETYPE" = xyes; then
58795    # Include file found, let's continue the sanity check.
58796    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58797$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58798
58799    # Reset to default value
58800    FREETYPE_BASE_NAME=freetype
58801    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58802    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58803      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58804          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58805        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58806        # for the .6 version explicitly.
58807        FREETYPE_BASE_NAME=freetype.6
58808        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58809        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58810$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58811      else
58812        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58813$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58814        FOUND_FREETYPE=no
58815      fi
58816    else
58817      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58818        # On Windows, we will need both .lib and .dll file.
58819        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58820          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58821$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58822          FOUND_FREETYPE=no
58823        fi
58824      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58825          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58826        # Found lib in isa dir, use that instead.
58827        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58828        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58829$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58830      fi
58831    fi
58832  fi
58833
58834  if test "x$FOUND_FREETYPE" = xyes; then
58835
58836  # Only process if variable expands to non-empty
58837
58838  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58840
58841  # Input might be given as Windows format, start by converting to
58842  # unix format.
58843  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58844  new_path=`$CYGPATH -u "$path"`
58845
58846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58849  # "foo.exe" is OK but "foo" is an error.
58850  #
58851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58852  # It is also a way to make sure we got the proper file name for the real test later on.
58853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58854  if test "x$test_shortpath" = x; then
58855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58856$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58857    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58858  fi
58859
58860  # Call helper function which possibly converts this using DOS-style short mode.
58861  # If so, the updated path is stored in $new_path.
58862
58863  input_path="$new_path"
58864  # Check if we need to convert this using DOS-style short mode. If the path
58865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58866  # take no chances and rewrite it.
58867  # Note: m4 eats our [], so we need to use [ and ] instead.
58868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58869  if test "x$has_forbidden_chars" != x; then
58870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58874      # Going to short mode and back again did indeed matter. Since short mode is
58875      # case insensitive, let's make it lowercase to improve readability.
58876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58877      # Now convert it back to Unix-style (cygpath)
58878      input_path=`$CYGPATH -u "$shortmode_path"`
58879      new_path="$input_path"
58880    fi
58881  fi
58882
58883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58884  if test "x$test_cygdrive_prefix" = x; then
58885    # As a simple fix, exclude /usr/bin since it's not a real path.
58886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58888      # a path prefixed by /cygdrive for fixpath to work.
58889      new_path="$CYGWIN_ROOT_PATH$input_path"
58890    fi
58891  fi
58892
58893
58894  if test "x$path" != "x$new_path"; then
58895    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58897$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58898  fi
58899
58900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58901
58902  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58903  has_colon=`$ECHO $path | $GREP ^.:`
58904  new_path="$path"
58905  if test "x$has_colon" = x; then
58906    # Not in mixed or Windows style, start by that.
58907    new_path=`cmd //c echo $path`
58908  fi
58909
58910
58911  input_path="$new_path"
58912  # Check if we need to convert this using DOS-style short mode. If the path
58913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58914  # take no chances and rewrite it.
58915  # Note: m4 eats our [], so we need to use [ and ] instead.
58916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58917  if test "x$has_forbidden_chars" != x; then
58918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58920  fi
58921
58922
58923  windows_path="$new_path"
58924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58925    unix_path=`$CYGPATH -u "$windows_path"`
58926    new_path="$unix_path"
58927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58929    new_path="$unix_path"
58930  fi
58931
58932  if test "x$path" != "x$new_path"; then
58933    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58936  fi
58937
58938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58940
58941    else
58942      # We're on a unix platform. Hooray! :)
58943      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58944      has_space=`$ECHO "$path" | $GREP " "`
58945      if test "x$has_space" != x; then
58946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58949      fi
58950
58951      # Use eval to expand a potential ~
58952      eval path="$path"
58953      if test ! -f "$path" && test ! -d "$path"; then
58954        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58955      fi
58956
58957      if test -d "$path"; then
58958        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58959      else
58960        dir="`$DIRNAME "$path"`"
58961        base="`$BASENAME "$path"`"
58962        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58963      fi
58964    fi
58965  fi
58966
58967
58968  # Only process if variable expands to non-empty
58969
58970  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58972
58973  # Input might be given as Windows format, start by converting to
58974  # unix format.
58975  path="$POTENTIAL_FREETYPE_LIB_PATH"
58976  new_path=`$CYGPATH -u "$path"`
58977
58978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58981  # "foo.exe" is OK but "foo" is an error.
58982  #
58983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58984  # It is also a way to make sure we got the proper file name for the real test later on.
58985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58986  if test "x$test_shortpath" = x; then
58987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58988$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58989    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58990  fi
58991
58992  # Call helper function which possibly converts this using DOS-style short mode.
58993  # If so, the updated path is stored in $new_path.
58994
58995  input_path="$new_path"
58996  # Check if we need to convert this using DOS-style short mode. If the path
58997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58998  # take no chances and rewrite it.
58999  # Note: m4 eats our [], so we need to use [ and ] instead.
59000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59001  if test "x$has_forbidden_chars" != x; then
59002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59006      # Going to short mode and back again did indeed matter. Since short mode is
59007      # case insensitive, let's make it lowercase to improve readability.
59008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59009      # Now convert it back to Unix-style (cygpath)
59010      input_path=`$CYGPATH -u "$shortmode_path"`
59011      new_path="$input_path"
59012    fi
59013  fi
59014
59015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59016  if test "x$test_cygdrive_prefix" = x; then
59017    # As a simple fix, exclude /usr/bin since it's not a real path.
59018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59020      # a path prefixed by /cygdrive for fixpath to work.
59021      new_path="$CYGWIN_ROOT_PATH$input_path"
59022    fi
59023  fi
59024
59025
59026  if test "x$path" != "x$new_path"; then
59027    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59029$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59030  fi
59031
59032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59033
59034  path="$POTENTIAL_FREETYPE_LIB_PATH"
59035  has_colon=`$ECHO $path | $GREP ^.:`
59036  new_path="$path"
59037  if test "x$has_colon" = x; then
59038    # Not in mixed or Windows style, start by that.
59039    new_path=`cmd //c echo $path`
59040  fi
59041
59042
59043  input_path="$new_path"
59044  # Check if we need to convert this using DOS-style short mode. If the path
59045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59046  # take no chances and rewrite it.
59047  # Note: m4 eats our [], so we need to use [ and ] instead.
59048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59049  if test "x$has_forbidden_chars" != x; then
59050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59052  fi
59053
59054
59055  windows_path="$new_path"
59056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59057    unix_path=`$CYGPATH -u "$windows_path"`
59058    new_path="$unix_path"
59059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59061    new_path="$unix_path"
59062  fi
59063
59064  if test "x$path" != "x$new_path"; then
59065    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59067$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59068  fi
59069
59070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59072
59073    else
59074      # We're on a unix platform. Hooray! :)
59075      path="$POTENTIAL_FREETYPE_LIB_PATH"
59076      has_space=`$ECHO "$path" | $GREP " "`
59077      if test "x$has_space" != x; then
59078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59079$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59080        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59081      fi
59082
59083      # Use eval to expand a potential ~
59084      eval path="$path"
59085      if test ! -f "$path" && test ! -d "$path"; then
59086        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59087      fi
59088
59089      if test -d "$path"; then
59090        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59091      else
59092        dir="`$DIRNAME "$path"`"
59093        base="`$BASENAME "$path"`"
59094        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59095      fi
59096    fi
59097  fi
59098
59099
59100    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59102$as_echo_n "checking for freetype includes... " >&6; }
59103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59104$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59105    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59107$as_echo_n "checking for freetype libraries... " >&6; }
59108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59109$as_echo "$FREETYPE_LIB_PATH" >&6; }
59110  fi
59111
59112          fi
59113          if test "x$FOUND_FREETYPE" != xyes; then
59114            FREETYPE_BASE_DIR="$HOME/freetype"
59115
59116  windows_path="$FREETYPE_BASE_DIR"
59117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59118    unix_path=`$CYGPATH -u "$windows_path"`
59119    FREETYPE_BASE_DIR="$unix_path"
59120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59122    FREETYPE_BASE_DIR="$unix_path"
59123  fi
59124
59125            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59126
59127  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59128  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59129  METHOD="well-known location"
59130
59131  # Let's start with an optimistic view of the world :-)
59132  FOUND_FREETYPE=yes
59133
59134  # First look for the canonical freetype main include file ft2build.h.
59135  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59136    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59137    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59138    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59139      # Fail.
59140      FOUND_FREETYPE=no
59141    fi
59142  fi
59143
59144  if test "x$FOUND_FREETYPE" = xyes; then
59145    # Include file found, let's continue the sanity check.
59146    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59147$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59148
59149    # Reset to default value
59150    FREETYPE_BASE_NAME=freetype
59151    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59152    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59153      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59154          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59155        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59156        # for the .6 version explicitly.
59157        FREETYPE_BASE_NAME=freetype.6
59158        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59159        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59160$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59161      else
59162        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59163$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59164        FOUND_FREETYPE=no
59165      fi
59166    else
59167      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59168        # On Windows, we will need both .lib and .dll file.
59169        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59170          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59171$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59172          FOUND_FREETYPE=no
59173        fi
59174      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59175          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59176        # Found lib in isa dir, use that instead.
59177        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59178        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59179$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59180      fi
59181    fi
59182  fi
59183
59184  if test "x$FOUND_FREETYPE" = xyes; then
59185
59186  # Only process if variable expands to non-empty
59187
59188  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59190
59191  # Input might be given as Windows format, start by converting to
59192  # unix format.
59193  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59194  new_path=`$CYGPATH -u "$path"`
59195
59196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59199  # "foo.exe" is OK but "foo" is an error.
59200  #
59201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59202  # It is also a way to make sure we got the proper file name for the real test later on.
59203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59204  if test "x$test_shortpath" = x; then
59205    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59206$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59207    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59208  fi
59209
59210  # Call helper function which possibly converts this using DOS-style short mode.
59211  # If so, the updated path is stored in $new_path.
59212
59213  input_path="$new_path"
59214  # Check if we need to convert this using DOS-style short mode. If the path
59215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59216  # take no chances and rewrite it.
59217  # Note: m4 eats our [], so we need to use [ and ] instead.
59218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59219  if test "x$has_forbidden_chars" != x; then
59220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59224      # Going to short mode and back again did indeed matter. Since short mode is
59225      # case insensitive, let's make it lowercase to improve readability.
59226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59227      # Now convert it back to Unix-style (cygpath)
59228      input_path=`$CYGPATH -u "$shortmode_path"`
59229      new_path="$input_path"
59230    fi
59231  fi
59232
59233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59234  if test "x$test_cygdrive_prefix" = x; then
59235    # As a simple fix, exclude /usr/bin since it's not a real path.
59236    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59238      # a path prefixed by /cygdrive for fixpath to work.
59239      new_path="$CYGWIN_ROOT_PATH$input_path"
59240    fi
59241  fi
59242
59243
59244  if test "x$path" != "x$new_path"; then
59245    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59248  fi
59249
59250    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59251
59252  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59253  has_colon=`$ECHO $path | $GREP ^.:`
59254  new_path="$path"
59255  if test "x$has_colon" = x; then
59256    # Not in mixed or Windows style, start by that.
59257    new_path=`cmd //c echo $path`
59258  fi
59259
59260
59261  input_path="$new_path"
59262  # Check if we need to convert this using DOS-style short mode. If the path
59263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59264  # take no chances and rewrite it.
59265  # Note: m4 eats our [], so we need to use [ and ] instead.
59266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59267  if test "x$has_forbidden_chars" != x; then
59268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59270  fi
59271
59272
59273  windows_path="$new_path"
59274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59275    unix_path=`$CYGPATH -u "$windows_path"`
59276    new_path="$unix_path"
59277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59279    new_path="$unix_path"
59280  fi
59281
59282  if test "x$path" != "x$new_path"; then
59283    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59285$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59286  fi
59287
59288  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59289  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59290
59291    else
59292      # We're on a unix platform. Hooray! :)
59293      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59294      has_space=`$ECHO "$path" | $GREP " "`
59295      if test "x$has_space" != x; then
59296        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59297$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59298        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59299      fi
59300
59301      # Use eval to expand a potential ~
59302      eval path="$path"
59303      if test ! -f "$path" && test ! -d "$path"; then
59304        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59305      fi
59306
59307      if test -d "$path"; then
59308        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59309      else
59310        dir="`$DIRNAME "$path"`"
59311        base="`$BASENAME "$path"`"
59312        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59313      fi
59314    fi
59315  fi
59316
59317
59318  # Only process if variable expands to non-empty
59319
59320  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59322
59323  # Input might be given as Windows format, start by converting to
59324  # unix format.
59325  path="$POTENTIAL_FREETYPE_LIB_PATH"
59326  new_path=`$CYGPATH -u "$path"`
59327
59328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59331  # "foo.exe" is OK but "foo" is an error.
59332  #
59333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59334  # It is also a way to make sure we got the proper file name for the real test later on.
59335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59336  if test "x$test_shortpath" = x; then
59337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59338$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59339    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59340  fi
59341
59342  # Call helper function which possibly converts this using DOS-style short mode.
59343  # If so, the updated path is stored in $new_path.
59344
59345  input_path="$new_path"
59346  # Check if we need to convert this using DOS-style short mode. If the path
59347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59348  # take no chances and rewrite it.
59349  # Note: m4 eats our [], so we need to use [ and ] instead.
59350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59351  if test "x$has_forbidden_chars" != x; then
59352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59356      # Going to short mode and back again did indeed matter. Since short mode is
59357      # case insensitive, let's make it lowercase to improve readability.
59358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59359      # Now convert it back to Unix-style (cygpath)
59360      input_path=`$CYGPATH -u "$shortmode_path"`
59361      new_path="$input_path"
59362    fi
59363  fi
59364
59365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59366  if test "x$test_cygdrive_prefix" = x; then
59367    # As a simple fix, exclude /usr/bin since it's not a real path.
59368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59370      # a path prefixed by /cygdrive for fixpath to work.
59371      new_path="$CYGWIN_ROOT_PATH$input_path"
59372    fi
59373  fi
59374
59375
59376  if test "x$path" != "x$new_path"; then
59377    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59380  fi
59381
59382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59383
59384  path="$POTENTIAL_FREETYPE_LIB_PATH"
59385  has_colon=`$ECHO $path | $GREP ^.:`
59386  new_path="$path"
59387  if test "x$has_colon" = x; then
59388    # Not in mixed or Windows style, start by that.
59389    new_path=`cmd //c echo $path`
59390  fi
59391
59392
59393  input_path="$new_path"
59394  # Check if we need to convert this using DOS-style short mode. If the path
59395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59396  # take no chances and rewrite it.
59397  # Note: m4 eats our [], so we need to use [ and ] instead.
59398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59399  if test "x$has_forbidden_chars" != x; then
59400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59402  fi
59403
59404
59405  windows_path="$new_path"
59406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59407    unix_path=`$CYGPATH -u "$windows_path"`
59408    new_path="$unix_path"
59409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59411    new_path="$unix_path"
59412  fi
59413
59414  if test "x$path" != "x$new_path"; then
59415    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59418  fi
59419
59420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59422
59423    else
59424      # We're on a unix platform. Hooray! :)
59425      path="$POTENTIAL_FREETYPE_LIB_PATH"
59426      has_space=`$ECHO "$path" | $GREP " "`
59427      if test "x$has_space" != x; then
59428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59429$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59430        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59431      fi
59432
59433      # Use eval to expand a potential ~
59434      eval path="$path"
59435      if test ! -f "$path" && test ! -d "$path"; then
59436        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59437      fi
59438
59439      if test -d "$path"; then
59440        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59441      else
59442        dir="`$DIRNAME "$path"`"
59443        base="`$BASENAME "$path"`"
59444        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59445      fi
59446    fi
59447  fi
59448
59449
59450    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59452$as_echo_n "checking for freetype includes... " >&6; }
59453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59454$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59455    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59457$as_echo_n "checking for freetype libraries... " >&6; }
59458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59459$as_echo "$FREETYPE_LIB_PATH" >&6; }
59460  fi
59461
59462            else
59463
59464  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59465  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59466  METHOD="well-known location"
59467
59468  # Let's start with an optimistic view of the world :-)
59469  FOUND_FREETYPE=yes
59470
59471  # First look for the canonical freetype main include file ft2build.h.
59472  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59473    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59474    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59475    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59476      # Fail.
59477      FOUND_FREETYPE=no
59478    fi
59479  fi
59480
59481  if test "x$FOUND_FREETYPE" = xyes; then
59482    # Include file found, let's continue the sanity check.
59483    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59484$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59485
59486    # Reset to default value
59487    FREETYPE_BASE_NAME=freetype
59488    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59489    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59490      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59491          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59492        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59493        # for the .6 version explicitly.
59494        FREETYPE_BASE_NAME=freetype.6
59495        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59496        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59497$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59498      else
59499        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59500$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59501        FOUND_FREETYPE=no
59502      fi
59503    else
59504      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59505        # On Windows, we will need both .lib and .dll file.
59506        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59507          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59508$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59509          FOUND_FREETYPE=no
59510        fi
59511      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59512          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59513        # Found lib in isa dir, use that instead.
59514        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59515        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59516$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59517      fi
59518    fi
59519  fi
59520
59521  if test "x$FOUND_FREETYPE" = xyes; then
59522
59523  # Only process if variable expands to non-empty
59524
59525  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59527
59528  # Input might be given as Windows format, start by converting to
59529  # unix format.
59530  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59531  new_path=`$CYGPATH -u "$path"`
59532
59533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59536  # "foo.exe" is OK but "foo" is an error.
59537  #
59538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59539  # It is also a way to make sure we got the proper file name for the real test later on.
59540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59541  if test "x$test_shortpath" = x; then
59542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59544    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59545  fi
59546
59547  # Call helper function which possibly converts this using DOS-style short mode.
59548  # If so, the updated path is stored in $new_path.
59549
59550  input_path="$new_path"
59551  # Check if we need to convert this using DOS-style short mode. If the path
59552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59553  # take no chances and rewrite it.
59554  # Note: m4 eats our [], so we need to use [ and ] instead.
59555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59556  if test "x$has_forbidden_chars" != x; then
59557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59561      # Going to short mode and back again did indeed matter. Since short mode is
59562      # case insensitive, let's make it lowercase to improve readability.
59563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59564      # Now convert it back to Unix-style (cygpath)
59565      input_path=`$CYGPATH -u "$shortmode_path"`
59566      new_path="$input_path"
59567    fi
59568  fi
59569
59570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59571  if test "x$test_cygdrive_prefix" = x; then
59572    # As a simple fix, exclude /usr/bin since it's not a real path.
59573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59575      # a path prefixed by /cygdrive for fixpath to work.
59576      new_path="$CYGWIN_ROOT_PATH$input_path"
59577    fi
59578  fi
59579
59580
59581  if test "x$path" != "x$new_path"; then
59582    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59585  fi
59586
59587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59588
59589  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59590  has_colon=`$ECHO $path | $GREP ^.:`
59591  new_path="$path"
59592  if test "x$has_colon" = x; then
59593    # Not in mixed or Windows style, start by that.
59594    new_path=`cmd //c echo $path`
59595  fi
59596
59597
59598  input_path="$new_path"
59599  # Check if we need to convert this using DOS-style short mode. If the path
59600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59601  # take no chances and rewrite it.
59602  # Note: m4 eats our [], so we need to use [ and ] instead.
59603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59604  if test "x$has_forbidden_chars" != x; then
59605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59607  fi
59608
59609
59610  windows_path="$new_path"
59611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59612    unix_path=`$CYGPATH -u "$windows_path"`
59613    new_path="$unix_path"
59614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59616    new_path="$unix_path"
59617  fi
59618
59619  if test "x$path" != "x$new_path"; then
59620    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59622$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59623  fi
59624
59625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59627
59628    else
59629      # We're on a unix platform. Hooray! :)
59630      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59631      has_space=`$ECHO "$path" | $GREP " "`
59632      if test "x$has_space" != x; then
59633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59634$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59635        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59636      fi
59637
59638      # Use eval to expand a potential ~
59639      eval path="$path"
59640      if test ! -f "$path" && test ! -d "$path"; then
59641        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59642      fi
59643
59644      if test -d "$path"; then
59645        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59646      else
59647        dir="`$DIRNAME "$path"`"
59648        base="`$BASENAME "$path"`"
59649        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59650      fi
59651    fi
59652  fi
59653
59654
59655  # Only process if variable expands to non-empty
59656
59657  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59659
59660  # Input might be given as Windows format, start by converting to
59661  # unix format.
59662  path="$POTENTIAL_FREETYPE_LIB_PATH"
59663  new_path=`$CYGPATH -u "$path"`
59664
59665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59668  # "foo.exe" is OK but "foo" is an error.
59669  #
59670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59671  # It is also a way to make sure we got the proper file name for the real test later on.
59672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59673  if test "x$test_shortpath" = x; then
59674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59675$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59676    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59677  fi
59678
59679  # Call helper function which possibly converts this using DOS-style short mode.
59680  # If so, the updated path is stored in $new_path.
59681
59682  input_path="$new_path"
59683  # Check if we need to convert this using DOS-style short mode. If the path
59684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59685  # take no chances and rewrite it.
59686  # Note: m4 eats our [], so we need to use [ and ] instead.
59687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59688  if test "x$has_forbidden_chars" != x; then
59689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59693      # Going to short mode and back again did indeed matter. Since short mode is
59694      # case insensitive, let's make it lowercase to improve readability.
59695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59696      # Now convert it back to Unix-style (cygpath)
59697      input_path=`$CYGPATH -u "$shortmode_path"`
59698      new_path="$input_path"
59699    fi
59700  fi
59701
59702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59703  if test "x$test_cygdrive_prefix" = x; then
59704    # As a simple fix, exclude /usr/bin since it's not a real path.
59705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59707      # a path prefixed by /cygdrive for fixpath to work.
59708      new_path="$CYGWIN_ROOT_PATH$input_path"
59709    fi
59710  fi
59711
59712
59713  if test "x$path" != "x$new_path"; then
59714    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59716$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59717  fi
59718
59719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59720
59721  path="$POTENTIAL_FREETYPE_LIB_PATH"
59722  has_colon=`$ECHO $path | $GREP ^.:`
59723  new_path="$path"
59724  if test "x$has_colon" = x; then
59725    # Not in mixed or Windows style, start by that.
59726    new_path=`cmd //c echo $path`
59727  fi
59728
59729
59730  input_path="$new_path"
59731  # Check if we need to convert this using DOS-style short mode. If the path
59732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59733  # take no chances and rewrite it.
59734  # Note: m4 eats our [], so we need to use [ and ] instead.
59735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59736  if test "x$has_forbidden_chars" != x; then
59737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59739  fi
59740
59741
59742  windows_path="$new_path"
59743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59744    unix_path=`$CYGPATH -u "$windows_path"`
59745    new_path="$unix_path"
59746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59748    new_path="$unix_path"
59749  fi
59750
59751  if test "x$path" != "x$new_path"; then
59752    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59754$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59755  fi
59756
59757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59759
59760    else
59761      # We're on a unix platform. Hooray! :)
59762      path="$POTENTIAL_FREETYPE_LIB_PATH"
59763      has_space=`$ECHO "$path" | $GREP " "`
59764      if test "x$has_space" != x; then
59765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59766$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59768      fi
59769
59770      # Use eval to expand a potential ~
59771      eval path="$path"
59772      if test ! -f "$path" && test ! -d "$path"; then
59773        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59774      fi
59775
59776      if test -d "$path"; then
59777        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59778      else
59779        dir="`$DIRNAME "$path"`"
59780        base="`$BASENAME "$path"`"
59781        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59782      fi
59783    fi
59784  fi
59785
59786
59787    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59789$as_echo_n "checking for freetype includes... " >&6; }
59790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59791$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59792    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59794$as_echo_n "checking for freetype libraries... " >&6; }
59795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59796$as_echo "$FREETYPE_LIB_PATH" >&6; }
59797  fi
59798
59799            fi
59800            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59801                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59802              # Source is available, as a last resort try to build freetype in default location
59803
59804  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59805  BUILD_FREETYPE=yes
59806
59807  # Check if the freetype sources are acessible..
59808  if ! test -d $FREETYPE_SRC_PATH; then
59809    { $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
59810$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59811    BUILD_FREETYPE=no
59812  fi
59813  # ..and contain a vc2010 project file
59814  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59815  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59816    { $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
59817$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59818    BUILD_FREETYPE=no
59819  fi
59820  # Now check if configure found a version of 'msbuild.exe'
59821  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59822    { $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
59823$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;}
59824    BUILD_FREETYPE=no
59825  fi
59826
59827  # Ready to go..
59828  if test "x$BUILD_FREETYPE" = xyes; then
59829    # msbuild requires trailing slashes for output directories
59830    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59831    freetype_lib_path_unix="$freetype_lib_path"
59832    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59833
59834  unix_path="$vcxproj_path"
59835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59836    windows_path=`$CYGPATH -m "$unix_path"`
59837    vcxproj_path="$windows_path"
59838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59839    windows_path=`cmd //c echo $unix_path`
59840    vcxproj_path="$windows_path"
59841  fi
59842
59843
59844  unix_path="$freetype_lib_path"
59845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59846    windows_path=`$CYGPATH -m "$unix_path"`
59847    freetype_lib_path="$windows_path"
59848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59849    windows_path=`cmd //c echo $unix_path`
59850    freetype_lib_path="$windows_path"
59851  fi
59852
59853
59854  unix_path="$freetype_obj_path"
59855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59856    windows_path=`$CYGPATH -m "$unix_path"`
59857    freetype_obj_path="$windows_path"
59858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59859    windows_path=`cmd //c echo $unix_path`
59860    freetype_obj_path="$windows_path"
59861  fi
59862
59863    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59864      freetype_platform=x64
59865    else
59866      freetype_platform=win32
59867    fi
59868
59869    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59870    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59871    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59872    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59873    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59874$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59875
59876    # First we try to build the freetype.dll
59877    $ECHO -e "@echo off\n"\
59878        "$MSBUILD $vcxproj_path "\
59879        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59880        "/p:Configuration=\"Release Multithreaded\" "\
59881        "/p:Platform=$freetype_platform "\
59882        "/p:ConfigurationType=DynamicLibrary "\
59883        "/p:TargetName=freetype "\
59884        "/p:OutDir=\"$freetype_lib_path\" "\
59885        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59886    cmd /c freetype.bat
59887
59888    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59889      # If that succeeds we also build freetype.lib
59890      $ECHO -e "@echo off\n"\
59891          "$MSBUILD $vcxproj_path "\
59892          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59893          "/p:Configuration=\"Release Multithreaded\" "\
59894          "/p:Platform=$freetype_platform "\
59895          "/p:ConfigurationType=StaticLibrary "\
59896          "/p:TargetName=freetype "\
59897          "/p:OutDir=\"$freetype_lib_path\" "\
59898          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59899      cmd /c freetype.bat
59900
59901      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59902        # Once we build both, lib and dll, set freetype lib and include path appropriately
59903        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59904        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59905        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59906$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59907      else
59908        BUILD_FREETYPE=no
59909      fi
59910    else
59911      BUILD_FREETYPE=no
59912    fi
59913  fi
59914
59915              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59916
59917  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59918  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59919  METHOD="well-known location"
59920
59921  # Let's start with an optimistic view of the world :-)
59922  FOUND_FREETYPE=yes
59923
59924  # First look for the canonical freetype main include file ft2build.h.
59925  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59926    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59927    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59928    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59929      # Fail.
59930      FOUND_FREETYPE=no
59931    fi
59932  fi
59933
59934  if test "x$FOUND_FREETYPE" = xyes; then
59935    # Include file found, let's continue the sanity check.
59936    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59937$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59938
59939    # Reset to default value
59940    FREETYPE_BASE_NAME=freetype
59941    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59942    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59943      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59944          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59945        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59946        # for the .6 version explicitly.
59947        FREETYPE_BASE_NAME=freetype.6
59948        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59949        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59950$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59951      else
59952        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59953$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59954        FOUND_FREETYPE=no
59955      fi
59956    else
59957      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59958        # On Windows, we will need both .lib and .dll file.
59959        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59960          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59961$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59962          FOUND_FREETYPE=no
59963        fi
59964      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59965          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59966        # Found lib in isa dir, use that instead.
59967        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59968        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59969$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59970      fi
59971    fi
59972  fi
59973
59974  if test "x$FOUND_FREETYPE" = xyes; then
59975
59976  # Only process if variable expands to non-empty
59977
59978  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59980
59981  # Input might be given as Windows format, start by converting to
59982  # unix format.
59983  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59984  new_path=`$CYGPATH -u "$path"`
59985
59986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59989  # "foo.exe" is OK but "foo" is an error.
59990  #
59991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59992  # It is also a way to make sure we got the proper file name for the real test later on.
59993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59994  if test "x$test_shortpath" = x; then
59995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59997    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59998  fi
59999
60000  # Call helper function which possibly converts this using DOS-style short mode.
60001  # If so, the updated path is stored in $new_path.
60002
60003  input_path="$new_path"
60004  # Check if we need to convert this using DOS-style short mode. If the path
60005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60006  # take no chances and rewrite it.
60007  # Note: m4 eats our [], so we need to use [ and ] instead.
60008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60009  if test "x$has_forbidden_chars" != x; then
60010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60014      # Going to short mode and back again did indeed matter. Since short mode is
60015      # case insensitive, let's make it lowercase to improve readability.
60016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60017      # Now convert it back to Unix-style (cygpath)
60018      input_path=`$CYGPATH -u "$shortmode_path"`
60019      new_path="$input_path"
60020    fi
60021  fi
60022
60023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60024  if test "x$test_cygdrive_prefix" = x; then
60025    # As a simple fix, exclude /usr/bin since it's not a real path.
60026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60028      # a path prefixed by /cygdrive for fixpath to work.
60029      new_path="$CYGWIN_ROOT_PATH$input_path"
60030    fi
60031  fi
60032
60033
60034  if test "x$path" != "x$new_path"; then
60035    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60037$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60038  fi
60039
60040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60041
60042  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60043  has_colon=`$ECHO $path | $GREP ^.:`
60044  new_path="$path"
60045  if test "x$has_colon" = x; then
60046    # Not in mixed or Windows style, start by that.
60047    new_path=`cmd //c echo $path`
60048  fi
60049
60050
60051  input_path="$new_path"
60052  # Check if we need to convert this using DOS-style short mode. If the path
60053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60054  # take no chances and rewrite it.
60055  # Note: m4 eats our [], so we need to use [ and ] instead.
60056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60057  if test "x$has_forbidden_chars" != x; then
60058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60060  fi
60061
60062
60063  windows_path="$new_path"
60064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60065    unix_path=`$CYGPATH -u "$windows_path"`
60066    new_path="$unix_path"
60067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60069    new_path="$unix_path"
60070  fi
60071
60072  if test "x$path" != "x$new_path"; then
60073    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60075$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60076  fi
60077
60078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60080
60081    else
60082      # We're on a unix platform. Hooray! :)
60083      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60084      has_space=`$ECHO "$path" | $GREP " "`
60085      if test "x$has_space" != x; then
60086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60087$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60089      fi
60090
60091      # Use eval to expand a potential ~
60092      eval path="$path"
60093      if test ! -f "$path" && test ! -d "$path"; then
60094        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60095      fi
60096
60097      if test -d "$path"; then
60098        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60099      else
60100        dir="`$DIRNAME "$path"`"
60101        base="`$BASENAME "$path"`"
60102        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60103      fi
60104    fi
60105  fi
60106
60107
60108  # Only process if variable expands to non-empty
60109
60110  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60112
60113  # Input might be given as Windows format, start by converting to
60114  # unix format.
60115  path="$POTENTIAL_FREETYPE_LIB_PATH"
60116  new_path=`$CYGPATH -u "$path"`
60117
60118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60121  # "foo.exe" is OK but "foo" is an error.
60122  #
60123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60124  # It is also a way to make sure we got the proper file name for the real test later on.
60125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60126  if test "x$test_shortpath" = x; then
60127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60128$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60129    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60130  fi
60131
60132  # Call helper function which possibly converts this using DOS-style short mode.
60133  # If so, the updated path is stored in $new_path.
60134
60135  input_path="$new_path"
60136  # Check if we need to convert this using DOS-style short mode. If the path
60137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60138  # take no chances and rewrite it.
60139  # Note: m4 eats our [], so we need to use [ and ] instead.
60140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60141  if test "x$has_forbidden_chars" != x; then
60142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60146      # Going to short mode and back again did indeed matter. Since short mode is
60147      # case insensitive, let's make it lowercase to improve readability.
60148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60149      # Now convert it back to Unix-style (cygpath)
60150      input_path=`$CYGPATH -u "$shortmode_path"`
60151      new_path="$input_path"
60152    fi
60153  fi
60154
60155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60156  if test "x$test_cygdrive_prefix" = x; then
60157    # As a simple fix, exclude /usr/bin since it's not a real path.
60158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60160      # a path prefixed by /cygdrive for fixpath to work.
60161      new_path="$CYGWIN_ROOT_PATH$input_path"
60162    fi
60163  fi
60164
60165
60166  if test "x$path" != "x$new_path"; then
60167    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60169$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60170  fi
60171
60172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60173
60174  path="$POTENTIAL_FREETYPE_LIB_PATH"
60175  has_colon=`$ECHO $path | $GREP ^.:`
60176  new_path="$path"
60177  if test "x$has_colon" = x; then
60178    # Not in mixed or Windows style, start by that.
60179    new_path=`cmd //c echo $path`
60180  fi
60181
60182
60183  input_path="$new_path"
60184  # Check if we need to convert this using DOS-style short mode. If the path
60185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60186  # take no chances and rewrite it.
60187  # Note: m4 eats our [], so we need to use [ and ] instead.
60188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60189  if test "x$has_forbidden_chars" != x; then
60190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60192  fi
60193
60194
60195  windows_path="$new_path"
60196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60197    unix_path=`$CYGPATH -u "$windows_path"`
60198    new_path="$unix_path"
60199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60201    new_path="$unix_path"
60202  fi
60203
60204  if test "x$path" != "x$new_path"; then
60205    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60207$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60208  fi
60209
60210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60212
60213    else
60214      # We're on a unix platform. Hooray! :)
60215      path="$POTENTIAL_FREETYPE_LIB_PATH"
60216      has_space=`$ECHO "$path" | $GREP " "`
60217      if test "x$has_space" != x; then
60218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60219$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60221      fi
60222
60223      # Use eval to expand a potential ~
60224      eval path="$path"
60225      if test ! -f "$path" && test ! -d "$path"; then
60226        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60227      fi
60228
60229      if test -d "$path"; then
60230        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60231      else
60232        dir="`$DIRNAME "$path"`"
60233        base="`$BASENAME "$path"`"
60234        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60235      fi
60236    fi
60237  fi
60238
60239
60240    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60242$as_echo_n "checking for freetype includes... " >&6; }
60243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60244$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60245    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60247$as_echo_n "checking for freetype libraries... " >&6; }
60248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60249$as_echo "$FREETYPE_LIB_PATH" >&6; }
60250  fi
60251
60252              else
60253
60254  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60255  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60256  METHOD="well-known location"
60257
60258  # Let's start with an optimistic view of the world :-)
60259  FOUND_FREETYPE=yes
60260
60261  # First look for the canonical freetype main include file ft2build.h.
60262  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60263    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60264    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60265    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60266      # Fail.
60267      FOUND_FREETYPE=no
60268    fi
60269  fi
60270
60271  if test "x$FOUND_FREETYPE" = xyes; then
60272    # Include file found, let's continue the sanity check.
60273    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60274$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60275
60276    # Reset to default value
60277    FREETYPE_BASE_NAME=freetype
60278    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60279    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60280      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60281          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60282        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60283        # for the .6 version explicitly.
60284        FREETYPE_BASE_NAME=freetype.6
60285        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60286        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60287$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60288      else
60289        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60290$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60291        FOUND_FREETYPE=no
60292      fi
60293    else
60294      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60295        # On Windows, we will need both .lib and .dll file.
60296        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60297          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60298$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60299          FOUND_FREETYPE=no
60300        fi
60301      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60302          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60303        # Found lib in isa dir, use that instead.
60304        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60305        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60306$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60307      fi
60308    fi
60309  fi
60310
60311  if test "x$FOUND_FREETYPE" = xyes; then
60312
60313  # Only process if variable expands to non-empty
60314
60315  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60317
60318  # Input might be given as Windows format, start by converting to
60319  # unix format.
60320  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60321  new_path=`$CYGPATH -u "$path"`
60322
60323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60326  # "foo.exe" is OK but "foo" is an error.
60327  #
60328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60329  # It is also a way to make sure we got the proper file name for the real test later on.
60330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60331  if test "x$test_shortpath" = x; then
60332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60333$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60334    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60335  fi
60336
60337  # Call helper function which possibly converts this using DOS-style short mode.
60338  # If so, the updated path is stored in $new_path.
60339
60340  input_path="$new_path"
60341  # Check if we need to convert this using DOS-style short mode. If the path
60342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60343  # take no chances and rewrite it.
60344  # Note: m4 eats our [], so we need to use [ and ] instead.
60345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60346  if test "x$has_forbidden_chars" != x; then
60347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60351      # Going to short mode and back again did indeed matter. Since short mode is
60352      # case insensitive, let's make it lowercase to improve readability.
60353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60354      # Now convert it back to Unix-style (cygpath)
60355      input_path=`$CYGPATH -u "$shortmode_path"`
60356      new_path="$input_path"
60357    fi
60358  fi
60359
60360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60361  if test "x$test_cygdrive_prefix" = x; then
60362    # As a simple fix, exclude /usr/bin since it's not a real path.
60363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60365      # a path prefixed by /cygdrive for fixpath to work.
60366      new_path="$CYGWIN_ROOT_PATH$input_path"
60367    fi
60368  fi
60369
60370
60371  if test "x$path" != "x$new_path"; then
60372    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60374$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60375  fi
60376
60377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60378
60379  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60380  has_colon=`$ECHO $path | $GREP ^.:`
60381  new_path="$path"
60382  if test "x$has_colon" = x; then
60383    # Not in mixed or Windows style, start by that.
60384    new_path=`cmd //c echo $path`
60385  fi
60386
60387
60388  input_path="$new_path"
60389  # Check if we need to convert this using DOS-style short mode. If the path
60390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60391  # take no chances and rewrite it.
60392  # Note: m4 eats our [], so we need to use [ and ] instead.
60393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60394  if test "x$has_forbidden_chars" != x; then
60395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60397  fi
60398
60399
60400  windows_path="$new_path"
60401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60402    unix_path=`$CYGPATH -u "$windows_path"`
60403    new_path="$unix_path"
60404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60406    new_path="$unix_path"
60407  fi
60408
60409  if test "x$path" != "x$new_path"; then
60410    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60412$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60413  fi
60414
60415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60417
60418    else
60419      # We're on a unix platform. Hooray! :)
60420      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60421      has_space=`$ECHO "$path" | $GREP " "`
60422      if test "x$has_space" != x; then
60423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60424$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60426      fi
60427
60428      # Use eval to expand a potential ~
60429      eval path="$path"
60430      if test ! -f "$path" && test ! -d "$path"; then
60431        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60432      fi
60433
60434      if test -d "$path"; then
60435        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60436      else
60437        dir="`$DIRNAME "$path"`"
60438        base="`$BASENAME "$path"`"
60439        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60440      fi
60441    fi
60442  fi
60443
60444
60445  # Only process if variable expands to non-empty
60446
60447  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60449
60450  # Input might be given as Windows format, start by converting to
60451  # unix format.
60452  path="$POTENTIAL_FREETYPE_LIB_PATH"
60453  new_path=`$CYGPATH -u "$path"`
60454
60455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60458  # "foo.exe" is OK but "foo" is an error.
60459  #
60460  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60461  # It is also a way to make sure we got the proper file name for the real test later on.
60462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60463  if test "x$test_shortpath" = x; then
60464    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60465$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60466    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60467  fi
60468
60469  # Call helper function which possibly converts this using DOS-style short mode.
60470  # If so, the updated path is stored in $new_path.
60471
60472  input_path="$new_path"
60473  # Check if we need to convert this using DOS-style short mode. If the path
60474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60475  # take no chances and rewrite it.
60476  # Note: m4 eats our [], so we need to use [ and ] instead.
60477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60478  if test "x$has_forbidden_chars" != x; then
60479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60483      # Going to short mode and back again did indeed matter. Since short mode is
60484      # case insensitive, let's make it lowercase to improve readability.
60485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60486      # Now convert it back to Unix-style (cygpath)
60487      input_path=`$CYGPATH -u "$shortmode_path"`
60488      new_path="$input_path"
60489    fi
60490  fi
60491
60492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60493  if test "x$test_cygdrive_prefix" = x; then
60494    # As a simple fix, exclude /usr/bin since it's not a real path.
60495    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60497      # a path prefixed by /cygdrive for fixpath to work.
60498      new_path="$CYGWIN_ROOT_PATH$input_path"
60499    fi
60500  fi
60501
60502
60503  if test "x$path" != "x$new_path"; then
60504    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60506$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60507  fi
60508
60509    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60510
60511  path="$POTENTIAL_FREETYPE_LIB_PATH"
60512  has_colon=`$ECHO $path | $GREP ^.:`
60513  new_path="$path"
60514  if test "x$has_colon" = x; then
60515    # Not in mixed or Windows style, start by that.
60516    new_path=`cmd //c echo $path`
60517  fi
60518
60519
60520  input_path="$new_path"
60521  # Check if we need to convert this using DOS-style short mode. If the path
60522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60523  # take no chances and rewrite it.
60524  # Note: m4 eats our [], so we need to use [ and ] instead.
60525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60526  if test "x$has_forbidden_chars" != x; then
60527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60529  fi
60530
60531
60532  windows_path="$new_path"
60533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60534    unix_path=`$CYGPATH -u "$windows_path"`
60535    new_path="$unix_path"
60536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60538    new_path="$unix_path"
60539  fi
60540
60541  if test "x$path" != "x$new_path"; then
60542    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60544$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60545  fi
60546
60547  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60548  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60549
60550    else
60551      # We're on a unix platform. Hooray! :)
60552      path="$POTENTIAL_FREETYPE_LIB_PATH"
60553      has_space=`$ECHO "$path" | $GREP " "`
60554      if test "x$has_space" != x; then
60555        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60556$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60557        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60558      fi
60559
60560      # Use eval to expand a potential ~
60561      eval path="$path"
60562      if test ! -f "$path" && test ! -d "$path"; then
60563        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60564      fi
60565
60566      if test -d "$path"; then
60567        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60568      else
60569        dir="`$DIRNAME "$path"`"
60570        base="`$BASENAME "$path"`"
60571        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60572      fi
60573    fi
60574  fi
60575
60576
60577    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60579$as_echo_n "checking for freetype includes... " >&6; }
60580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60581$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60582    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60584$as_echo_n "checking for freetype libraries... " >&6; }
60585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60586$as_echo "$FREETYPE_LIB_PATH" >&6; }
60587  fi
60588
60589              fi
60590            fi
60591          fi
60592        else
60593          FREETYPE_BASE_DIR="$SYSROOT/usr"
60594
60595  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60596  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60597  METHOD="well-known location"
60598
60599  # Let's start with an optimistic view of the world :-)
60600  FOUND_FREETYPE=yes
60601
60602  # First look for the canonical freetype main include file ft2build.h.
60603  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60604    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60605    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60606    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60607      # Fail.
60608      FOUND_FREETYPE=no
60609    fi
60610  fi
60611
60612  if test "x$FOUND_FREETYPE" = xyes; then
60613    # Include file found, let's continue the sanity check.
60614    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60615$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60616
60617    # Reset to default value
60618    FREETYPE_BASE_NAME=freetype
60619    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60620    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60621      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60622          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60623        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60624        # for the .6 version explicitly.
60625        FREETYPE_BASE_NAME=freetype.6
60626        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60627        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60628$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60629      else
60630        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60631$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60632        FOUND_FREETYPE=no
60633      fi
60634    else
60635      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60636        # On Windows, we will need both .lib and .dll file.
60637        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60638          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60639$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60640          FOUND_FREETYPE=no
60641        fi
60642      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60643          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60644        # Found lib in isa dir, use that instead.
60645        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60646        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60647$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60648      fi
60649    fi
60650  fi
60651
60652  if test "x$FOUND_FREETYPE" = xyes; then
60653
60654  # Only process if variable expands to non-empty
60655
60656  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60658
60659  # Input might be given as Windows format, start by converting to
60660  # unix format.
60661  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60662  new_path=`$CYGPATH -u "$path"`
60663
60664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60667  # "foo.exe" is OK but "foo" is an error.
60668  #
60669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60670  # It is also a way to make sure we got the proper file name for the real test later on.
60671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60672  if test "x$test_shortpath" = x; then
60673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60674$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60675    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60676  fi
60677
60678  # Call helper function which possibly converts this using DOS-style short mode.
60679  # If so, the updated path is stored in $new_path.
60680
60681  input_path="$new_path"
60682  # Check if we need to convert this using DOS-style short mode. If the path
60683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60684  # take no chances and rewrite it.
60685  # Note: m4 eats our [], so we need to use [ and ] instead.
60686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60687  if test "x$has_forbidden_chars" != x; then
60688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60692      # Going to short mode and back again did indeed matter. Since short mode is
60693      # case insensitive, let's make it lowercase to improve readability.
60694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60695      # Now convert it back to Unix-style (cygpath)
60696      input_path=`$CYGPATH -u "$shortmode_path"`
60697      new_path="$input_path"
60698    fi
60699  fi
60700
60701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60702  if test "x$test_cygdrive_prefix" = x; then
60703    # As a simple fix, exclude /usr/bin since it's not a real path.
60704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60706      # a path prefixed by /cygdrive for fixpath to work.
60707      new_path="$CYGWIN_ROOT_PATH$input_path"
60708    fi
60709  fi
60710
60711
60712  if test "x$path" != "x$new_path"; then
60713    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60715$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60716  fi
60717
60718    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60719
60720  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60721  has_colon=`$ECHO $path | $GREP ^.:`
60722  new_path="$path"
60723  if test "x$has_colon" = x; then
60724    # Not in mixed or Windows style, start by that.
60725    new_path=`cmd //c echo $path`
60726  fi
60727
60728
60729  input_path="$new_path"
60730  # Check if we need to convert this using DOS-style short mode. If the path
60731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60732  # take no chances and rewrite it.
60733  # Note: m4 eats our [], so we need to use [ and ] instead.
60734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60735  if test "x$has_forbidden_chars" != x; then
60736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60738  fi
60739
60740
60741  windows_path="$new_path"
60742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60743    unix_path=`$CYGPATH -u "$windows_path"`
60744    new_path="$unix_path"
60745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60747    new_path="$unix_path"
60748  fi
60749
60750  if test "x$path" != "x$new_path"; then
60751    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60753$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60754  fi
60755
60756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60758
60759    else
60760      # We're on a unix platform. Hooray! :)
60761      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60762      has_space=`$ECHO "$path" | $GREP " "`
60763      if test "x$has_space" != x; then
60764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60765$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60766        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60767      fi
60768
60769      # Use eval to expand a potential ~
60770      eval path="$path"
60771      if test ! -f "$path" && test ! -d "$path"; then
60772        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60773      fi
60774
60775      if test -d "$path"; then
60776        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60777      else
60778        dir="`$DIRNAME "$path"`"
60779        base="`$BASENAME "$path"`"
60780        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60781      fi
60782    fi
60783  fi
60784
60785
60786  # Only process if variable expands to non-empty
60787
60788  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60790
60791  # Input might be given as Windows format, start by converting to
60792  # unix format.
60793  path="$POTENTIAL_FREETYPE_LIB_PATH"
60794  new_path=`$CYGPATH -u "$path"`
60795
60796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60799  # "foo.exe" is OK but "foo" is an error.
60800  #
60801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60802  # It is also a way to make sure we got the proper file name for the real test later on.
60803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60804  if test "x$test_shortpath" = x; then
60805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60806$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60807    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60808  fi
60809
60810  # Call helper function which possibly converts this using DOS-style short mode.
60811  # If so, the updated path is stored in $new_path.
60812
60813  input_path="$new_path"
60814  # Check if we need to convert this using DOS-style short mode. If the path
60815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60816  # take no chances and rewrite it.
60817  # Note: m4 eats our [], so we need to use [ and ] instead.
60818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60819  if test "x$has_forbidden_chars" != x; then
60820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60824      # Going to short mode and back again did indeed matter. Since short mode is
60825      # case insensitive, let's make it lowercase to improve readability.
60826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60827      # Now convert it back to Unix-style (cygpath)
60828      input_path=`$CYGPATH -u "$shortmode_path"`
60829      new_path="$input_path"
60830    fi
60831  fi
60832
60833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60834  if test "x$test_cygdrive_prefix" = x; then
60835    # As a simple fix, exclude /usr/bin since it's not a real path.
60836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60838      # a path prefixed by /cygdrive for fixpath to work.
60839      new_path="$CYGWIN_ROOT_PATH$input_path"
60840    fi
60841  fi
60842
60843
60844  if test "x$path" != "x$new_path"; then
60845    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60847$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60848  fi
60849
60850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60851
60852  path="$POTENTIAL_FREETYPE_LIB_PATH"
60853  has_colon=`$ECHO $path | $GREP ^.:`
60854  new_path="$path"
60855  if test "x$has_colon" = x; then
60856    # Not in mixed or Windows style, start by that.
60857    new_path=`cmd //c echo $path`
60858  fi
60859
60860
60861  input_path="$new_path"
60862  # Check if we need to convert this using DOS-style short mode. If the path
60863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60864  # take no chances and rewrite it.
60865  # Note: m4 eats our [], so we need to use [ and ] instead.
60866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60867  if test "x$has_forbidden_chars" != x; then
60868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60870  fi
60871
60872
60873  windows_path="$new_path"
60874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60875    unix_path=`$CYGPATH -u "$windows_path"`
60876    new_path="$unix_path"
60877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60879    new_path="$unix_path"
60880  fi
60881
60882  if test "x$path" != "x$new_path"; then
60883    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60885$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60886  fi
60887
60888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60890
60891    else
60892      # We're on a unix platform. Hooray! :)
60893      path="$POTENTIAL_FREETYPE_LIB_PATH"
60894      has_space=`$ECHO "$path" | $GREP " "`
60895      if test "x$has_space" != x; then
60896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60897$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60899      fi
60900
60901      # Use eval to expand a potential ~
60902      eval path="$path"
60903      if test ! -f "$path" && test ! -d "$path"; then
60904        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60905      fi
60906
60907      if test -d "$path"; then
60908        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60909      else
60910        dir="`$DIRNAME "$path"`"
60911        base="`$BASENAME "$path"`"
60912        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60913      fi
60914    fi
60915  fi
60916
60917
60918    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60920$as_echo_n "checking for freetype includes... " >&6; }
60921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60922$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60923    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60925$as_echo_n "checking for freetype libraries... " >&6; }
60926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60927$as_echo "$FREETYPE_LIB_PATH" >&6; }
60928  fi
60929
60930
60931          if test "x$FOUND_FREETYPE" != xyes; then
60932            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60933
60934  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60935  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60936  METHOD="well-known location"
60937
60938  # Let's start with an optimistic view of the world :-)
60939  FOUND_FREETYPE=yes
60940
60941  # First look for the canonical freetype main include file ft2build.h.
60942  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60943    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60944    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60945    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60946      # Fail.
60947      FOUND_FREETYPE=no
60948    fi
60949  fi
60950
60951  if test "x$FOUND_FREETYPE" = xyes; then
60952    # Include file found, let's continue the sanity check.
60953    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60954$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60955
60956    # Reset to default value
60957    FREETYPE_BASE_NAME=freetype
60958    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60959    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60960      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60961          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60962        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60963        # for the .6 version explicitly.
60964        FREETYPE_BASE_NAME=freetype.6
60965        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60966        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60967$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60968      else
60969        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60970$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60971        FOUND_FREETYPE=no
60972      fi
60973    else
60974      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60975        # On Windows, we will need both .lib and .dll file.
60976        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60977          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60978$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60979          FOUND_FREETYPE=no
60980        fi
60981      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60982          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60983        # Found lib in isa dir, use that instead.
60984        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60985        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60986$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60987      fi
60988    fi
60989  fi
60990
60991  if test "x$FOUND_FREETYPE" = xyes; then
60992
60993  # Only process if variable expands to non-empty
60994
60995  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60997
60998  # Input might be given as Windows format, start by converting to
60999  # unix format.
61000  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61001  new_path=`$CYGPATH -u "$path"`
61002
61003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61006  # "foo.exe" is OK but "foo" is an error.
61007  #
61008  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61009  # It is also a way to make sure we got the proper file name for the real test later on.
61010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61011  if test "x$test_shortpath" = x; then
61012    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61013$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61014    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61015  fi
61016
61017  # Call helper function which possibly converts this using DOS-style short mode.
61018  # If so, the updated path is stored in $new_path.
61019
61020  input_path="$new_path"
61021  # Check if we need to convert this using DOS-style short mode. If the path
61022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61023  # take no chances and rewrite it.
61024  # Note: m4 eats our [], so we need to use [ and ] instead.
61025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61026  if test "x$has_forbidden_chars" != x; then
61027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61031      # Going to short mode and back again did indeed matter. Since short mode is
61032      # case insensitive, let's make it lowercase to improve readability.
61033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61034      # Now convert it back to Unix-style (cygpath)
61035      input_path=`$CYGPATH -u "$shortmode_path"`
61036      new_path="$input_path"
61037    fi
61038  fi
61039
61040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61041  if test "x$test_cygdrive_prefix" = x; then
61042    # As a simple fix, exclude /usr/bin since it's not a real path.
61043    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61045      # a path prefixed by /cygdrive for fixpath to work.
61046      new_path="$CYGWIN_ROOT_PATH$input_path"
61047    fi
61048  fi
61049
61050
61051  if test "x$path" != "x$new_path"; then
61052    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61054$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61055  fi
61056
61057    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61058
61059  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61060  has_colon=`$ECHO $path | $GREP ^.:`
61061  new_path="$path"
61062  if test "x$has_colon" = x; then
61063    # Not in mixed or Windows style, start by that.
61064    new_path=`cmd //c echo $path`
61065  fi
61066
61067
61068  input_path="$new_path"
61069  # Check if we need to convert this using DOS-style short mode. If the path
61070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61071  # take no chances and rewrite it.
61072  # Note: m4 eats our [], so we need to use [ and ] instead.
61073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61074  if test "x$has_forbidden_chars" != x; then
61075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61077  fi
61078
61079
61080  windows_path="$new_path"
61081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61082    unix_path=`$CYGPATH -u "$windows_path"`
61083    new_path="$unix_path"
61084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61086    new_path="$unix_path"
61087  fi
61088
61089  if test "x$path" != "x$new_path"; then
61090    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61092$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61093  fi
61094
61095  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61096  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61097
61098    else
61099      # We're on a unix platform. Hooray! :)
61100      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61101      has_space=`$ECHO "$path" | $GREP " "`
61102      if test "x$has_space" != x; then
61103        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61104$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61105        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61106      fi
61107
61108      # Use eval to expand a potential ~
61109      eval path="$path"
61110      if test ! -f "$path" && test ! -d "$path"; then
61111        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61112      fi
61113
61114      if test -d "$path"; then
61115        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61116      else
61117        dir="`$DIRNAME "$path"`"
61118        base="`$BASENAME "$path"`"
61119        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61120      fi
61121    fi
61122  fi
61123
61124
61125  # Only process if variable expands to non-empty
61126
61127  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61128    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61129
61130  # Input might be given as Windows format, start by converting to
61131  # unix format.
61132  path="$POTENTIAL_FREETYPE_LIB_PATH"
61133  new_path=`$CYGPATH -u "$path"`
61134
61135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61138  # "foo.exe" is OK but "foo" is an error.
61139  #
61140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61141  # It is also a way to make sure we got the proper file name for the real test later on.
61142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61143  if test "x$test_shortpath" = x; then
61144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61145$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61146    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61147  fi
61148
61149  # Call helper function which possibly converts this using DOS-style short mode.
61150  # If so, the updated path is stored in $new_path.
61151
61152  input_path="$new_path"
61153  # Check if we need to convert this using DOS-style short mode. If the path
61154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61155  # take no chances and rewrite it.
61156  # Note: m4 eats our [], so we need to use [ and ] instead.
61157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61158  if test "x$has_forbidden_chars" != x; then
61159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61163      # Going to short mode and back again did indeed matter. Since short mode is
61164      # case insensitive, let's make it lowercase to improve readability.
61165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61166      # Now convert it back to Unix-style (cygpath)
61167      input_path=`$CYGPATH -u "$shortmode_path"`
61168      new_path="$input_path"
61169    fi
61170  fi
61171
61172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61173  if test "x$test_cygdrive_prefix" = x; then
61174    # As a simple fix, exclude /usr/bin since it's not a real path.
61175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61177      # a path prefixed by /cygdrive for fixpath to work.
61178      new_path="$CYGWIN_ROOT_PATH$input_path"
61179    fi
61180  fi
61181
61182
61183  if test "x$path" != "x$new_path"; then
61184    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61186$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61187  fi
61188
61189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61190
61191  path="$POTENTIAL_FREETYPE_LIB_PATH"
61192  has_colon=`$ECHO $path | $GREP ^.:`
61193  new_path="$path"
61194  if test "x$has_colon" = x; then
61195    # Not in mixed or Windows style, start by that.
61196    new_path=`cmd //c echo $path`
61197  fi
61198
61199
61200  input_path="$new_path"
61201  # Check if we need to convert this using DOS-style short mode. If the path
61202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61203  # take no chances and rewrite it.
61204  # Note: m4 eats our [], so we need to use [ and ] instead.
61205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61206  if test "x$has_forbidden_chars" != x; then
61207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61209  fi
61210
61211
61212  windows_path="$new_path"
61213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61214    unix_path=`$CYGPATH -u "$windows_path"`
61215    new_path="$unix_path"
61216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61218    new_path="$unix_path"
61219  fi
61220
61221  if test "x$path" != "x$new_path"; then
61222    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61224$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61225  fi
61226
61227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61229
61230    else
61231      # We're on a unix platform. Hooray! :)
61232      path="$POTENTIAL_FREETYPE_LIB_PATH"
61233      has_space=`$ECHO "$path" | $GREP " "`
61234      if test "x$has_space" != x; then
61235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61236$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61237        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61238      fi
61239
61240      # Use eval to expand a potential ~
61241      eval path="$path"
61242      if test ! -f "$path" && test ! -d "$path"; then
61243        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61244      fi
61245
61246      if test -d "$path"; then
61247        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61248      else
61249        dir="`$DIRNAME "$path"`"
61250        base="`$BASENAME "$path"`"
61251        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61252      fi
61253    fi
61254  fi
61255
61256
61257    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61259$as_echo_n "checking for freetype includes... " >&6; }
61260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61261$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61262    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61264$as_echo_n "checking for freetype libraries... " >&6; }
61265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61266$as_echo "$FREETYPE_LIB_PATH" >&6; }
61267  fi
61268
61269          fi
61270
61271          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61272            if test "x$FOUND_FREETYPE" != xyes; then
61273              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61274              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61275
61276  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61277  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61278  METHOD="well-known location"
61279
61280  # Let's start with an optimistic view of the world :-)
61281  FOUND_FREETYPE=yes
61282
61283  # First look for the canonical freetype main include file ft2build.h.
61284  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61285    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61286    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61287    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61288      # Fail.
61289      FOUND_FREETYPE=no
61290    fi
61291  fi
61292
61293  if test "x$FOUND_FREETYPE" = xyes; then
61294    # Include file found, let's continue the sanity check.
61295    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61296$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61297
61298    # Reset to default value
61299    FREETYPE_BASE_NAME=freetype
61300    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61301    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61302      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61303          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61304        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61305        # for the .6 version explicitly.
61306        FREETYPE_BASE_NAME=freetype.6
61307        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61308        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61309$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61310      else
61311        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61312$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61313        FOUND_FREETYPE=no
61314      fi
61315    else
61316      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61317        # On Windows, we will need both .lib and .dll file.
61318        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61319          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61320$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61321          FOUND_FREETYPE=no
61322        fi
61323      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61324          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61325        # Found lib in isa dir, use that instead.
61326        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61327        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61328$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61329      fi
61330    fi
61331  fi
61332
61333  if test "x$FOUND_FREETYPE" = xyes; then
61334
61335  # Only process if variable expands to non-empty
61336
61337  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61339
61340  # Input might be given as Windows format, start by converting to
61341  # unix format.
61342  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61343  new_path=`$CYGPATH -u "$path"`
61344
61345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61348  # "foo.exe" is OK but "foo" is an error.
61349  #
61350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61351  # It is also a way to make sure we got the proper file name for the real test later on.
61352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61353  if test "x$test_shortpath" = x; then
61354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61355$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61356    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61357  fi
61358
61359  # Call helper function which possibly converts this using DOS-style short mode.
61360  # If so, the updated path is stored in $new_path.
61361
61362  input_path="$new_path"
61363  # Check if we need to convert this using DOS-style short mode. If the path
61364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61365  # take no chances and rewrite it.
61366  # Note: m4 eats our [], so we need to use [ and ] instead.
61367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61368  if test "x$has_forbidden_chars" != x; then
61369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61373      # Going to short mode and back again did indeed matter. Since short mode is
61374      # case insensitive, let's make it lowercase to improve readability.
61375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61376      # Now convert it back to Unix-style (cygpath)
61377      input_path=`$CYGPATH -u "$shortmode_path"`
61378      new_path="$input_path"
61379    fi
61380  fi
61381
61382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61383  if test "x$test_cygdrive_prefix" = x; then
61384    # As a simple fix, exclude /usr/bin since it's not a real path.
61385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61387      # a path prefixed by /cygdrive for fixpath to work.
61388      new_path="$CYGWIN_ROOT_PATH$input_path"
61389    fi
61390  fi
61391
61392
61393  if test "x$path" != "x$new_path"; then
61394    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61396$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61397  fi
61398
61399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61400
61401  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61402  has_colon=`$ECHO $path | $GREP ^.:`
61403  new_path="$path"
61404  if test "x$has_colon" = x; then
61405    # Not in mixed or Windows style, start by that.
61406    new_path=`cmd //c echo $path`
61407  fi
61408
61409
61410  input_path="$new_path"
61411  # Check if we need to convert this using DOS-style short mode. If the path
61412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61413  # take no chances and rewrite it.
61414  # Note: m4 eats our [], so we need to use [ and ] instead.
61415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61416  if test "x$has_forbidden_chars" != x; then
61417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61419  fi
61420
61421
61422  windows_path="$new_path"
61423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61424    unix_path=`$CYGPATH -u "$windows_path"`
61425    new_path="$unix_path"
61426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61428    new_path="$unix_path"
61429  fi
61430
61431  if test "x$path" != "x$new_path"; then
61432    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61434$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61435  fi
61436
61437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61439
61440    else
61441      # We're on a unix platform. Hooray! :)
61442      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61443      has_space=`$ECHO "$path" | $GREP " "`
61444      if test "x$has_space" != x; then
61445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61446$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61448      fi
61449
61450      # Use eval to expand a potential ~
61451      eval path="$path"
61452      if test ! -f "$path" && test ! -d "$path"; then
61453        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61454      fi
61455
61456      if test -d "$path"; then
61457        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61458      else
61459        dir="`$DIRNAME "$path"`"
61460        base="`$BASENAME "$path"`"
61461        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61462      fi
61463    fi
61464  fi
61465
61466
61467  # Only process if variable expands to non-empty
61468
61469  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61471
61472  # Input might be given as Windows format, start by converting to
61473  # unix format.
61474  path="$POTENTIAL_FREETYPE_LIB_PATH"
61475  new_path=`$CYGPATH -u "$path"`
61476
61477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61480  # "foo.exe" is OK but "foo" is an error.
61481  #
61482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61483  # It is also a way to make sure we got the proper file name for the real test later on.
61484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61485  if test "x$test_shortpath" = x; then
61486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61487$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61488    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61489  fi
61490
61491  # Call helper function which possibly converts this using DOS-style short mode.
61492  # If so, the updated path is stored in $new_path.
61493
61494  input_path="$new_path"
61495  # Check if we need to convert this using DOS-style short mode. If the path
61496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61497  # take no chances and rewrite it.
61498  # Note: m4 eats our [], so we need to use [ and ] instead.
61499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61500  if test "x$has_forbidden_chars" != x; then
61501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61505      # Going to short mode and back again did indeed matter. Since short mode is
61506      # case insensitive, let's make it lowercase to improve readability.
61507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61508      # Now convert it back to Unix-style (cygpath)
61509      input_path=`$CYGPATH -u "$shortmode_path"`
61510      new_path="$input_path"
61511    fi
61512  fi
61513
61514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61515  if test "x$test_cygdrive_prefix" = x; then
61516    # As a simple fix, exclude /usr/bin since it's not a real path.
61517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61519      # a path prefixed by /cygdrive for fixpath to work.
61520      new_path="$CYGWIN_ROOT_PATH$input_path"
61521    fi
61522  fi
61523
61524
61525  if test "x$path" != "x$new_path"; then
61526    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61528$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61529  fi
61530
61531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61532
61533  path="$POTENTIAL_FREETYPE_LIB_PATH"
61534  has_colon=`$ECHO $path | $GREP ^.:`
61535  new_path="$path"
61536  if test "x$has_colon" = x; then
61537    # Not in mixed or Windows style, start by that.
61538    new_path=`cmd //c echo $path`
61539  fi
61540
61541
61542  input_path="$new_path"
61543  # Check if we need to convert this using DOS-style short mode. If the path
61544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61545  # take no chances and rewrite it.
61546  # Note: m4 eats our [], so we need to use [ and ] instead.
61547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61548  if test "x$has_forbidden_chars" != x; then
61549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61551  fi
61552
61553
61554  windows_path="$new_path"
61555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61556    unix_path=`$CYGPATH -u "$windows_path"`
61557    new_path="$unix_path"
61558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61560    new_path="$unix_path"
61561  fi
61562
61563  if test "x$path" != "x$new_path"; then
61564    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61566$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61567  fi
61568
61569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61571
61572    else
61573      # We're on a unix platform. Hooray! :)
61574      path="$POTENTIAL_FREETYPE_LIB_PATH"
61575      has_space=`$ECHO "$path" | $GREP " "`
61576      if test "x$has_space" != x; then
61577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61578$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61580      fi
61581
61582      # Use eval to expand a potential ~
61583      eval path="$path"
61584      if test ! -f "$path" && test ! -d "$path"; then
61585        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61586      fi
61587
61588      if test -d "$path"; then
61589        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61590      else
61591        dir="`$DIRNAME "$path"`"
61592        base="`$BASENAME "$path"`"
61593        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61594      fi
61595    fi
61596  fi
61597
61598
61599    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61601$as_echo_n "checking for freetype includes... " >&6; }
61602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61603$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61604    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61606$as_echo_n "checking for freetype libraries... " >&6; }
61607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61608$as_echo "$FREETYPE_LIB_PATH" >&6; }
61609  fi
61610
61611            fi
61612          fi
61613
61614          if test "x$FOUND_FREETYPE" != xyes; then
61615            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61616
61617  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61618  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61619  METHOD="well-known location"
61620
61621  # Let's start with an optimistic view of the world :-)
61622  FOUND_FREETYPE=yes
61623
61624  # First look for the canonical freetype main include file ft2build.h.
61625  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61626    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61627    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61628    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61629      # Fail.
61630      FOUND_FREETYPE=no
61631    fi
61632  fi
61633
61634  if test "x$FOUND_FREETYPE" = xyes; then
61635    # Include file found, let's continue the sanity check.
61636    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61637$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61638
61639    # Reset to default value
61640    FREETYPE_BASE_NAME=freetype
61641    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61642    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61643      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61644          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61645        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61646        # for the .6 version explicitly.
61647        FREETYPE_BASE_NAME=freetype.6
61648        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61649        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61650$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61651      else
61652        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61653$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61654        FOUND_FREETYPE=no
61655      fi
61656    else
61657      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61658        # On Windows, we will need both .lib and .dll file.
61659        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61660          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61661$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61662          FOUND_FREETYPE=no
61663        fi
61664      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61665          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61666        # Found lib in isa dir, use that instead.
61667        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61668        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61669$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61670      fi
61671    fi
61672  fi
61673
61674  if test "x$FOUND_FREETYPE" = xyes; then
61675
61676  # Only process if variable expands to non-empty
61677
61678  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61680
61681  # Input might be given as Windows format, start by converting to
61682  # unix format.
61683  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61684  new_path=`$CYGPATH -u "$path"`
61685
61686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61689  # "foo.exe" is OK but "foo" is an error.
61690  #
61691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61692  # It is also a way to make sure we got the proper file name for the real test later on.
61693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61694  if test "x$test_shortpath" = x; then
61695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61696$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61697    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61698  fi
61699
61700  # Call helper function which possibly converts this using DOS-style short mode.
61701  # If so, the updated path is stored in $new_path.
61702
61703  input_path="$new_path"
61704  # Check if we need to convert this using DOS-style short mode. If the path
61705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61706  # take no chances and rewrite it.
61707  # Note: m4 eats our [], so we need to use [ and ] instead.
61708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61709  if test "x$has_forbidden_chars" != x; then
61710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61714      # Going to short mode and back again did indeed matter. Since short mode is
61715      # case insensitive, let's make it lowercase to improve readability.
61716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61717      # Now convert it back to Unix-style (cygpath)
61718      input_path=`$CYGPATH -u "$shortmode_path"`
61719      new_path="$input_path"
61720    fi
61721  fi
61722
61723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61724  if test "x$test_cygdrive_prefix" = x; then
61725    # As a simple fix, exclude /usr/bin since it's not a real path.
61726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61728      # a path prefixed by /cygdrive for fixpath to work.
61729      new_path="$CYGWIN_ROOT_PATH$input_path"
61730    fi
61731  fi
61732
61733
61734  if test "x$path" != "x$new_path"; then
61735    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61737$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61738  fi
61739
61740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61741
61742  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61743  has_colon=`$ECHO $path | $GREP ^.:`
61744  new_path="$path"
61745  if test "x$has_colon" = x; then
61746    # Not in mixed or Windows style, start by that.
61747    new_path=`cmd //c echo $path`
61748  fi
61749
61750
61751  input_path="$new_path"
61752  # Check if we need to convert this using DOS-style short mode. If the path
61753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61754  # take no chances and rewrite it.
61755  # Note: m4 eats our [], so we need to use [ and ] instead.
61756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61757  if test "x$has_forbidden_chars" != x; then
61758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61760  fi
61761
61762
61763  windows_path="$new_path"
61764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61765    unix_path=`$CYGPATH -u "$windows_path"`
61766    new_path="$unix_path"
61767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61769    new_path="$unix_path"
61770  fi
61771
61772  if test "x$path" != "x$new_path"; then
61773    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61775$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61776  fi
61777
61778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61780
61781    else
61782      # We're on a unix platform. Hooray! :)
61783      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61784      has_space=`$ECHO "$path" | $GREP " "`
61785      if test "x$has_space" != x; then
61786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61787$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61788        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61789      fi
61790
61791      # Use eval to expand a potential ~
61792      eval path="$path"
61793      if test ! -f "$path" && test ! -d "$path"; then
61794        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61795      fi
61796
61797      if test -d "$path"; then
61798        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61799      else
61800        dir="`$DIRNAME "$path"`"
61801        base="`$BASENAME "$path"`"
61802        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61803      fi
61804    fi
61805  fi
61806
61807
61808  # Only process if variable expands to non-empty
61809
61810  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61812
61813  # Input might be given as Windows format, start by converting to
61814  # unix format.
61815  path="$POTENTIAL_FREETYPE_LIB_PATH"
61816  new_path=`$CYGPATH -u "$path"`
61817
61818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61821  # "foo.exe" is OK but "foo" is an error.
61822  #
61823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61824  # It is also a way to make sure we got the proper file name for the real test later on.
61825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61826  if test "x$test_shortpath" = x; then
61827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61828$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61829    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61830  fi
61831
61832  # Call helper function which possibly converts this using DOS-style short mode.
61833  # If so, the updated path is stored in $new_path.
61834
61835  input_path="$new_path"
61836  # Check if we need to convert this using DOS-style short mode. If the path
61837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61838  # take no chances and rewrite it.
61839  # Note: m4 eats our [], so we need to use [ and ] instead.
61840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61841  if test "x$has_forbidden_chars" != x; then
61842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61846      # Going to short mode and back again did indeed matter. Since short mode is
61847      # case insensitive, let's make it lowercase to improve readability.
61848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61849      # Now convert it back to Unix-style (cygpath)
61850      input_path=`$CYGPATH -u "$shortmode_path"`
61851      new_path="$input_path"
61852    fi
61853  fi
61854
61855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61856  if test "x$test_cygdrive_prefix" = x; then
61857    # As a simple fix, exclude /usr/bin since it's not a real path.
61858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61860      # a path prefixed by /cygdrive for fixpath to work.
61861      new_path="$CYGWIN_ROOT_PATH$input_path"
61862    fi
61863  fi
61864
61865
61866  if test "x$path" != "x$new_path"; then
61867    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61869$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61870  fi
61871
61872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61873
61874  path="$POTENTIAL_FREETYPE_LIB_PATH"
61875  has_colon=`$ECHO $path | $GREP ^.:`
61876  new_path="$path"
61877  if test "x$has_colon" = x; then
61878    # Not in mixed or Windows style, start by that.
61879    new_path=`cmd //c echo $path`
61880  fi
61881
61882
61883  input_path="$new_path"
61884  # Check if we need to convert this using DOS-style short mode. If the path
61885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61886  # take no chances and rewrite it.
61887  # Note: m4 eats our [], so we need to use [ and ] instead.
61888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61889  if test "x$has_forbidden_chars" != x; then
61890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61892  fi
61893
61894
61895  windows_path="$new_path"
61896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61897    unix_path=`$CYGPATH -u "$windows_path"`
61898    new_path="$unix_path"
61899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61901    new_path="$unix_path"
61902  fi
61903
61904  if test "x$path" != "x$new_path"; then
61905    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61907$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61908  fi
61909
61910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61912
61913    else
61914      # We're on a unix platform. Hooray! :)
61915      path="$POTENTIAL_FREETYPE_LIB_PATH"
61916      has_space=`$ECHO "$path" | $GREP " "`
61917      if test "x$has_space" != x; then
61918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61919$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61921      fi
61922
61923      # Use eval to expand a potential ~
61924      eval path="$path"
61925      if test ! -f "$path" && test ! -d "$path"; then
61926        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61927      fi
61928
61929      if test -d "$path"; then
61930        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61931      else
61932        dir="`$DIRNAME "$path"`"
61933        base="`$BASENAME "$path"`"
61934        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61935      fi
61936    fi
61937  fi
61938
61939
61940    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61942$as_echo_n "checking for freetype includes... " >&6; }
61943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61944$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61945    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61947$as_echo_n "checking for freetype libraries... " >&6; }
61948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61949$as_echo "$FREETYPE_LIB_PATH" >&6; }
61950  fi
61951
61952          fi
61953
61954          if test "x$FOUND_FREETYPE" != xyes; then
61955            FREETYPE_BASE_DIR="$SYSROOT/usr"
61956            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61957
61958  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61959  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61960  METHOD="well-known location"
61961
61962  # Let's start with an optimistic view of the world :-)
61963  FOUND_FREETYPE=yes
61964
61965  # First look for the canonical freetype main include file ft2build.h.
61966  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61967    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61968    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61969    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61970      # Fail.
61971      FOUND_FREETYPE=no
61972    fi
61973  fi
61974
61975  if test "x$FOUND_FREETYPE" = xyes; then
61976    # Include file found, let's continue the sanity check.
61977    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61978$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61979
61980    # Reset to default value
61981    FREETYPE_BASE_NAME=freetype
61982    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61983    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61984      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61985          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61986        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61987        # for the .6 version explicitly.
61988        FREETYPE_BASE_NAME=freetype.6
61989        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61990        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61991$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61992      else
61993        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61994$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61995        FOUND_FREETYPE=no
61996      fi
61997    else
61998      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61999        # On Windows, we will need both .lib and .dll file.
62000        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62001          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62002$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62003          FOUND_FREETYPE=no
62004        fi
62005      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62006          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62007        # Found lib in isa dir, use that instead.
62008        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62009        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62010$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62011      fi
62012    fi
62013  fi
62014
62015  if test "x$FOUND_FREETYPE" = xyes; then
62016
62017  # Only process if variable expands to non-empty
62018
62019  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62021
62022  # Input might be given as Windows format, start by converting to
62023  # unix format.
62024  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62025  new_path=`$CYGPATH -u "$path"`
62026
62027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62030  # "foo.exe" is OK but "foo" is an error.
62031  #
62032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62033  # It is also a way to make sure we got the proper file name for the real test later on.
62034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62035  if test "x$test_shortpath" = x; then
62036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62037$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62038    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62039  fi
62040
62041  # Call helper function which possibly converts this using DOS-style short mode.
62042  # If so, the updated path is stored in $new_path.
62043
62044  input_path="$new_path"
62045  # Check if we need to convert this using DOS-style short mode. If the path
62046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62047  # take no chances and rewrite it.
62048  # Note: m4 eats our [], so we need to use [ and ] instead.
62049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62050  if test "x$has_forbidden_chars" != x; then
62051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62055      # Going to short mode and back again did indeed matter. Since short mode is
62056      # case insensitive, let's make it lowercase to improve readability.
62057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62058      # Now convert it back to Unix-style (cygpath)
62059      input_path=`$CYGPATH -u "$shortmode_path"`
62060      new_path="$input_path"
62061    fi
62062  fi
62063
62064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62065  if test "x$test_cygdrive_prefix" = x; then
62066    # As a simple fix, exclude /usr/bin since it's not a real path.
62067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62069      # a path prefixed by /cygdrive for fixpath to work.
62070      new_path="$CYGWIN_ROOT_PATH$input_path"
62071    fi
62072  fi
62073
62074
62075  if test "x$path" != "x$new_path"; then
62076    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62078$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62079  fi
62080
62081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62082
62083  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62084  has_colon=`$ECHO $path | $GREP ^.:`
62085  new_path="$path"
62086  if test "x$has_colon" = x; then
62087    # Not in mixed or Windows style, start by that.
62088    new_path=`cmd //c echo $path`
62089  fi
62090
62091
62092  input_path="$new_path"
62093  # Check if we need to convert this using DOS-style short mode. If the path
62094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62095  # take no chances and rewrite it.
62096  # Note: m4 eats our [], so we need to use [ and ] instead.
62097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62098  if test "x$has_forbidden_chars" != x; then
62099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62101  fi
62102
62103
62104  windows_path="$new_path"
62105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62106    unix_path=`$CYGPATH -u "$windows_path"`
62107    new_path="$unix_path"
62108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62110    new_path="$unix_path"
62111  fi
62112
62113  if test "x$path" != "x$new_path"; then
62114    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62116$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62117  fi
62118
62119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62121
62122    else
62123      # We're on a unix platform. Hooray! :)
62124      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62125      has_space=`$ECHO "$path" | $GREP " "`
62126      if test "x$has_space" != x; then
62127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62128$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62130      fi
62131
62132      # Use eval to expand a potential ~
62133      eval path="$path"
62134      if test ! -f "$path" && test ! -d "$path"; then
62135        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62136      fi
62137
62138      if test -d "$path"; then
62139        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62140      else
62141        dir="`$DIRNAME "$path"`"
62142        base="`$BASENAME "$path"`"
62143        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62144      fi
62145    fi
62146  fi
62147
62148
62149  # Only process if variable expands to non-empty
62150
62151  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62153
62154  # Input might be given as Windows format, start by converting to
62155  # unix format.
62156  path="$POTENTIAL_FREETYPE_LIB_PATH"
62157  new_path=`$CYGPATH -u "$path"`
62158
62159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62162  # "foo.exe" is OK but "foo" is an error.
62163  #
62164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62165  # It is also a way to make sure we got the proper file name for the real test later on.
62166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62167  if test "x$test_shortpath" = x; then
62168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62169$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62170    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62171  fi
62172
62173  # Call helper function which possibly converts this using DOS-style short mode.
62174  # If so, the updated path is stored in $new_path.
62175
62176  input_path="$new_path"
62177  # Check if we need to convert this using DOS-style short mode. If the path
62178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62179  # take no chances and rewrite it.
62180  # Note: m4 eats our [], so we need to use [ and ] instead.
62181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62182  if test "x$has_forbidden_chars" != x; then
62183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62187      # Going to short mode and back again did indeed matter. Since short mode is
62188      # case insensitive, let's make it lowercase to improve readability.
62189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62190      # Now convert it back to Unix-style (cygpath)
62191      input_path=`$CYGPATH -u "$shortmode_path"`
62192      new_path="$input_path"
62193    fi
62194  fi
62195
62196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62197  if test "x$test_cygdrive_prefix" = x; then
62198    # As a simple fix, exclude /usr/bin since it's not a real path.
62199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62201      # a path prefixed by /cygdrive for fixpath to work.
62202      new_path="$CYGWIN_ROOT_PATH$input_path"
62203    fi
62204  fi
62205
62206
62207  if test "x$path" != "x$new_path"; then
62208    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62211  fi
62212
62213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62214
62215  path="$POTENTIAL_FREETYPE_LIB_PATH"
62216  has_colon=`$ECHO $path | $GREP ^.:`
62217  new_path="$path"
62218  if test "x$has_colon" = x; then
62219    # Not in mixed or Windows style, start by that.
62220    new_path=`cmd //c echo $path`
62221  fi
62222
62223
62224  input_path="$new_path"
62225  # Check if we need to convert this using DOS-style short mode. If the path
62226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62227  # take no chances and rewrite it.
62228  # Note: m4 eats our [], so we need to use [ and ] instead.
62229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62230  if test "x$has_forbidden_chars" != x; then
62231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62233  fi
62234
62235
62236  windows_path="$new_path"
62237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62238    unix_path=`$CYGPATH -u "$windows_path"`
62239    new_path="$unix_path"
62240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62242    new_path="$unix_path"
62243  fi
62244
62245  if test "x$path" != "x$new_path"; then
62246    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62248$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62249  fi
62250
62251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62253
62254    else
62255      # We're on a unix platform. Hooray! :)
62256      path="$POTENTIAL_FREETYPE_LIB_PATH"
62257      has_space=`$ECHO "$path" | $GREP " "`
62258      if test "x$has_space" != x; then
62259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62260$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62261        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62262      fi
62263
62264      # Use eval to expand a potential ~
62265      eval path="$path"
62266      if test ! -f "$path" && test ! -d "$path"; then
62267        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62268      fi
62269
62270      if test -d "$path"; then
62271        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62272      else
62273        dir="`$DIRNAME "$path"`"
62274        base="`$BASENAME "$path"`"
62275        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62276      fi
62277    fi
62278  fi
62279
62280
62281    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62283$as_echo_n "checking for freetype includes... " >&6; }
62284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62285$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62286    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62288$as_echo_n "checking for freetype libraries... " >&6; }
62289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62290$as_echo "$FREETYPE_LIB_PATH" >&6; }
62291  fi
62292
62293            else
62294
62295  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62296  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62297  METHOD="well-known location"
62298
62299  # Let's start with an optimistic view of the world :-)
62300  FOUND_FREETYPE=yes
62301
62302  # First look for the canonical freetype main include file ft2build.h.
62303  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62304    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62305    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62306    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62307      # Fail.
62308      FOUND_FREETYPE=no
62309    fi
62310  fi
62311
62312  if test "x$FOUND_FREETYPE" = xyes; then
62313    # Include file found, let's continue the sanity check.
62314    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62315$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62316
62317    # Reset to default value
62318    FREETYPE_BASE_NAME=freetype
62319    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62320    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62321      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62322          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62323        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62324        # for the .6 version explicitly.
62325        FREETYPE_BASE_NAME=freetype.6
62326        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62327        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62328$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62329      else
62330        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62331$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62332        FOUND_FREETYPE=no
62333      fi
62334    else
62335      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62336        # On Windows, we will need both .lib and .dll file.
62337        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62338          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62339$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62340          FOUND_FREETYPE=no
62341        fi
62342      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62343          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62344        # Found lib in isa dir, use that instead.
62345        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62346        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62347$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62348      fi
62349    fi
62350  fi
62351
62352  if test "x$FOUND_FREETYPE" = xyes; then
62353
62354  # Only process if variable expands to non-empty
62355
62356  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62358
62359  # Input might be given as Windows format, start by converting to
62360  # unix format.
62361  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62362  new_path=`$CYGPATH -u "$path"`
62363
62364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62367  # "foo.exe" is OK but "foo" is an error.
62368  #
62369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62370  # It is also a way to make sure we got the proper file name for the real test later on.
62371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62372  if test "x$test_shortpath" = x; then
62373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62374$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62375    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62376  fi
62377
62378  # Call helper function which possibly converts this using DOS-style short mode.
62379  # If so, the updated path is stored in $new_path.
62380
62381  input_path="$new_path"
62382  # Check if we need to convert this using DOS-style short mode. If the path
62383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62384  # take no chances and rewrite it.
62385  # Note: m4 eats our [], so we need to use [ and ] instead.
62386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62387  if test "x$has_forbidden_chars" != x; then
62388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62392      # Going to short mode and back again did indeed matter. Since short mode is
62393      # case insensitive, let's make it lowercase to improve readability.
62394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62395      # Now convert it back to Unix-style (cygpath)
62396      input_path=`$CYGPATH -u "$shortmode_path"`
62397      new_path="$input_path"
62398    fi
62399  fi
62400
62401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62402  if test "x$test_cygdrive_prefix" = x; then
62403    # As a simple fix, exclude /usr/bin since it's not a real path.
62404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62406      # a path prefixed by /cygdrive for fixpath to work.
62407      new_path="$CYGWIN_ROOT_PATH$input_path"
62408    fi
62409  fi
62410
62411
62412  if test "x$path" != "x$new_path"; then
62413    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62416  fi
62417
62418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62419
62420  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62421  has_colon=`$ECHO $path | $GREP ^.:`
62422  new_path="$path"
62423  if test "x$has_colon" = x; then
62424    # Not in mixed or Windows style, start by that.
62425    new_path=`cmd //c echo $path`
62426  fi
62427
62428
62429  input_path="$new_path"
62430  # Check if we need to convert this using DOS-style short mode. If the path
62431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62432  # take no chances and rewrite it.
62433  # Note: m4 eats our [], so we need to use [ and ] instead.
62434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62435  if test "x$has_forbidden_chars" != x; then
62436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62438  fi
62439
62440
62441  windows_path="$new_path"
62442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62443    unix_path=`$CYGPATH -u "$windows_path"`
62444    new_path="$unix_path"
62445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62447    new_path="$unix_path"
62448  fi
62449
62450  if test "x$path" != "x$new_path"; then
62451    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62454  fi
62455
62456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62458
62459    else
62460      # We're on a unix platform. Hooray! :)
62461      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62462      has_space=`$ECHO "$path" | $GREP " "`
62463      if test "x$has_space" != x; then
62464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62465$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62467      fi
62468
62469      # Use eval to expand a potential ~
62470      eval path="$path"
62471      if test ! -f "$path" && test ! -d "$path"; then
62472        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62473      fi
62474
62475      if test -d "$path"; then
62476        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62477      else
62478        dir="`$DIRNAME "$path"`"
62479        base="`$BASENAME "$path"`"
62480        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62481      fi
62482    fi
62483  fi
62484
62485
62486  # Only process if variable expands to non-empty
62487
62488  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62490
62491  # Input might be given as Windows format, start by converting to
62492  # unix format.
62493  path="$POTENTIAL_FREETYPE_LIB_PATH"
62494  new_path=`$CYGPATH -u "$path"`
62495
62496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62499  # "foo.exe" is OK but "foo" is an error.
62500  #
62501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62502  # It is also a way to make sure we got the proper file name for the real test later on.
62503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62504  if test "x$test_shortpath" = x; then
62505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62508  fi
62509
62510  # Call helper function which possibly converts this using DOS-style short mode.
62511  # If so, the updated path is stored in $new_path.
62512
62513  input_path="$new_path"
62514  # Check if we need to convert this using DOS-style short mode. If the path
62515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62516  # take no chances and rewrite it.
62517  # Note: m4 eats our [], so we need to use [ and ] instead.
62518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62519  if test "x$has_forbidden_chars" != x; then
62520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62524      # Going to short mode and back again did indeed matter. Since short mode is
62525      # case insensitive, let's make it lowercase to improve readability.
62526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62527      # Now convert it back to Unix-style (cygpath)
62528      input_path=`$CYGPATH -u "$shortmode_path"`
62529      new_path="$input_path"
62530    fi
62531  fi
62532
62533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62534  if test "x$test_cygdrive_prefix" = x; then
62535    # As a simple fix, exclude /usr/bin since it's not a real path.
62536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62538      # a path prefixed by /cygdrive for fixpath to work.
62539      new_path="$CYGWIN_ROOT_PATH$input_path"
62540    fi
62541  fi
62542
62543
62544  if test "x$path" != "x$new_path"; then
62545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62548  fi
62549
62550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62551
62552  path="$POTENTIAL_FREETYPE_LIB_PATH"
62553  has_colon=`$ECHO $path | $GREP ^.:`
62554  new_path="$path"
62555  if test "x$has_colon" = x; then
62556    # Not in mixed or Windows style, start by that.
62557    new_path=`cmd //c echo $path`
62558  fi
62559
62560
62561  input_path="$new_path"
62562  # Check if we need to convert this using DOS-style short mode. If the path
62563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62564  # take no chances and rewrite it.
62565  # Note: m4 eats our [], so we need to use [ and ] instead.
62566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62567  if test "x$has_forbidden_chars" != x; then
62568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62570  fi
62571
62572
62573  windows_path="$new_path"
62574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62575    unix_path=`$CYGPATH -u "$windows_path"`
62576    new_path="$unix_path"
62577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62579    new_path="$unix_path"
62580  fi
62581
62582  if test "x$path" != "x$new_path"; then
62583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62586  fi
62587
62588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62590
62591    else
62592      # We're on a unix platform. Hooray! :)
62593      path="$POTENTIAL_FREETYPE_LIB_PATH"
62594      has_space=`$ECHO "$path" | $GREP " "`
62595      if test "x$has_space" != x; then
62596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62598        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62599      fi
62600
62601      # Use eval to expand a potential ~
62602      eval path="$path"
62603      if test ! -f "$path" && test ! -d "$path"; then
62604        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62605      fi
62606
62607      if test -d "$path"; then
62608        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62609      else
62610        dir="`$DIRNAME "$path"`"
62611        base="`$BASENAME "$path"`"
62612        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62613      fi
62614    fi
62615  fi
62616
62617
62618    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62620$as_echo_n "checking for freetype includes... " >&6; }
62621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62622$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62623    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62625$as_echo_n "checking for freetype libraries... " >&6; }
62626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62627$as_echo "$FREETYPE_LIB_PATH" >&6; }
62628  fi
62629
62630              if test "x$FOUND_FREETYPE" != xyes; then
62631
62632  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62633  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62634  METHOD="well-known location"
62635
62636  # Let's start with an optimistic view of the world :-)
62637  FOUND_FREETYPE=yes
62638
62639  # First look for the canonical freetype main include file ft2build.h.
62640  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62641    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62642    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62643    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62644      # Fail.
62645      FOUND_FREETYPE=no
62646    fi
62647  fi
62648
62649  if test "x$FOUND_FREETYPE" = xyes; then
62650    # Include file found, let's continue the sanity check.
62651    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62652$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62653
62654    # Reset to default value
62655    FREETYPE_BASE_NAME=freetype
62656    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62657    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62658      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62659          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62660        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62661        # for the .6 version explicitly.
62662        FREETYPE_BASE_NAME=freetype.6
62663        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62664        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62665$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62666      else
62667        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62668$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62669        FOUND_FREETYPE=no
62670      fi
62671    else
62672      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62673        # On Windows, we will need both .lib and .dll file.
62674        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62675          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62676$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62677          FOUND_FREETYPE=no
62678        fi
62679      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62680          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62681        # Found lib in isa dir, use that instead.
62682        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62683        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62684$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62685      fi
62686    fi
62687  fi
62688
62689  if test "x$FOUND_FREETYPE" = xyes; then
62690
62691  # Only process if variable expands to non-empty
62692
62693  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62695
62696  # Input might be given as Windows format, start by converting to
62697  # unix format.
62698  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62699  new_path=`$CYGPATH -u "$path"`
62700
62701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62704  # "foo.exe" is OK but "foo" is an error.
62705  #
62706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62707  # It is also a way to make sure we got the proper file name for the real test later on.
62708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62709  if test "x$test_shortpath" = x; then
62710    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62711$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62712    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62713  fi
62714
62715  # Call helper function which possibly converts this using DOS-style short mode.
62716  # If so, the updated path is stored in $new_path.
62717
62718  input_path="$new_path"
62719  # Check if we need to convert this using DOS-style short mode. If the path
62720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62721  # take no chances and rewrite it.
62722  # Note: m4 eats our [], so we need to use [ and ] instead.
62723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62724  if test "x$has_forbidden_chars" != x; then
62725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62729      # Going to short mode and back again did indeed matter. Since short mode is
62730      # case insensitive, let's make it lowercase to improve readability.
62731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62732      # Now convert it back to Unix-style (cygpath)
62733      input_path=`$CYGPATH -u "$shortmode_path"`
62734      new_path="$input_path"
62735    fi
62736  fi
62737
62738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62739  if test "x$test_cygdrive_prefix" = x; then
62740    # As a simple fix, exclude /usr/bin since it's not a real path.
62741    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62743      # a path prefixed by /cygdrive for fixpath to work.
62744      new_path="$CYGWIN_ROOT_PATH$input_path"
62745    fi
62746  fi
62747
62748
62749  if test "x$path" != "x$new_path"; then
62750    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62752$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62753  fi
62754
62755    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62756
62757  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62758  has_colon=`$ECHO $path | $GREP ^.:`
62759  new_path="$path"
62760  if test "x$has_colon" = x; then
62761    # Not in mixed or Windows style, start by that.
62762    new_path=`cmd //c echo $path`
62763  fi
62764
62765
62766  input_path="$new_path"
62767  # Check if we need to convert this using DOS-style short mode. If the path
62768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62769  # take no chances and rewrite it.
62770  # Note: m4 eats our [], so we need to use [ and ] instead.
62771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62772  if test "x$has_forbidden_chars" != x; then
62773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62775  fi
62776
62777
62778  windows_path="$new_path"
62779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62780    unix_path=`$CYGPATH -u "$windows_path"`
62781    new_path="$unix_path"
62782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62784    new_path="$unix_path"
62785  fi
62786
62787  if test "x$path" != "x$new_path"; then
62788    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62790$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62791  fi
62792
62793  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62794  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62795
62796    else
62797      # We're on a unix platform. Hooray! :)
62798      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62799      has_space=`$ECHO "$path" | $GREP " "`
62800      if test "x$has_space" != x; then
62801        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62802$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62803        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62804      fi
62805
62806      # Use eval to expand a potential ~
62807      eval path="$path"
62808      if test ! -f "$path" && test ! -d "$path"; then
62809        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62810      fi
62811
62812      if test -d "$path"; then
62813        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62814      else
62815        dir="`$DIRNAME "$path"`"
62816        base="`$BASENAME "$path"`"
62817        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62818      fi
62819    fi
62820  fi
62821
62822
62823  # Only process if variable expands to non-empty
62824
62825  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62827
62828  # Input might be given as Windows format, start by converting to
62829  # unix format.
62830  path="$POTENTIAL_FREETYPE_LIB_PATH"
62831  new_path=`$CYGPATH -u "$path"`
62832
62833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62836  # "foo.exe" is OK but "foo" is an error.
62837  #
62838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62839  # It is also a way to make sure we got the proper file name for the real test later on.
62840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62841  if test "x$test_shortpath" = x; then
62842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62843$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62844    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62845  fi
62846
62847  # Call helper function which possibly converts this using DOS-style short mode.
62848  # If so, the updated path is stored in $new_path.
62849
62850  input_path="$new_path"
62851  # Check if we need to convert this using DOS-style short mode. If the path
62852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62853  # take no chances and rewrite it.
62854  # Note: m4 eats our [], so we need to use [ and ] instead.
62855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62856  if test "x$has_forbidden_chars" != x; then
62857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62861      # Going to short mode and back again did indeed matter. Since short mode is
62862      # case insensitive, let's make it lowercase to improve readability.
62863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62864      # Now convert it back to Unix-style (cygpath)
62865      input_path=`$CYGPATH -u "$shortmode_path"`
62866      new_path="$input_path"
62867    fi
62868  fi
62869
62870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62871  if test "x$test_cygdrive_prefix" = x; then
62872    # As a simple fix, exclude /usr/bin since it's not a real path.
62873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62875      # a path prefixed by /cygdrive for fixpath to work.
62876      new_path="$CYGWIN_ROOT_PATH$input_path"
62877    fi
62878  fi
62879
62880
62881  if test "x$path" != "x$new_path"; then
62882    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62884$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62885  fi
62886
62887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62888
62889  path="$POTENTIAL_FREETYPE_LIB_PATH"
62890  has_colon=`$ECHO $path | $GREP ^.:`
62891  new_path="$path"
62892  if test "x$has_colon" = x; then
62893    # Not in mixed or Windows style, start by that.
62894    new_path=`cmd //c echo $path`
62895  fi
62896
62897
62898  input_path="$new_path"
62899  # Check if we need to convert this using DOS-style short mode. If the path
62900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62901  # take no chances and rewrite it.
62902  # Note: m4 eats our [], so we need to use [ and ] instead.
62903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62904  if test "x$has_forbidden_chars" != x; then
62905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62907  fi
62908
62909
62910  windows_path="$new_path"
62911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62912    unix_path=`$CYGPATH -u "$windows_path"`
62913    new_path="$unix_path"
62914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62916    new_path="$unix_path"
62917  fi
62918
62919  if test "x$path" != "x$new_path"; then
62920    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62922$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62923  fi
62924
62925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62927
62928    else
62929      # We're on a unix platform. Hooray! :)
62930      path="$POTENTIAL_FREETYPE_LIB_PATH"
62931      has_space=`$ECHO "$path" | $GREP " "`
62932      if test "x$has_space" != x; then
62933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62934$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62936      fi
62937
62938      # Use eval to expand a potential ~
62939      eval path="$path"
62940      if test ! -f "$path" && test ! -d "$path"; then
62941        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62942      fi
62943
62944      if test -d "$path"; then
62945        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62946      else
62947        dir="`$DIRNAME "$path"`"
62948        base="`$BASENAME "$path"`"
62949        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62950      fi
62951    fi
62952  fi
62953
62954
62955    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62957$as_echo_n "checking for freetype includes... " >&6; }
62958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62959$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62960    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62962$as_echo_n "checking for freetype libraries... " >&6; }
62963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62964$as_echo "$FREETYPE_LIB_PATH" >&6; }
62965  fi
62966
62967              fi
62968            fi
62969          fi
62970        fi
62971      fi # end check in well-known locations
62972
62973      if test "x$FOUND_FREETYPE" != xyes; then
62974
62975  # Print a helpful message on how to acquire the necessary build dependency.
62976  # freetype is the help tag: freetype, cups, alsa etc
62977  MISSING_DEPENDENCY=freetype
62978
62979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62980    cygwin_help $MISSING_DEPENDENCY
62981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62982    msys_help $MISSING_DEPENDENCY
62983  else
62984    PKGHANDLER_COMMAND=
62985
62986    case $PKGHANDLER in
62987      apt-get)
62988        apt_help     $MISSING_DEPENDENCY ;;
62989      yum)
62990        yum_help     $MISSING_DEPENDENCY ;;
62991      port)
62992        port_help    $MISSING_DEPENDENCY ;;
62993      pkgutil)
62994        pkgutil_help $MISSING_DEPENDENCY ;;
62995      pkgadd)
62996        pkgadd_help  $MISSING_DEPENDENCY ;;
62997    esac
62998
62999    if test "x$PKGHANDLER_COMMAND" != x; then
63000      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63001    fi
63002  fi
63003
63004        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63005      fi
63006    fi # end user specified settings
63007
63008    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63009    if test "x$FREETYPE_CFLAGS" = x; then
63010
63011  # Only process if variable expands to non-empty
63012
63013  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63015
63016  # Input might be given as Windows format, start by converting to
63017  # unix format.
63018  path="$FREETYPE_INCLUDE_PATH"
63019  new_path=`$CYGPATH -u "$path"`
63020
63021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63024  # "foo.exe" is OK but "foo" is an error.
63025  #
63026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63027  # It is also a way to make sure we got the proper file name for the real test later on.
63028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63029  if test "x$test_shortpath" = x; then
63030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63031$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63032    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63033  fi
63034
63035  # Call helper function which possibly converts this using DOS-style short mode.
63036  # If so, the updated path is stored in $new_path.
63037
63038  input_path="$new_path"
63039  # Check if we need to convert this using DOS-style short mode. If the path
63040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63041  # take no chances and rewrite it.
63042  # Note: m4 eats our [], so we need to use [ and ] instead.
63043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63044  if test "x$has_forbidden_chars" != x; then
63045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63049      # Going to short mode and back again did indeed matter. Since short mode is
63050      # case insensitive, let's make it lowercase to improve readability.
63051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63052      # Now convert it back to Unix-style (cygpath)
63053      input_path=`$CYGPATH -u "$shortmode_path"`
63054      new_path="$input_path"
63055    fi
63056  fi
63057
63058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63059  if test "x$test_cygdrive_prefix" = x; then
63060    # As a simple fix, exclude /usr/bin since it's not a real path.
63061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63063      # a path prefixed by /cygdrive for fixpath to work.
63064      new_path="$CYGWIN_ROOT_PATH$input_path"
63065    fi
63066  fi
63067
63068
63069  if test "x$path" != "x$new_path"; then
63070    FREETYPE_INCLUDE_PATH="$new_path"
63071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63072$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63073  fi
63074
63075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63076
63077  path="$FREETYPE_INCLUDE_PATH"
63078  has_colon=`$ECHO $path | $GREP ^.:`
63079  new_path="$path"
63080  if test "x$has_colon" = x; then
63081    # Not in mixed or Windows style, start by that.
63082    new_path=`cmd //c echo $path`
63083  fi
63084
63085
63086  input_path="$new_path"
63087  # Check if we need to convert this using DOS-style short mode. If the path
63088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63089  # take no chances and rewrite it.
63090  # Note: m4 eats our [], so we need to use [ and ] instead.
63091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63092  if test "x$has_forbidden_chars" != x; then
63093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63095  fi
63096
63097
63098  windows_path="$new_path"
63099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63100    unix_path=`$CYGPATH -u "$windows_path"`
63101    new_path="$unix_path"
63102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63104    new_path="$unix_path"
63105  fi
63106
63107  if test "x$path" != "x$new_path"; then
63108    FREETYPE_INCLUDE_PATH="$new_path"
63109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63110$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63111  fi
63112
63113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63115
63116    else
63117      # We're on a unix platform. Hooray! :)
63118      path="$FREETYPE_INCLUDE_PATH"
63119      has_space=`$ECHO "$path" | $GREP " "`
63120      if test "x$has_space" != x; then
63121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63122$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63123        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63124      fi
63125
63126      # Use eval to expand a potential ~
63127      eval path="$path"
63128      if test ! -f "$path" && test ! -d "$path"; then
63129        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63130      fi
63131
63132      if test -d "$path"; then
63133        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63134      else
63135        dir="`$DIRNAME "$path"`"
63136        base="`$BASENAME "$path"`"
63137        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63138      fi
63139    fi
63140  fi
63141
63142      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63143        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63144      else
63145        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63146      fi
63147    fi
63148
63149    if test "x$FREETYPE_LIBS" = x; then
63150
63151  # Only process if variable expands to non-empty
63152
63153  if test "x$FREETYPE_LIB_PATH" != x; then
63154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63155
63156  # Input might be given as Windows format, start by converting to
63157  # unix format.
63158  path="$FREETYPE_LIB_PATH"
63159  new_path=`$CYGPATH -u "$path"`
63160
63161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63164  # "foo.exe" is OK but "foo" is an error.
63165  #
63166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63167  # It is also a way to make sure we got the proper file name for the real test later on.
63168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63169  if test "x$test_shortpath" = x; then
63170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63171$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63172    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63173  fi
63174
63175  # Call helper function which possibly converts this using DOS-style short mode.
63176  # If so, the updated path is stored in $new_path.
63177
63178  input_path="$new_path"
63179  # Check if we need to convert this using DOS-style short mode. If the path
63180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63181  # take no chances and rewrite it.
63182  # Note: m4 eats our [], so we need to use [ and ] instead.
63183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63184  if test "x$has_forbidden_chars" != x; then
63185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63189      # Going to short mode and back again did indeed matter. Since short mode is
63190      # case insensitive, let's make it lowercase to improve readability.
63191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63192      # Now convert it back to Unix-style (cygpath)
63193      input_path=`$CYGPATH -u "$shortmode_path"`
63194      new_path="$input_path"
63195    fi
63196  fi
63197
63198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63199  if test "x$test_cygdrive_prefix" = x; then
63200    # As a simple fix, exclude /usr/bin since it's not a real path.
63201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63203      # a path prefixed by /cygdrive for fixpath to work.
63204      new_path="$CYGWIN_ROOT_PATH$input_path"
63205    fi
63206  fi
63207
63208
63209  if test "x$path" != "x$new_path"; then
63210    FREETYPE_LIB_PATH="$new_path"
63211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63212$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63213  fi
63214
63215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63216
63217  path="$FREETYPE_LIB_PATH"
63218  has_colon=`$ECHO $path | $GREP ^.:`
63219  new_path="$path"
63220  if test "x$has_colon" = x; then
63221    # Not in mixed or Windows style, start by that.
63222    new_path=`cmd //c echo $path`
63223  fi
63224
63225
63226  input_path="$new_path"
63227  # Check if we need to convert this using DOS-style short mode. If the path
63228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63229  # take no chances and rewrite it.
63230  # Note: m4 eats our [], so we need to use [ and ] instead.
63231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63232  if test "x$has_forbidden_chars" != x; then
63233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63235  fi
63236
63237
63238  windows_path="$new_path"
63239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63240    unix_path=`$CYGPATH -u "$windows_path"`
63241    new_path="$unix_path"
63242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63244    new_path="$unix_path"
63245  fi
63246
63247  if test "x$path" != "x$new_path"; then
63248    FREETYPE_LIB_PATH="$new_path"
63249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63250$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63251  fi
63252
63253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63255
63256    else
63257      # We're on a unix platform. Hooray! :)
63258      path="$FREETYPE_LIB_PATH"
63259      has_space=`$ECHO "$path" | $GREP " "`
63260      if test "x$has_space" != x; then
63261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63262$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63264      fi
63265
63266      # Use eval to expand a potential ~
63267      eval path="$path"
63268      if test ! -f "$path" && test ! -d "$path"; then
63269        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63270      fi
63271
63272      if test -d "$path"; then
63273        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63274      else
63275        dir="`$DIRNAME "$path"`"
63276        base="`$BASENAME "$path"`"
63277        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63278      fi
63279    fi
63280  fi
63281
63282      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63283        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63284      else
63285        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63286      fi
63287    fi
63288
63289    # Try to compile it
63290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63291$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63292    ac_ext=cpp
63293ac_cpp='$CXXCPP $CPPFLAGS'
63294ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63295ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63296ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63297
63298    PREV_CXXCFLAGS="$CXXFLAGS"
63299    PREV_LIBS="$LIBS"
63300    PREV_CXX="$CXX"
63301    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63302    LIBS="$LIBS $FREETYPE_LIBS"
63303    CXX="$FIXPATH $CXX"
63304    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63305/* end confdefs.h.  */
63306
63307          #include<ft2build.h>
63308          #include FT_FREETYPE_H
63309          int main () {
63310            FT_Init_FreeType(NULL);
63311            return 0;
63312          }
63313
63314_ACEOF
63315if ac_fn_cxx_try_link "$LINENO"; then :
63316
63317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63318$as_echo "yes" >&6; }
63319
63320else
63321
63322          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63323$as_echo "no" >&6; }
63324          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63325$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63326          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63327$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63328
63329
63330  # Print a helpful message on how to acquire the necessary build dependency.
63331  # freetype is the help tag: freetype, cups, alsa etc
63332  MISSING_DEPENDENCY=freetype
63333
63334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63335    cygwin_help $MISSING_DEPENDENCY
63336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63337    msys_help $MISSING_DEPENDENCY
63338  else
63339    PKGHANDLER_COMMAND=
63340
63341    case $PKGHANDLER in
63342      apt-get)
63343        apt_help     $MISSING_DEPENDENCY ;;
63344      yum)
63345        yum_help     $MISSING_DEPENDENCY ;;
63346      port)
63347        port_help    $MISSING_DEPENDENCY ;;
63348      pkgutil)
63349        pkgutil_help $MISSING_DEPENDENCY ;;
63350      pkgadd)
63351        pkgadd_help  $MISSING_DEPENDENCY ;;
63352    esac
63353
63354    if test "x$PKGHANDLER_COMMAND" != x; then
63355      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63356    fi
63357  fi
63358
63359
63360          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63361
63362
63363fi
63364rm -f core conftest.err conftest.$ac_objext \
63365    conftest$ac_exeext conftest.$ac_ext
63366    CXXCFLAGS="$PREV_CXXFLAGS"
63367    LIBS="$PREV_LIBS"
63368    CXX="$PREV_CXX"
63369    ac_ext=cpp
63370ac_cpp='$CXXCPP $CPPFLAGS'
63371ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63372ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63373ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63374
63375
63376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63377$as_echo_n "checking if we should bundle freetype... " >&6; }
63378    if test "x$BUNDLE_FREETYPE" = xyes; then
63379      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63380    fi
63381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63382$as_echo "$BUNDLE_FREETYPE" >&6; }
63383
63384  fi # end freetype needed
63385
63386
63387
63388
63389
63390
63391
63392# Check whether --with-alsa was given.
63393if test "${with_alsa+set}" = set; then :
63394  withval=$with_alsa;
63395fi
63396
63397
63398# Check whether --with-alsa-include was given.
63399if test "${with_alsa_include+set}" = set; then :
63400  withval=$with_alsa_include;
63401fi
63402
63403
63404# Check whether --with-alsa-lib was given.
63405if test "${with_alsa_lib+set}" = set; then :
63406  withval=$with_alsa_lib;
63407fi
63408
63409
63410  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63411    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63412        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63413        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63414      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63415$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63416    fi
63417    ALSA_CFLAGS=
63418    ALSA_LIBS=
63419  else
63420    ALSA_FOUND=no
63421
63422    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63423      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63424    fi
63425
63426    if test "x${with_alsa}" != x; then
63427      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63428      ALSA_CFLAGS="-I${with_alsa}/include"
63429      ALSA_FOUND=yes
63430    fi
63431    if test "x${with_alsa_include}" != x; then
63432      ALSA_CFLAGS="-I${with_alsa_include}"
63433      ALSA_FOUND=yes
63434    fi
63435    if test "x${with_alsa_lib}" != x; then
63436      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63437      ALSA_FOUND=yes
63438    fi
63439    # Do not try pkg-config if we have a sysroot set.
63440    if test "x$SYSROOT" = x; then
63441      if test "x$ALSA_FOUND" = xno; then
63442
63443pkg_failed=no
63444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63445$as_echo_n "checking for ALSA... " >&6; }
63446
63447if test -n "$ALSA_CFLAGS"; then
63448    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63449 elif test -n "$PKG_CONFIG"; then
63450    if test -n "$PKG_CONFIG" && \
63451    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63452  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63453  ac_status=$?
63454  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63455  test $ac_status = 0; }; then
63456  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63457else
63458  pkg_failed=yes
63459fi
63460 else
63461    pkg_failed=untried
63462fi
63463if test -n "$ALSA_LIBS"; then
63464    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63465 elif test -n "$PKG_CONFIG"; then
63466    if test -n "$PKG_CONFIG" && \
63467    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63468  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63469  ac_status=$?
63470  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63471  test $ac_status = 0; }; then
63472  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63473else
63474  pkg_failed=yes
63475fi
63476 else
63477    pkg_failed=untried
63478fi
63479
63480
63481
63482if test $pkg_failed = yes; then
63483
63484if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63485        _pkg_short_errors_supported=yes
63486else
63487        _pkg_short_errors_supported=no
63488fi
63489        if test $_pkg_short_errors_supported = yes; then
63490	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63491        else
63492	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63493        fi
63494	# Put the nasty error message in config.log where it belongs
63495	echo "$ALSA_PKG_ERRORS" >&5
63496
63497	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63498$as_echo "no" >&6; }
63499                ALSA_FOUND=no
63500elif test $pkg_failed = untried; then
63501	ALSA_FOUND=no
63502else
63503	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63504	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63506$as_echo "yes" >&6; }
63507	ALSA_FOUND=yes
63508fi
63509      fi
63510    fi
63511    if test "x$ALSA_FOUND" = xno; then
63512      for ac_header in alsa/asoundlib.h
63513do :
63514  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63515if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63516  cat >>confdefs.h <<_ACEOF
63517#define HAVE_ALSA_ASOUNDLIB_H 1
63518_ACEOF
63519
63520            ALSA_FOUND=yes
63521            ALSA_CFLAGS=-Iignoreme
63522            ALSA_LIBS=-lasound
63523            DEFAULT_ALSA=yes
63524
63525else
63526  ALSA_FOUND=no
63527
63528fi
63529
63530done
63531
63532    fi
63533    if test "x$ALSA_FOUND" = xno; then
63534
63535  # Print a helpful message on how to acquire the necessary build dependency.
63536  # alsa is the help tag: freetype, cups, alsa etc
63537  MISSING_DEPENDENCY=alsa
63538
63539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63540    cygwin_help $MISSING_DEPENDENCY
63541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63542    msys_help $MISSING_DEPENDENCY
63543  else
63544    PKGHANDLER_COMMAND=
63545
63546    case $PKGHANDLER in
63547      apt-get)
63548        apt_help     $MISSING_DEPENDENCY ;;
63549      yum)
63550        yum_help     $MISSING_DEPENDENCY ;;
63551      port)
63552        port_help    $MISSING_DEPENDENCY ;;
63553      pkgutil)
63554        pkgutil_help $MISSING_DEPENDENCY ;;
63555      pkgadd)
63556        pkgadd_help  $MISSING_DEPENDENCY ;;
63557    esac
63558
63559    if test "x$PKGHANDLER_COMMAND" != x; then
63560      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63561    fi
63562  fi
63563
63564      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63565    fi
63566  fi
63567
63568
63569
63570
63571
63572
63573# Check whether --with-libffi was given.
63574if test "${with_libffi+set}" = set; then :
63575  withval=$with_libffi;
63576fi
63577
63578
63579# Check whether --with-libffi-include was given.
63580if test "${with_libffi_include+set}" = set; then :
63581  withval=$with_libffi_include;
63582fi
63583
63584
63585# Check whether --with-libffi-lib was given.
63586if test "${with_libffi_lib+set}" = set; then :
63587  withval=$with_libffi_lib;
63588fi
63589
63590
63591  if test "x$NEEDS_LIB_FFI" = xfalse; then
63592    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63593        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63594        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63595      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63596$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63597    fi
63598    LIBFFI_CFLAGS=
63599    LIBFFI_LIBS=
63600  else
63601    LIBFFI_FOUND=no
63602
63603    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63604      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63605    fi
63606
63607    if test "x${with_libffi}" != x; then
63608      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63609      LIBFFI_CFLAGS="-I${with_libffi}/include"
63610      LIBFFI_FOUND=yes
63611    fi
63612    if test "x${with_libffi_include}" != x; then
63613      LIBFFI_CFLAGS="-I${with_libffi_include}"
63614      LIBFFI_FOUND=yes
63615    fi
63616    if test "x${with_libffi_lib}" != x; then
63617      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63618      LIBFFI_FOUND=yes
63619    fi
63620    # Do not try pkg-config if we have a sysroot set.
63621    if test "x$SYSROOT" = x; then
63622      if test "x$LIBFFI_FOUND" = xno; then
63623        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63624
63625pkg_failed=no
63626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63627$as_echo_n "checking for LIBFFI... " >&6; }
63628
63629if test -n "$LIBFFI_CFLAGS"; then
63630    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63631 elif test -n "$PKG_CONFIG"; then
63632    if test -n "$PKG_CONFIG" && \
63633    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63634  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63635  ac_status=$?
63636  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63637  test $ac_status = 0; }; then
63638  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63639else
63640  pkg_failed=yes
63641fi
63642 else
63643    pkg_failed=untried
63644fi
63645if test -n "$LIBFFI_LIBS"; then
63646    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63647 elif test -n "$PKG_CONFIG"; then
63648    if test -n "$PKG_CONFIG" && \
63649    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63650  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63651  ac_status=$?
63652  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63653  test $ac_status = 0; }; then
63654  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63655else
63656  pkg_failed=yes
63657fi
63658 else
63659    pkg_failed=untried
63660fi
63661
63662
63663
63664if test $pkg_failed = yes; then
63665
63666if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63667        _pkg_short_errors_supported=yes
63668else
63669        _pkg_short_errors_supported=no
63670fi
63671        if test $_pkg_short_errors_supported = yes; then
63672	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63673        else
63674	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63675        fi
63676	# Put the nasty error message in config.log where it belongs
63677	echo "$LIBFFI_PKG_ERRORS" >&5
63678
63679	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63680$as_echo "no" >&6; }
63681                LIBFFI_FOUND=no
63682elif test $pkg_failed = untried; then
63683	LIBFFI_FOUND=no
63684else
63685	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63686	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63688$as_echo "yes" >&6; }
63689	LIBFFI_FOUND=yes
63690fi
63691      fi
63692    fi
63693    if test "x$LIBFFI_FOUND" = xno; then
63694      for ac_header in ffi.h
63695do :
63696  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63697if test "x$ac_cv_header_ffi_h" = xyes; then :
63698  cat >>confdefs.h <<_ACEOF
63699#define HAVE_FFI_H 1
63700_ACEOF
63701
63702            LIBFFI_FOUND=yes
63703            LIBFFI_CFLAGS=
63704            LIBFFI_LIBS=-lffi
63705
63706else
63707  LIBFFI_FOUND=no
63708
63709fi
63710
63711done
63712
63713    fi
63714    if test "x$LIBFFI_FOUND" = xno; then
63715
63716  # Print a helpful message on how to acquire the necessary build dependency.
63717  # ffi is the help tag: freetype, cups, alsa etc
63718  MISSING_DEPENDENCY=ffi
63719
63720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63721    cygwin_help $MISSING_DEPENDENCY
63722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63723    msys_help $MISSING_DEPENDENCY
63724  else
63725    PKGHANDLER_COMMAND=
63726
63727    case $PKGHANDLER in
63728      apt-get)
63729        apt_help     $MISSING_DEPENDENCY ;;
63730      yum)
63731        yum_help     $MISSING_DEPENDENCY ;;
63732      port)
63733        port_help    $MISSING_DEPENDENCY ;;
63734      pkgutil)
63735        pkgutil_help $MISSING_DEPENDENCY ;;
63736      pkgadd)
63737        pkgadd_help  $MISSING_DEPENDENCY ;;
63738    esac
63739
63740    if test "x$PKGHANDLER_COMMAND" != x; then
63741      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63742    fi
63743  fi
63744
63745      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63746    fi
63747
63748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63749$as_echo_n "checking if libffi works... " >&6; }
63750    ac_ext=c
63751ac_cpp='$CPP $CPPFLAGS'
63752ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63753ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63754ac_compiler_gnu=$ac_cv_c_compiler_gnu
63755
63756    OLD_CFLAGS="$CFLAGS"
63757    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63758    OLD_LIBS="$LIBS"
63759    LIBS="$LIBS $LIBFFI_LIBS"
63760    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63761/* end confdefs.h.  */
63762#include <ffi.h>
63763int
63764main ()
63765{
63766
63767          ffi_call(NULL, NULL, NULL, NULL);
63768          return 0;
63769
63770  ;
63771  return 0;
63772}
63773_ACEOF
63774if ac_fn_c_try_link "$LINENO"; then :
63775  LIBFFI_WORKS=yes
63776else
63777  LIBFFI_WORKS=no
63778
63779fi
63780rm -f core conftest.err conftest.$ac_objext \
63781    conftest$ac_exeext conftest.$ac_ext
63782    CFLAGS="$OLD_CFLAGS"
63783    LIBS="$OLD_LIBS"
63784    ac_ext=cpp
63785ac_cpp='$CXXCPP $CPPFLAGS'
63786ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63787ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63788ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63789
63790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63791$as_echo "$LIBFFI_WORKS" >&6; }
63792
63793    if test "x$LIBFFI_WORKS" = xno; then
63794
63795  # Print a helpful message on how to acquire the necessary build dependency.
63796  # ffi is the help tag: freetype, cups, alsa etc
63797  MISSING_DEPENDENCY=ffi
63798
63799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63800    cygwin_help $MISSING_DEPENDENCY
63801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63802    msys_help $MISSING_DEPENDENCY
63803  else
63804    PKGHANDLER_COMMAND=
63805
63806    case $PKGHANDLER in
63807      apt-get)
63808        apt_help     $MISSING_DEPENDENCY ;;
63809      yum)
63810        yum_help     $MISSING_DEPENDENCY ;;
63811      port)
63812        port_help    $MISSING_DEPENDENCY ;;
63813      pkgutil)
63814        pkgutil_help $MISSING_DEPENDENCY ;;
63815      pkgadd)
63816        pkgadd_help  $MISSING_DEPENDENCY ;;
63817    esac
63818
63819    if test "x$PKGHANDLER_COMMAND" != x; then
63820      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63821    fi
63822  fi
63823
63824      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63825    fi
63826  fi
63827
63828
63829
63830
63831
63832  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63833    # Extract the first word of "llvm-config", so it can be a program name with args.
63834set dummy llvm-config; ac_word=$2
63835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63836$as_echo_n "checking for $ac_word... " >&6; }
63837if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63838  $as_echo_n "(cached) " >&6
63839else
63840  if test -n "$LLVM_CONFIG"; then
63841  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63842else
63843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63844for as_dir in $PATH
63845do
63846  IFS=$as_save_IFS
63847  test -z "$as_dir" && as_dir=.
63848    for ac_exec_ext in '' $ac_executable_extensions; do
63849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63850    ac_cv_prog_LLVM_CONFIG="llvm-config"
63851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63852    break 2
63853  fi
63854done
63855  done
63856IFS=$as_save_IFS
63857
63858fi
63859fi
63860LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63861if test -n "$LLVM_CONFIG"; then
63862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63863$as_echo "$LLVM_CONFIG" >&6; }
63864else
63865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63866$as_echo "no" >&6; }
63867fi
63868
63869
63870
63871    if test "x$LLVM_CONFIG" != xllvm-config; then
63872      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63873    fi
63874
63875    llvm_components="jit mcjit engine nativecodegen native"
63876    unset LLVM_CFLAGS
63877    for flag in $("$LLVM_CONFIG" --cxxflags); do
63878      if echo "${flag}" | grep -q '^-[ID]'; then
63879        if test "${flag}" != "-D_DEBUG" ; then
63880          if test "${LLVM_CFLAGS}" != "" ; then
63881            LLVM_CFLAGS="${LLVM_CFLAGS} "
63882          fi
63883          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63884        fi
63885      fi
63886    done
63887    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63888    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63889
63890    unset LLVM_LDFLAGS
63891    for flag in $("${LLVM_CONFIG}" --ldflags); do
63892      if echo "${flag}" | grep -q '^-L'; then
63893        if test "${LLVM_LDFLAGS}" != ""; then
63894          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63895        fi
63896        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63897      fi
63898    done
63899
63900    unset LLVM_LIBS
63901    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63902      if echo "${flag}" | grep -q '^-l'; then
63903        if test "${LLVM_LIBS}" != ""; then
63904          LLVM_LIBS="${LLVM_LIBS} "
63905        fi
63906        LLVM_LIBS="${LLVM_LIBS}${flag}"
63907      fi
63908    done
63909
63910    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63911    # always properly detect -ltinfo
63912    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63913
63914
63915
63916
63917  fi
63918
63919
63920
63921# Check whether --with-libjpeg was given.
63922if test "${with_libjpeg+set}" = set; then :
63923  withval=$with_libjpeg;
63924fi
63925
63926
63927  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63928$as_echo_n "checking for which libjpeg to use... " >&6; }
63929  # default is bundled
63930  DEFAULT_LIBJPEG=bundled
63931  # if user didn't specify, use DEFAULT_LIBJPEG
63932  if test "x${with_libjpeg}" = "x"; then
63933    with_libjpeg=${DEFAULT_LIBJPEG}
63934  fi
63935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63936$as_echo "${with_libjpeg}" >&6; }
63937
63938  if test "x${with_libjpeg}" = "xbundled"; then
63939    USE_EXTERNAL_LIBJPEG=false
63940  elif test "x${with_libjpeg}" = "xsystem"; then
63941    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63942if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63943
63944else
63945   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63946fi
63947
63948
63949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63950$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63951if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63952  $as_echo_n "(cached) " >&6
63953else
63954  ac_check_lib_save_LIBS=$LIBS
63955LIBS="-ljpeg  $LIBS"
63956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63957/* end confdefs.h.  */
63958
63959/* Override any GCC internal prototype to avoid an error.
63960   Use char because int might match the return type of a GCC
63961   builtin and then its argument prototype would still apply.  */
63962#ifdef __cplusplus
63963extern "C"
63964#endif
63965char jpeg_CreateDecompress ();
63966int
63967main ()
63968{
63969return jpeg_CreateDecompress ();
63970  ;
63971  return 0;
63972}
63973_ACEOF
63974if ac_fn_cxx_try_link "$LINENO"; then :
63975  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63976else
63977  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63978fi
63979rm -f core conftest.err conftest.$ac_objext \
63980    conftest$ac_exeext conftest.$ac_ext
63981LIBS=$ac_check_lib_save_LIBS
63982fi
63983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63984$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63985if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63986  cat >>confdefs.h <<_ACEOF
63987#define HAVE_LIBJPEG 1
63988_ACEOF
63989
63990  LIBS="-ljpeg $LIBS"
63991
63992else
63993   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63994fi
63995
63996
63997    USE_EXTERNAL_LIBJPEG=true
63998  else
63999    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64000  fi
64001
64002
64003
64004
64005
64006# Check whether --with-giflib was given.
64007if test "${with_giflib+set}" = set; then :
64008  withval=$with_giflib;
64009fi
64010
64011
64012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64013$as_echo_n "checking for which giflib to use... " >&6; }
64014  # default is bundled
64015  DEFAULT_GIFLIB=bundled
64016  # if user didn't specify, use DEFAULT_GIFLIB
64017  if test "x${with_giflib}" = "x"; then
64018    with_giflib=${DEFAULT_GIFLIB}
64019  fi
64020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64021$as_echo "${with_giflib}" >&6; }
64022
64023  if test "x${with_giflib}" = "xbundled"; then
64024    USE_EXTERNAL_LIBGIF=false
64025  elif test "x${with_giflib}" = "xsystem"; then
64026    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64027if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64028
64029else
64030   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64031fi
64032
64033
64034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64035$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64036if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64037  $as_echo_n "(cached) " >&6
64038else
64039  ac_check_lib_save_LIBS=$LIBS
64040LIBS="-lgif  $LIBS"
64041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64042/* end confdefs.h.  */
64043
64044/* Override any GCC internal prototype to avoid an error.
64045   Use char because int might match the return type of a GCC
64046   builtin and then its argument prototype would still apply.  */
64047#ifdef __cplusplus
64048extern "C"
64049#endif
64050char DGifGetCode ();
64051int
64052main ()
64053{
64054return DGifGetCode ();
64055  ;
64056  return 0;
64057}
64058_ACEOF
64059if ac_fn_cxx_try_link "$LINENO"; then :
64060  ac_cv_lib_gif_DGifGetCode=yes
64061else
64062  ac_cv_lib_gif_DGifGetCode=no
64063fi
64064rm -f core conftest.err conftest.$ac_objext \
64065    conftest$ac_exeext conftest.$ac_ext
64066LIBS=$ac_check_lib_save_LIBS
64067fi
64068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64069$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64070if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64071  cat >>confdefs.h <<_ACEOF
64072#define HAVE_LIBGIF 1
64073_ACEOF
64074
64075  LIBS="-lgif $LIBS"
64076
64077else
64078   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64079fi
64080
64081
64082    USE_EXTERNAL_LIBGIF=true
64083  else
64084    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64085  fi
64086
64087
64088
64089
64090
64091# Check whether --with-libpng was given.
64092if test "${with_libpng+set}" = set; then :
64093  withval=$with_libpng;
64094fi
64095
64096
64097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64098$as_echo_n "checking for which libpng to use... " >&6; }
64099
64100  # default is bundled
64101  DEFAULT_LIBPNG=bundled
64102  # if user didn't specify, use DEFAULT_LIBPNG
64103  if test "x${with_libpng}" = "x"; then
64104      with_libpng=${DEFAULT_LIBPNG}
64105  fi
64106
64107  if test "x${with_libpng}" = "xbundled"; then
64108      USE_EXTERNAL_LIBPNG=false
64109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64110$as_echo "bundled" >&6; }
64111  elif test "x${with_libpng}" = "xsystem"; then
64112
64113pkg_failed=no
64114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64115$as_echo_n "checking for PNG... " >&6; }
64116
64117if test -n "$PNG_CFLAGS"; then
64118    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64119 elif test -n "$PKG_CONFIG"; then
64120    if test -n "$PKG_CONFIG" && \
64121    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64122  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64123  ac_status=$?
64124  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64125  test $ac_status = 0; }; then
64126  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64127else
64128  pkg_failed=yes
64129fi
64130 else
64131    pkg_failed=untried
64132fi
64133if test -n "$PNG_LIBS"; then
64134    pkg_cv_PNG_LIBS="$PNG_LIBS"
64135 elif test -n "$PKG_CONFIG"; then
64136    if test -n "$PKG_CONFIG" && \
64137    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64138  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64139  ac_status=$?
64140  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64141  test $ac_status = 0; }; then
64142  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64143else
64144  pkg_failed=yes
64145fi
64146 else
64147    pkg_failed=untried
64148fi
64149
64150
64151
64152if test $pkg_failed = yes; then
64153
64154if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64155        _pkg_short_errors_supported=yes
64156else
64157        _pkg_short_errors_supported=no
64158fi
64159        if test $_pkg_short_errors_supported = yes; then
64160	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64161        else
64162	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64163        fi
64164	# Put the nasty error message in config.log where it belongs
64165	echo "$PNG_PKG_ERRORS" >&5
64166
64167	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64168$as_echo "no" >&6; }
64169                 LIBPNG_FOUND=no
64170elif test $pkg_failed = untried; then
64171	 LIBPNG_FOUND=no
64172else
64173	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64174	PNG_LIBS=$pkg_cv_PNG_LIBS
64175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64176$as_echo "yes" >&6; }
64177	 LIBPNG_FOUND=yes
64178fi
64179      if test "x${LIBPNG_FOUND}" = "xyes"; then
64180          USE_EXTERNAL_LIBPNG=true
64181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64182$as_echo "system" >&6; }
64183      else
64184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64185$as_echo "system not found" >&6; }
64186          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64187      fi
64188  else
64189      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64190  fi
64191
64192
64193
64194
64195
64196# Check whether --with-zlib was given.
64197if test "${with_zlib+set}" = set; then :
64198  withval=$with_zlib;
64199fi
64200
64201
64202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64203$as_echo_n "checking for compress in -lz... " >&6; }
64204if ${ac_cv_lib_z_compress+:} false; then :
64205  $as_echo_n "(cached) " >&6
64206else
64207  ac_check_lib_save_LIBS=$LIBS
64208LIBS="-lz  $LIBS"
64209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64210/* end confdefs.h.  */
64211
64212/* Override any GCC internal prototype to avoid an error.
64213   Use char because int might match the return type of a GCC
64214   builtin and then its argument prototype would still apply.  */
64215#ifdef __cplusplus
64216extern "C"
64217#endif
64218char compress ();
64219int
64220main ()
64221{
64222return compress ();
64223  ;
64224  return 0;
64225}
64226_ACEOF
64227if ac_fn_cxx_try_link "$LINENO"; then :
64228  ac_cv_lib_z_compress=yes
64229else
64230  ac_cv_lib_z_compress=no
64231fi
64232rm -f core conftest.err conftest.$ac_objext \
64233    conftest$ac_exeext conftest.$ac_ext
64234LIBS=$ac_check_lib_save_LIBS
64235fi
64236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64237$as_echo "$ac_cv_lib_z_compress" >&6; }
64238if test "x$ac_cv_lib_z_compress" = xyes; then :
64239   ZLIB_FOUND=yes
64240else
64241   ZLIB_FOUND=no
64242fi
64243
64244
64245  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64246$as_echo_n "checking for which zlib to use... " >&6; }
64247
64248  DEFAULT_ZLIB=system
64249  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64250    # On windows default is bundled...on others default is system
64251    DEFAULT_ZLIB=bundled
64252  fi
64253
64254  if test "x${ZLIB_FOUND}" != "xyes"; then
64255    # If we don't find any system...set default to bundled
64256    DEFAULT_ZLIB=bundled
64257  fi
64258
64259  # If user didn't specify, use DEFAULT_ZLIB
64260  if test "x${with_zlib}" = "x"; then
64261    with_zlib=${DEFAULT_ZLIB}
64262  fi
64263
64264  if test "x${with_zlib}" = "xbundled"; then
64265    USE_EXTERNAL_LIBZ=false
64266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64267$as_echo "bundled" >&6; }
64268  elif test "x${with_zlib}" = "xsystem"; then
64269    if test "x${ZLIB_FOUND}" = "xyes"; then
64270      USE_EXTERNAL_LIBZ=true
64271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64272$as_echo "system" >&6; }
64273    else
64274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64275$as_echo "system not found" >&6; }
64276      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64277    fi
64278  else
64279    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64280  fi
64281
64282
64283
64284
64285
64286# Check whether --with-lcms was given.
64287if test "${with_lcms+set}" = set; then :
64288  withval=$with_lcms;
64289fi
64290
64291
64292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64293$as_echo_n "checking for which lcms to use... " >&6; }
64294
64295  DEFAULT_LCMS=bundled
64296  # If user didn't specify, use DEFAULT_LCMS
64297  if test "x${with_lcms}" = "x"; then
64298      with_lcms=${DEFAULT_LCMS}
64299  fi
64300
64301  if test "x${with_lcms}" = "xbundled"; then
64302    USE_EXTERNAL_LCMS=false
64303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64304$as_echo "bundled" >&6; }
64305  elif test "x${with_lcms}" = "xsystem"; then
64306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64307$as_echo "system" >&6; }
64308
64309pkg_failed=no
64310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64311$as_echo_n "checking for LCMS... " >&6; }
64312
64313if test -n "$LCMS_CFLAGS"; then
64314    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64315 elif test -n "$PKG_CONFIG"; then
64316    if test -n "$PKG_CONFIG" && \
64317    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64318  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64319  ac_status=$?
64320  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64321  test $ac_status = 0; }; then
64322  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64323else
64324  pkg_failed=yes
64325fi
64326 else
64327    pkg_failed=untried
64328fi
64329if test -n "$LCMS_LIBS"; then
64330    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64331 elif test -n "$PKG_CONFIG"; then
64332    if test -n "$PKG_CONFIG" && \
64333    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64334  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64335  ac_status=$?
64336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64337  test $ac_status = 0; }; then
64338  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64339else
64340  pkg_failed=yes
64341fi
64342 else
64343    pkg_failed=untried
64344fi
64345
64346
64347
64348if test $pkg_failed = yes; then
64349
64350if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64351        _pkg_short_errors_supported=yes
64352else
64353        _pkg_short_errors_supported=no
64354fi
64355        if test $_pkg_short_errors_supported = yes; then
64356	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64357        else
64358	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64359        fi
64360	# Put the nasty error message in config.log where it belongs
64361	echo "$LCMS_PKG_ERRORS" >&5
64362
64363	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64364$as_echo "no" >&6; }
64365                LCMS_FOUND=no
64366elif test $pkg_failed = untried; then
64367	LCMS_FOUND=no
64368else
64369	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64370	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64372$as_echo "yes" >&6; }
64373	LCMS_FOUND=yes
64374fi
64375    if test "x${LCMS_FOUND}" = "xyes"; then
64376      USE_EXTERNAL_LCMS=true
64377    else
64378      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64379    fi
64380  else
64381    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64382  fi
64383
64384
64385
64386
64387
64388
64389
64390
64391
64392
64393
64394  # Setup libm (the maths library)
64395  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64397$as_echo_n "checking for cos in -lm... " >&6; }
64398if ${ac_cv_lib_m_cos+:} false; then :
64399  $as_echo_n "(cached) " >&6
64400else
64401  ac_check_lib_save_LIBS=$LIBS
64402LIBS="-lm  $LIBS"
64403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64404/* end confdefs.h.  */
64405
64406/* Override any GCC internal prototype to avoid an error.
64407   Use char because int might match the return type of a GCC
64408   builtin and then its argument prototype would still apply.  */
64409#ifdef __cplusplus
64410extern "C"
64411#endif
64412char cos ();
64413int
64414main ()
64415{
64416return cos ();
64417  ;
64418  return 0;
64419}
64420_ACEOF
64421if ac_fn_cxx_try_link "$LINENO"; then :
64422  ac_cv_lib_m_cos=yes
64423else
64424  ac_cv_lib_m_cos=no
64425fi
64426rm -f core conftest.err conftest.$ac_objext \
64427    conftest$ac_exeext conftest.$ac_ext
64428LIBS=$ac_check_lib_save_LIBS
64429fi
64430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64431$as_echo "$ac_cv_lib_m_cos" >&6; }
64432if test "x$ac_cv_lib_m_cos" = xyes; then :
64433  cat >>confdefs.h <<_ACEOF
64434#define HAVE_LIBM 1
64435_ACEOF
64436
64437  LIBS="-lm $LIBS"
64438
64439else
64440
64441        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64442$as_echo "$as_me: Maths library was not found" >&6;}
64443
64444fi
64445
64446    LIBM="-lm"
64447  else
64448    LIBM=""
64449  fi
64450
64451
64452  # Setup libdl (for dynamic library loading)
64453  save_LIBS="$LIBS"
64454  LIBS=""
64455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64456$as_echo_n "checking for dlopen in -ldl... " >&6; }
64457if ${ac_cv_lib_dl_dlopen+:} false; then :
64458  $as_echo_n "(cached) " >&6
64459else
64460  ac_check_lib_save_LIBS=$LIBS
64461LIBS="-ldl  $LIBS"
64462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64463/* end confdefs.h.  */
64464
64465/* Override any GCC internal prototype to avoid an error.
64466   Use char because int might match the return type of a GCC
64467   builtin and then its argument prototype would still apply.  */
64468#ifdef __cplusplus
64469extern "C"
64470#endif
64471char dlopen ();
64472int
64473main ()
64474{
64475return dlopen ();
64476  ;
64477  return 0;
64478}
64479_ACEOF
64480if ac_fn_cxx_try_link "$LINENO"; then :
64481  ac_cv_lib_dl_dlopen=yes
64482else
64483  ac_cv_lib_dl_dlopen=no
64484fi
64485rm -f core conftest.err conftest.$ac_objext \
64486    conftest$ac_exeext conftest.$ac_ext
64487LIBS=$ac_check_lib_save_LIBS
64488fi
64489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64490$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64491if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64492  cat >>confdefs.h <<_ACEOF
64493#define HAVE_LIBDL 1
64494_ACEOF
64495
64496  LIBS="-ldl $LIBS"
64497
64498fi
64499
64500  LIBDL="$LIBS"
64501
64502  LIBS="$save_LIBS"
64503
64504  # Deprecated libraries, keep the flags for backwards compatibility
64505  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64506
64507
64508# Check whether --with-dxsdk was given.
64509if test "${with_dxsdk+set}" = set; then :
64510  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64511$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64512fi
64513
64514
64515
64516
64517# Check whether --with-dxsdk-lib was given.
64518if test "${with_dxsdk_lib+set}" = set; then :
64519  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64520$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64521fi
64522
64523
64524
64525
64526# Check whether --with-dxsdk-include was given.
64527if test "${with_dxsdk_include+set}" = set; then :
64528  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64529$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64530fi
64531
64532
64533  fi
64534
64535  # Control if libzip can use mmap. Available for purposes of overriding.
64536  LIBZIP_CAN_USE_MMAP=true
64537
64538
64539
64540  if test "$OPENJDK_TARGET_OS" = "solaris"; then
64541    # Find the root of the Solaris Studio installation from the compiler path
64542    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64543    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64545$as_echo_n "checking for libstlport.so.1... " >&6; }
64546    if test -f "$STLPORT_LIB"; then
64547      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64548$as_echo "yes, $STLPORT_LIB" >&6; }
64549
64550  # Only process if variable expands to non-empty
64551
64552  if test "x$STLPORT_LIB" != x; then
64553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64554
64555  # Input might be given as Windows format, start by converting to
64556  # unix format.
64557  path="$STLPORT_LIB"
64558  new_path=`$CYGPATH -u "$path"`
64559
64560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64563  # "foo.exe" is OK but "foo" is an error.
64564  #
64565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64566  # It is also a way to make sure we got the proper file name for the real test later on.
64567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64568  if test "x$test_shortpath" = x; then
64569    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64570$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64571    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64572  fi
64573
64574  # Call helper function which possibly converts this using DOS-style short mode.
64575  # If so, the updated path is stored in $new_path.
64576
64577  input_path="$new_path"
64578  # Check if we need to convert this using DOS-style short mode. If the path
64579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64580  # take no chances and rewrite it.
64581  # Note: m4 eats our [], so we need to use [ and ] instead.
64582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64583  if test "x$has_forbidden_chars" != x; then
64584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64588      # Going to short mode and back again did indeed matter. Since short mode is
64589      # case insensitive, let's make it lowercase to improve readability.
64590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64591      # Now convert it back to Unix-style (cygpath)
64592      input_path=`$CYGPATH -u "$shortmode_path"`
64593      new_path="$input_path"
64594    fi
64595  fi
64596
64597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64598  if test "x$test_cygdrive_prefix" = x; then
64599    # As a simple fix, exclude /usr/bin since it's not a real path.
64600    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64602      # a path prefixed by /cygdrive for fixpath to work.
64603      new_path="$CYGWIN_ROOT_PATH$input_path"
64604    fi
64605  fi
64606
64607
64608  if test "x$path" != "x$new_path"; then
64609    STLPORT_LIB="$new_path"
64610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64611$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64612  fi
64613
64614    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64615
64616  path="$STLPORT_LIB"
64617  has_colon=`$ECHO $path | $GREP ^.:`
64618  new_path="$path"
64619  if test "x$has_colon" = x; then
64620    # Not in mixed or Windows style, start by that.
64621    new_path=`cmd //c echo $path`
64622  fi
64623
64624
64625  input_path="$new_path"
64626  # Check if we need to convert this using DOS-style short mode. If the path
64627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64628  # take no chances and rewrite it.
64629  # Note: m4 eats our [], so we need to use [ and ] instead.
64630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64631  if test "x$has_forbidden_chars" != x; then
64632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64634  fi
64635
64636
64637  windows_path="$new_path"
64638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64639    unix_path=`$CYGPATH -u "$windows_path"`
64640    new_path="$unix_path"
64641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64643    new_path="$unix_path"
64644  fi
64645
64646  if test "x$path" != "x$new_path"; then
64647    STLPORT_LIB="$new_path"
64648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64649$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64650  fi
64651
64652  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64653  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64654
64655    else
64656      # We're on a unix platform. Hooray! :)
64657      path="$STLPORT_LIB"
64658      has_space=`$ECHO "$path" | $GREP " "`
64659      if test "x$has_space" != x; then
64660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64661$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64662        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64663      fi
64664
64665      # Use eval to expand a potential ~
64666      eval path="$path"
64667      if test ! -f "$path" && test ! -d "$path"; then
64668        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64669      fi
64670
64671      if test -d "$path"; then
64672        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64673      else
64674        dir="`$DIRNAME "$path"`"
64675        base="`$BASENAME "$path"`"
64676        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64677      fi
64678    fi
64679  fi
64680
64681    else
64682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64683$as_echo "no, not found at $STLPORT_LIB" >&6; }
64684      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64685    fi
64686
64687  fi
64688
64689
64690
64691
64692
64693
64694
64695
64696
64697
64698
64699
64700
64701
64702###############################################################################
64703#
64704# We need to do some final tweaking, when everything else is done.
64705#
64706###############################################################################
64707
64708
64709  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64710$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64711
64712  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64713    ENABLE_INTREE_EC=yes
64714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64715$as_echo "yes" >&6; }
64716  else
64717    ENABLE_INTREE_EC=no
64718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64719$as_echo "no" >&6; }
64720  fi
64721
64722
64723
64724
64725  # Check whether --enable-jtreg-failure-handler was given.
64726if test "${enable_jtreg_failure_handler+set}" = set; then :
64727  enableval=$enable_jtreg_failure_handler;
64728fi
64729
64730
64731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64732$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64733
64734  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64735    if test "x$JT_HOME" = "x"; then
64736      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64737    else
64738      BUILD_FAILURE_HANDLER=true
64739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64740$as_echo "yes, forced" >&6; }
64741    fi
64742  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64743    BUILD_FAILURE_HANDLER=false
64744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64745$as_echo "no, forced" >&6; }
64746  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64747      || test "x$enable_jtreg_failure_handler" = "x"; then
64748    if test "x$JT_HOME" = "x"; then
64749      BUILD_FAILURE_HANDLER=false
64750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64751$as_echo "no, missing jtreg" >&6; }
64752    else
64753      BUILD_FAILURE_HANDLER=true
64754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64755$as_echo "yes, jtreg present" >&6; }
64756    fi
64757  else
64758    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64759  fi
64760
64761
64762
64763
64764###############################################################################
64765#
64766# Configure parts of the build that only affect the build performance,
64767# not the result.
64768#
64769###############################################################################
64770
64771
64772  # How many cores do we have on this build system?
64773
64774# Check whether --with-num-cores was given.
64775if test "${with_num_cores+set}" = set; then :
64776  withval=$with_num_cores;
64777fi
64778
64779  if test "x$with_num_cores" = x; then
64780    # The number of cores were not specified, try to probe them.
64781
64782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64783$as_echo_n "checking for number of cores... " >&6; }
64784  NUM_CORES=1
64785  FOUND_CORES=no
64786
64787  if test -f /proc/cpuinfo; then
64788    # Looks like a Linux (or cygwin) system
64789    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64790    FOUND_CORES=yes
64791  elif test -x /usr/sbin/psrinfo; then
64792    # Looks like a Solaris system
64793    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64794    FOUND_CORES=yes
64795  elif test -x /usr/sbin/sysctl; then
64796    # Looks like a MacOSX system
64797    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64798    FOUND_CORES=yes
64799  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64800    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64801    FOUND_CORES=yes
64802  elif test -n "$NUMBER_OF_PROCESSORS"; then
64803    # On windows, look in the env
64804    NUM_CORES=$NUMBER_OF_PROCESSORS
64805    FOUND_CORES=yes
64806  fi
64807
64808  if test "x$FOUND_CORES" = xyes; then
64809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64810$as_echo "$NUM_CORES" >&6; }
64811  else
64812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64813$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64814    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64815$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64816  fi
64817
64818  else
64819    NUM_CORES=$with_num_cores
64820  fi
64821
64822
64823
64824  # How much memory do we have on this build system?
64825
64826# Check whether --with-memory-size was given.
64827if test "${with_memory_size+set}" = set; then :
64828  withval=$with_memory_size;
64829fi
64830
64831  if test "x$with_memory_size" = x; then
64832    # The memory size was not specified, try to probe it.
64833
64834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64835$as_echo_n "checking for memory size... " >&6; }
64836  # Default to 1024 MB
64837  MEMORY_SIZE=1024
64838  FOUND_MEM=no
64839
64840  if test -f /proc/meminfo; then
64841    # Looks like a Linux (or cygwin) system
64842    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64843    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64844    FOUND_MEM=yes
64845  elif test -x /usr/sbin/prtconf; then
64846    # Looks like a Solaris or AIX system
64847    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64848    FOUND_MEM=yes
64849  elif test -x /usr/sbin/sysctl; then
64850    # Looks like a MacOSX system
64851    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64852    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64853    FOUND_MEM=yes
64854  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64855    # Windows, but without cygwin
64856    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64857    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64858    FOUND_MEM=yes
64859  fi
64860
64861  if test "x$FOUND_MEM" = xyes; then
64862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64863$as_echo "$MEMORY_SIZE MB" >&6; }
64864  else
64865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64866$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64867    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64868$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64869  fi
64870
64871  else
64872    MEMORY_SIZE=$with_memory_size
64873  fi
64874
64875
64876
64877  # Provide a decent default number of parallel jobs for make depending on
64878  # number of cores, amount of memory and machine architecture.
64879
64880# Check whether --with-jobs was given.
64881if test "${with_jobs+set}" = set; then :
64882  withval=$with_jobs;
64883fi
64884
64885  if test "x$with_jobs" = x; then
64886    # Number of jobs was not specified, calculate.
64887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64888$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64889    # Approximate memory in GB.
64890    memory_gb=`expr $MEMORY_SIZE / 1024`
64891    # Pick the lowest of memory in gb and number of cores.
64892    if test "$memory_gb" -lt "$NUM_CORES"; then
64893      JOBS="$memory_gb"
64894    else
64895      JOBS="$NUM_CORES"
64896    fi
64897    if test "$JOBS" -eq "0"; then
64898      JOBS=1
64899    fi
64900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64901$as_echo "$JOBS" >&6; }
64902  else
64903    JOBS=$with_jobs
64904  fi
64905
64906
64907
64908  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64909
64910# Check whether --with-test-jobs was given.
64911if test "${with_test_jobs+set}" = set; then :
64912  withval=$with_test_jobs;
64913fi
64914
64915  if test "x$with_test_jobs" = x; then
64916      TEST_JOBS=0
64917  else
64918      TEST_JOBS=$with_test_jobs
64919  fi
64920
64921
64922
64923# Setup arguments for the boot jdk (after cores and memory have been setup)
64924
64925  ##############################################################################
64926  #
64927  # Specify jvm options for anything that is run with the Boot JDK.
64928  # Not all JVM:s accept the same arguments on the command line.
64929  #
64930
64931# Check whether --with-boot-jdk-jvmargs was given.
64932if test "${with_boot_jdk_jvmargs+set}" = set; then :
64933  withval=$with_boot_jdk_jvmargs;
64934fi
64935
64936
64937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64938$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64939
64940  # Disable special log output when a debug build is used as Boot JDK...
64941
64942  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64943  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64944  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64945  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64946  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64947  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64948    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64949    JVM_ARG_OK=true
64950  else
64951    $ECHO "Arg failed:" >&5
64952    $ECHO "$OUTPUT" >&5
64953    JVM_ARG_OK=false
64954  fi
64955
64956
64957  # Apply user provided options.
64958
64959  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64960  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64961  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64962  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64963  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64964  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64965    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64966    JVM_ARG_OK=true
64967  else
64968    $ECHO "Arg failed:" >&5
64969    $ECHO "$OUTPUT" >&5
64970    JVM_ARG_OK=false
64971  fi
64972
64973
64974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64975$as_echo "$boot_jdk_jvmargs" >&6; }
64976
64977  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64978  JAVA_FLAGS=$boot_jdk_jvmargs
64979
64980
64981
64982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64983$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64984
64985  # Starting amount of heap memory.
64986
64987  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64988  $ECHO "Command: $JAVA -Xms64M -version" >&5
64989  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64990  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64991  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64992  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64993    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64994    JVM_ARG_OK=true
64995  else
64996    $ECHO "Arg failed:" >&5
64997    $ECHO "$OUTPUT" >&5
64998    JVM_ARG_OK=false
64999  fi
65000
65001
65002  # Maximum amount of heap memory.
65003  # Maximum stack size.
65004  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
65005  if test "x$BOOT_JDK_BITS" = "x32"; then
65006    if test "$JVM_MAX_HEAP" -gt "1100"; then
65007      JVM_MAX_HEAP=1100
65008    elif test "$JVM_MAX_HEAP" -lt "512"; then
65009      JVM_MAX_HEAP=512
65010    fi
65011    STACK_SIZE=768
65012  else
65013    # Running a 64 bit JVM allows for and requires a bigger heap
65014    if test "$JVM_MAX_HEAP" -gt "1600"; then
65015      JVM_MAX_HEAP=1600
65016    elif test "$JVM_MAX_HEAP" -lt "512"; then
65017      JVM_MAX_HEAP=512
65018    fi
65019    STACK_SIZE=1536
65020  fi
65021
65022  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65023  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65024  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65025  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65026  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65027  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65028    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65029    JVM_ARG_OK=true
65030  else
65031    $ECHO "Arg failed:" >&5
65032    $ECHO "$OUTPUT" >&5
65033    JVM_ARG_OK=false
65034  fi
65035
65036
65037  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65038  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65039  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65040  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65041  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65042  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65043    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65044    JVM_ARG_OK=true
65045  else
65046    $ECHO "Arg failed:" >&5
65047    $ECHO "$OUTPUT" >&5
65048    JVM_ARG_OK=false
65049  fi
65050
65051
65052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65053$as_echo "$boot_jdk_jvmargs_big" >&6; }
65054
65055  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65056
65057
65058  # By default, the main javac compilations use big
65059  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65060
65061
65062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65063$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65064
65065  # Use serial gc for small short lived tools if possible
65066
65067  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65068  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65069  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65070  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65071  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65072  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65073    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65074    JVM_ARG_OK=true
65075  else
65076    $ECHO "Arg failed:" >&5
65077    $ECHO "$OUTPUT" >&5
65078    JVM_ARG_OK=false
65079  fi
65080
65081
65082  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65083  $ECHO "Command: $JAVA -Xms32M -version" >&5
65084  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65085  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65086  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65087  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65088    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65089    JVM_ARG_OK=true
65090  else
65091    $ECHO "Arg failed:" >&5
65092    $ECHO "$OUTPUT" >&5
65093    JVM_ARG_OK=false
65094  fi
65095
65096
65097  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65098  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65099  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65100  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65101  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65102  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65103    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65104    JVM_ARG_OK=true
65105  else
65106    $ECHO "Arg failed:" >&5
65107    $ECHO "$OUTPUT" >&5
65108    JVM_ARG_OK=false
65109  fi
65110
65111
65112  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65113  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65114  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65115  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65116  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65117  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65118    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65119    JVM_ARG_OK=true
65120  else
65121    $ECHO "Arg failed:" >&5
65122    $ECHO "$OUTPUT" >&5
65123    JVM_ARG_OK=false
65124  fi
65125
65126
65127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65128$as_echo "$boot_jdk_jvmargs_small" >&6; }
65129
65130  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65131
65132
65133  JAVA_TOOL_FLAGS_SMALL=""
65134  for f in $JAVA_FLAGS_SMALL; do
65135    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65136  done
65137
65138
65139
65140# Setup smart javac (after cores and memory have been setup)
65141
65142
65143# Check whether --with-sjavac-server-java was given.
65144if test "${with_sjavac_server_java+set}" = set; then :
65145  withval=$with_sjavac_server_java;
65146fi
65147
65148
65149  if test "x$with_sjavac_server_java" != x; then
65150    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65151    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65152    if test "x$FOUND_VERSION" = x; then
65153      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65154    fi
65155  else
65156    SJAVAC_SERVER_JAVA="$JAVA"
65157  fi
65158
65159
65160  if test "$MEMORY_SIZE" -gt "3000"; then
65161
65162  $ECHO "Check if jvm arg is ok: -d64" >&5
65163  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65164  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65165  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65166  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65167  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65168    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65169    JVM_ARG_OK=true
65170  else
65171    $ECHO "Arg failed:" >&5
65172    $ECHO "$OUTPUT" >&5
65173    JVM_ARG_OK=false
65174  fi
65175
65176    if test "$JVM_ARG_OK" = true; then
65177      JVM_64BIT=true
65178      JVM_ARG_OK=false
65179    fi
65180  fi
65181
65182  MX_VALUE=`expr $MEMORY_SIZE / 2`
65183  if test "$JVM_64BIT" = true; then
65184    # Set ms lower than mx since more than one instance of the server might
65185    # get launched at the same time before they figure out which instance won.
65186    MS_VALUE=512
65187    if test "$MX_VALUE" -gt "2048"; then
65188      MX_VALUE=2048
65189    fi
65190  else
65191    MS_VALUE=256
65192    if test "$MX_VALUE" -gt "1500"; then
65193      MX_VALUE=1500
65194    fi
65195  fi
65196  if test "$MX_VALUE" -lt "512"; then
65197    MX_VALUE=512
65198  fi
65199
65200  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65201  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65202  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65203  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65204  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65205  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65206    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65207    JVM_ARG_OK=true
65208  else
65209    $ECHO "Arg failed:" >&5
65210    $ECHO "$OUTPUT" >&5
65211    JVM_ARG_OK=false
65212  fi
65213
65214
65215
65216  # Check whether --enable-sjavac was given.
65217if test "${enable_sjavac+set}" = set; then :
65218  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65219else
65220  ENABLE_SJAVAC="no"
65221fi
65222
65223  if test "x$JVM_ARG_OK" = "xfalse"; then
65224    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65225$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65226    ENABLE_SJAVAC="no"
65227  fi
65228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65229$as_echo_n "checking whether to use sjavac... " >&6; }
65230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65231$as_echo "$ENABLE_SJAVAC" >&6; }
65232
65233
65234  # Check whether --enable-javac-server was given.
65235if test "${enable_javac_server+set}" = set; then :
65236  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65237else
65238  ENABLE_JAVAC_SERVER="yes"
65239fi
65240
65241  if test "x$JVM_ARG_OK" = "xfalse"; then
65242    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65243$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65244    ENABLE_JAVAC_SERVER="no"
65245  fi
65246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65247$as_echo_n "checking whether to use javac server... " >&6; }
65248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65249$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65250
65251
65252  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65253    # When using a server javac, the small client instances do not need much
65254    # resources.
65255    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65256  fi
65257
65258
65259# Setup use of icecc if requested
65260
65261  # Check whether --enable-icecc was given.
65262if test "${enable_icecc+set}" = set; then :
65263  enableval=$enable_icecc;
65264fi
65265
65266
65267  if test "x${enable_icecc}" = "xyes"; then
65268
65269
65270
65271  # Publish this variable in the help.
65272
65273
65274  if [ -z "${ICECC_CMD+x}" ]; then
65275    # The variable is not set by user, try to locate tool using the code snippet
65276    for ac_prog in icecc
65277do
65278  # Extract the first word of "$ac_prog", so it can be a program name with args.
65279set dummy $ac_prog; ac_word=$2
65280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65281$as_echo_n "checking for $ac_word... " >&6; }
65282if ${ac_cv_path_ICECC_CMD+:} false; then :
65283  $as_echo_n "(cached) " >&6
65284else
65285  case $ICECC_CMD in
65286  [\\/]* | ?:[\\/]*)
65287  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65288  ;;
65289  *)
65290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65291for as_dir in $PATH
65292do
65293  IFS=$as_save_IFS
65294  test -z "$as_dir" && as_dir=.
65295    for ac_exec_ext in '' $ac_executable_extensions; do
65296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65297    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65299    break 2
65300  fi
65301done
65302  done
65303IFS=$as_save_IFS
65304
65305  ;;
65306esac
65307fi
65308ICECC_CMD=$ac_cv_path_ICECC_CMD
65309if test -n "$ICECC_CMD"; then
65310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65311$as_echo "$ICECC_CMD" >&6; }
65312else
65313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65314$as_echo "no" >&6; }
65315fi
65316
65317
65318  test -n "$ICECC_CMD" && break
65319done
65320
65321  else
65322    # The variable is set, but is it from the command line or the environment?
65323
65324    # Try to remove the string !ICECC_CMD! from our list.
65325    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65326    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65327      # If it failed, the variable was not from the command line. Ignore it,
65328      # but warn the user (except for BASH, which is always set by the calling BASH).
65329      if test "xICECC_CMD" != xBASH; then
65330        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65331$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65332      fi
65333      # Try to locate tool using the code snippet
65334      for ac_prog in icecc
65335do
65336  # Extract the first word of "$ac_prog", so it can be a program name with args.
65337set dummy $ac_prog; ac_word=$2
65338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65339$as_echo_n "checking for $ac_word... " >&6; }
65340if ${ac_cv_path_ICECC_CMD+:} false; then :
65341  $as_echo_n "(cached) " >&6
65342else
65343  case $ICECC_CMD in
65344  [\\/]* | ?:[\\/]*)
65345  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65346  ;;
65347  *)
65348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65349for as_dir in $PATH
65350do
65351  IFS=$as_save_IFS
65352  test -z "$as_dir" && as_dir=.
65353    for ac_exec_ext in '' $ac_executable_extensions; do
65354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65355    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65357    break 2
65358  fi
65359done
65360  done
65361IFS=$as_save_IFS
65362
65363  ;;
65364esac
65365fi
65366ICECC_CMD=$ac_cv_path_ICECC_CMD
65367if test -n "$ICECC_CMD"; then
65368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65369$as_echo "$ICECC_CMD" >&6; }
65370else
65371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65372$as_echo "no" >&6; }
65373fi
65374
65375
65376  test -n "$ICECC_CMD" && break
65377done
65378
65379    else
65380      # If it succeeded, then it was overridden by the user. We will use it
65381      # for the tool.
65382
65383      # First remove it from the list of overridden variables, so we can test
65384      # for unknown variables in the end.
65385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65386
65387      # Check if we try to supply an empty value
65388      if test "x$ICECC_CMD" = x; then
65389        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65390$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65392$as_echo_n "checking for ICECC_CMD... " >&6; }
65393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65394$as_echo "disabled" >&6; }
65395      else
65396        # Check if the provided tool contains a complete path.
65397        tool_specified="$ICECC_CMD"
65398        tool_basename="${tool_specified##*/}"
65399        if test "x$tool_basename" = "x$tool_specified"; then
65400          # A command without a complete path is provided, search $PATH.
65401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65402$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65403          # Extract the first word of "$tool_basename", so it can be a program name with args.
65404set dummy $tool_basename; 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_ICECC_CMD+:} false; then :
65408  $as_echo_n "(cached) " >&6
65409else
65410  case $ICECC_CMD in
65411  [\\/]* | ?:[\\/]*)
65412  ac_cv_path_ICECC_CMD="$ICECC_CMD" # 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_ICECC_CMD="$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
65433ICECC_CMD=$ac_cv_path_ICECC_CMD
65434if test -n "$ICECC_CMD"; then
65435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65436$as_echo "$ICECC_CMD" >&6; }
65437else
65438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65439$as_echo "no" >&6; }
65440fi
65441
65442
65443          if test "x$ICECC_CMD" = x; then
65444            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65445          fi
65446        else
65447          # Otherwise we believe it is a complete path. Use it as it is.
65448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65449$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65450          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65451$as_echo_n "checking for ICECC_CMD... " >&6; }
65452          if test ! -x "$tool_specified"; then
65453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65454$as_echo "not found" >&6; }
65455            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65456          fi
65457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65458$as_echo "$tool_specified" >&6; }
65459        fi
65460      fi
65461    fi
65462
65463  fi
65464
65465
65466
65467  if test "x$ICECC_CMD" = x; then
65468    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65469  fi
65470
65471
65472    old_path="$PATH"
65473
65474    # Look for icecc-create-env in some known places
65475    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65476
65477
65478
65479  # Publish this variable in the help.
65480
65481
65482  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65483    # The variable is not set by user, try to locate tool using the code snippet
65484    for ac_prog in icecc-create-env
65485do
65486  # Extract the first word of "$ac_prog", so it can be a program name with args.
65487set dummy $ac_prog; ac_word=$2
65488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65489$as_echo_n "checking for $ac_word... " >&6; }
65490if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65491  $as_echo_n "(cached) " >&6
65492else
65493  case $ICECC_CREATE_ENV in
65494  [\\/]* | ?:[\\/]*)
65495  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65496  ;;
65497  *)
65498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65499for as_dir in $PATH
65500do
65501  IFS=$as_save_IFS
65502  test -z "$as_dir" && as_dir=.
65503    for ac_exec_ext in '' $ac_executable_extensions; do
65504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65505    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65507    break 2
65508  fi
65509done
65510  done
65511IFS=$as_save_IFS
65512
65513  ;;
65514esac
65515fi
65516ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65517if test -n "$ICECC_CREATE_ENV"; then
65518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65519$as_echo "$ICECC_CREATE_ENV" >&6; }
65520else
65521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65522$as_echo "no" >&6; }
65523fi
65524
65525
65526  test -n "$ICECC_CREATE_ENV" && break
65527done
65528
65529  else
65530    # The variable is set, but is it from the command line or the environment?
65531
65532    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65535      # If it failed, the variable was not from the command line. Ignore it,
65536      # but warn the user (except for BASH, which is always set by the calling BASH).
65537      if test "xICECC_CREATE_ENV" != xBASH; then
65538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65539$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65540      fi
65541      # Try to locate tool using the code snippet
65542      for ac_prog in icecc-create-env
65543do
65544  # Extract the first word of "$ac_prog", so it can be a program name with args.
65545set dummy $ac_prog; ac_word=$2
65546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65547$as_echo_n "checking for $ac_word... " >&6; }
65548if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65549  $as_echo_n "(cached) " >&6
65550else
65551  case $ICECC_CREATE_ENV in
65552  [\\/]* | ?:[\\/]*)
65553  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65554  ;;
65555  *)
65556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65557for as_dir in $PATH
65558do
65559  IFS=$as_save_IFS
65560  test -z "$as_dir" && as_dir=.
65561    for ac_exec_ext in '' $ac_executable_extensions; do
65562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65563    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65565    break 2
65566  fi
65567done
65568  done
65569IFS=$as_save_IFS
65570
65571  ;;
65572esac
65573fi
65574ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65575if test -n "$ICECC_CREATE_ENV"; then
65576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65577$as_echo "$ICECC_CREATE_ENV" >&6; }
65578else
65579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65580$as_echo "no" >&6; }
65581fi
65582
65583
65584  test -n "$ICECC_CREATE_ENV" && break
65585done
65586
65587    else
65588      # If it succeeded, then it was overridden by the user. We will use it
65589      # for the tool.
65590
65591      # First remove it from the list of overridden variables, so we can test
65592      # for unknown variables in the end.
65593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65594
65595      # Check if we try to supply an empty value
65596      if test "x$ICECC_CREATE_ENV" = x; then
65597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65598$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65600$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65602$as_echo "disabled" >&6; }
65603      else
65604        # Check if the provided tool contains a complete path.
65605        tool_specified="$ICECC_CREATE_ENV"
65606        tool_basename="${tool_specified##*/}"
65607        if test "x$tool_basename" = "x$tool_specified"; then
65608          # A command without a complete path is provided, search $PATH.
65609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65610$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65611          # Extract the first word of "$tool_basename", so it can be a program name with args.
65612set dummy $tool_basename; ac_word=$2
65613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65614$as_echo_n "checking for $ac_word... " >&6; }
65615if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65616  $as_echo_n "(cached) " >&6
65617else
65618  case $ICECC_CREATE_ENV in
65619  [\\/]* | ?:[\\/]*)
65620  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65621  ;;
65622  *)
65623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65624for as_dir in $PATH
65625do
65626  IFS=$as_save_IFS
65627  test -z "$as_dir" && as_dir=.
65628    for ac_exec_ext in '' $ac_executable_extensions; do
65629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65630    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65632    break 2
65633  fi
65634done
65635  done
65636IFS=$as_save_IFS
65637
65638  ;;
65639esac
65640fi
65641ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65642if test -n "$ICECC_CREATE_ENV"; then
65643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65644$as_echo "$ICECC_CREATE_ENV" >&6; }
65645else
65646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65647$as_echo "no" >&6; }
65648fi
65649
65650
65651          if test "x$ICECC_CREATE_ENV" = x; then
65652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65653          fi
65654        else
65655          # Otherwise we believe it is a complete path. Use it as it is.
65656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65657$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65659$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65660          if test ! -x "$tool_specified"; then
65661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65662$as_echo "not found" >&6; }
65663            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65664          fi
65665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65666$as_echo "$tool_specified" >&6; }
65667        fi
65668      fi
65669    fi
65670
65671  fi
65672
65673
65674
65675  if test "x$ICECC_CREATE_ENV" = x; then
65676    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65677  fi
65678
65679
65680    # Use icecc-create-env to create a minimal compilation environment that can
65681    # be sent to the other hosts in the icecream cluster.
65682    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65683    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65684    # Older versions of icecc does not have the --gcc parameter
65685    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65686      icecc_gcc_arg="--gcc"
65687    fi
65688    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65689
65690  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65691      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65692          ${icecc_create_env_log} 2>&1 )
65693  if test "$?" != "0"; then
65694    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65695$as_echo "$as_me: icecc-create-env output:" >&6;}
65696    cat \
65697          ${icecc_create_env_log}
65698    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65699  fi
65700
65701    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65702      # For clang, the icecc compilerwrapper is needed. It usually resides next
65703      # to icecc-create-env.
65704
65705
65706
65707  # Publish this variable in the help.
65708
65709
65710  if [ -z "${ICECC_WRAPPER+x}" ]; then
65711    # The variable is not set by user, try to locate tool using the code snippet
65712    for ac_prog in compilerwrapper
65713do
65714  # Extract the first word of "$ac_prog", so it can be a program name with args.
65715set dummy $ac_prog; ac_word=$2
65716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65717$as_echo_n "checking for $ac_word... " >&6; }
65718if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65719  $as_echo_n "(cached) " >&6
65720else
65721  case $ICECC_WRAPPER in
65722  [\\/]* | ?:[\\/]*)
65723  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65724  ;;
65725  *)
65726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65727for as_dir in $PATH
65728do
65729  IFS=$as_save_IFS
65730  test -z "$as_dir" && as_dir=.
65731    for ac_exec_ext in '' $ac_executable_extensions; do
65732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65733    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65735    break 2
65736  fi
65737done
65738  done
65739IFS=$as_save_IFS
65740
65741  ;;
65742esac
65743fi
65744ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65745if test -n "$ICECC_WRAPPER"; then
65746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65747$as_echo "$ICECC_WRAPPER" >&6; }
65748else
65749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65750$as_echo "no" >&6; }
65751fi
65752
65753
65754  test -n "$ICECC_WRAPPER" && break
65755done
65756
65757  else
65758    # The variable is set, but is it from the command line or the environment?
65759
65760    # Try to remove the string !ICECC_WRAPPER! from our list.
65761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65763      # If it failed, the variable was not from the command line. Ignore it,
65764      # but warn the user (except for BASH, which is always set by the calling BASH).
65765      if test "xICECC_WRAPPER" != xBASH; then
65766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65767$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65768      fi
65769      # Try to locate tool using the code snippet
65770      for ac_prog in compilerwrapper
65771do
65772  # Extract the first word of "$ac_prog", so it can be a program name with args.
65773set dummy $ac_prog; ac_word=$2
65774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65775$as_echo_n "checking for $ac_word... " >&6; }
65776if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65777  $as_echo_n "(cached) " >&6
65778else
65779  case $ICECC_WRAPPER in
65780  [\\/]* | ?:[\\/]*)
65781  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65782  ;;
65783  *)
65784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65785for as_dir in $PATH
65786do
65787  IFS=$as_save_IFS
65788  test -z "$as_dir" && as_dir=.
65789    for ac_exec_ext in '' $ac_executable_extensions; do
65790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65791    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65793    break 2
65794  fi
65795done
65796  done
65797IFS=$as_save_IFS
65798
65799  ;;
65800esac
65801fi
65802ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65803if test -n "$ICECC_WRAPPER"; then
65804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65805$as_echo "$ICECC_WRAPPER" >&6; }
65806else
65807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65808$as_echo "no" >&6; }
65809fi
65810
65811
65812  test -n "$ICECC_WRAPPER" && break
65813done
65814
65815    else
65816      # If it succeeded, then it was overridden by the user. We will use it
65817      # for the tool.
65818
65819      # First remove it from the list of overridden variables, so we can test
65820      # for unknown variables in the end.
65821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65822
65823      # Check if we try to supply an empty value
65824      if test "x$ICECC_WRAPPER" = x; then
65825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65826$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65828$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65830$as_echo "disabled" >&6; }
65831      else
65832        # Check if the provided tool contains a complete path.
65833        tool_specified="$ICECC_WRAPPER"
65834        tool_basename="${tool_specified##*/}"
65835        if test "x$tool_basename" = "x$tool_specified"; then
65836          # A command without a complete path is provided, search $PATH.
65837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65838$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65839          # Extract the first word of "$tool_basename", so it can be a program name with args.
65840set dummy $tool_basename; ac_word=$2
65841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65842$as_echo_n "checking for $ac_word... " >&6; }
65843if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65844  $as_echo_n "(cached) " >&6
65845else
65846  case $ICECC_WRAPPER in
65847  [\\/]* | ?:[\\/]*)
65848  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65849  ;;
65850  *)
65851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65852for as_dir in $PATH
65853do
65854  IFS=$as_save_IFS
65855  test -z "$as_dir" && as_dir=.
65856    for ac_exec_ext in '' $ac_executable_extensions; do
65857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65858    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65860    break 2
65861  fi
65862done
65863  done
65864IFS=$as_save_IFS
65865
65866  ;;
65867esac
65868fi
65869ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65870if test -n "$ICECC_WRAPPER"; then
65871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65872$as_echo "$ICECC_WRAPPER" >&6; }
65873else
65874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65875$as_echo "no" >&6; }
65876fi
65877
65878
65879          if test "x$ICECC_WRAPPER" = x; then
65880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65881          fi
65882        else
65883          # Otherwise we believe it is a complete path. Use it as it is.
65884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65885$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65887$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65888          if test ! -x "$tool_specified"; then
65889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65890$as_echo "not found" >&6; }
65891            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65892          fi
65893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65894$as_echo "$tool_specified" >&6; }
65895        fi
65896      fi
65897    fi
65898
65899  fi
65900
65901
65902
65903  if test "x$ICECC_WRAPPER" = x; then
65904    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65905  fi
65906
65907
65908
65909  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65910      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65911  if test "$?" != "0"; then
65912    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65913$as_echo "$as_me: icecc-create-env output:" >&6;}
65914    cat ${icecc_create_env_log}
65915    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65916  fi
65917
65918    else
65919      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65920    fi
65921    PATH="$old_path"
65922    # The bundle with the compiler gets a name based on checksums. Parse log file
65923    # to find it.
65924    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65925    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65926    if test ! -f ${ICECC_ENV_BUNDLE}; then
65927      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65928    fi
65929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65930$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65932$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65933    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65934
65935    if test "x${COMPILE_TYPE}" = "xcross"; then
65936      # If cross compiling, create a separate env package for the build compiler
65937      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65938      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65939      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65940
65941  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65942      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65943            ${icecc_create_env_log_build} 2>&1 )
65944  if test "$?" != "0"; then
65945    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65946$as_echo "$as_me: icecc-create-env output:" >&6;}
65947    cat \
65948            ${icecc_create_env_log_build}
65949    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65950  fi
65951
65952      elif test "x${BUILD_CC##*/}" = "xclang"; then
65953
65954  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65955      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65956  if test "$?" != "0"; then
65957    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65958$as_echo "$as_me: icecc-create-env output:" >&6;}
65959    cat ${icecc_create_env_log_build}
65960    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65961  fi
65962
65963      else
65964        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65965      fi
65966      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65967      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65968      if test ! -f ${ICECC_ENV_BUNDLE}; then
65969        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65970      fi
65971      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65972$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65974$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65975      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65976          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65977    else
65978      BUILD_ICECC="${ICECC}"
65979    fi
65980
65981
65982  fi
65983
65984
65985# Can the C/C++ compiler use precompiled headers?
65986
65987
65988  ###############################################################################
65989  #
65990  # Can the C/C++ compiler use precompiled headers?
65991  #
65992  # Check whether --enable-precompiled-headers was given.
65993if test "${enable_precompiled_headers+set}" = set; then :
65994  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65995else
65996  ENABLE_PRECOMPH=yes
65997fi
65998
65999
66000  USE_PRECOMPILED_HEADER=1
66001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66002$as_echo_n "checking If precompiled header is enabled... " >&6; }
66003  if test "x$ENABLE_PRECOMPH" = xno; then
66004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66005$as_echo "no, forced" >&6; }
66006    USE_PRECOMPILED_HEADER=0
66007  elif test "x$ICECC" != "x"; then
66008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66009$as_echo "no, does not work effectively with icecc" >&6; }
66010    USE_PRECOMPILED_HEADER=0
66011  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66013$as_echo "no, does not work with Solaris Studio" >&6; }
66014    USE_PRECOMPILED_HEADER=0
66015  else
66016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66017$as_echo "yes" >&6; }
66018  fi
66019
66020  if test "x$ENABLE_PRECOMPH" = xyes; then
66021    # Check that the compiler actually supports precomp headers.
66022    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66023      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66024$as_echo_n "checking that precompiled headers work... " >&6; }
66025      echo "int alfa();" > conftest.h
66026      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66027      if test ! -f conftest.hpp.gch; then
66028        USE_PRECOMPILED_HEADER=0
66029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66030$as_echo "no" >&6; }
66031      else
66032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66033$as_echo "yes" >&6; }
66034      fi
66035      rm -f conftest.h conftest.hpp.gch
66036    fi
66037  fi
66038
66039
66040
66041
66042# Setup use of ccache, if available
66043
66044  # Check whether --enable-ccache was given.
66045if test "${enable_ccache+set}" = set; then :
66046  enableval=$enable_ccache;
66047fi
66048
66049
66050  CCACHE=
66051  CCACHE_STATUS=
66052  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66053$as_echo_n "checking is ccache enabled... " >&6; }
66054  if test "x$enable_ccache" = xyes; then
66055    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66057$as_echo "yes" >&6; }
66058      OLD_PATH="$PATH"
66059      if test "x$TOOLCHAIN_PATH" != x; then
66060        PATH=$TOOLCHAIN_PATH:$PATH
66061      fi
66062
66063
66064
66065  # Publish this variable in the help.
66066
66067
66068  if [ -z "${CCACHE+x}" ]; then
66069    # The variable is not set by user, try to locate tool using the code snippet
66070    for ac_prog in ccache
66071do
66072  # Extract the first word of "$ac_prog", so it can be a program name with args.
66073set dummy $ac_prog; ac_word=$2
66074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66075$as_echo_n "checking for $ac_word... " >&6; }
66076if ${ac_cv_path_CCACHE+:} false; then :
66077  $as_echo_n "(cached) " >&6
66078else
66079  case $CCACHE in
66080  [\\/]* | ?:[\\/]*)
66081  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66082  ;;
66083  *)
66084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66085for as_dir in $PATH
66086do
66087  IFS=$as_save_IFS
66088  test -z "$as_dir" && as_dir=.
66089    for ac_exec_ext in '' $ac_executable_extensions; do
66090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66091    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66093    break 2
66094  fi
66095done
66096  done
66097IFS=$as_save_IFS
66098
66099  ;;
66100esac
66101fi
66102CCACHE=$ac_cv_path_CCACHE
66103if test -n "$CCACHE"; then
66104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66105$as_echo "$CCACHE" >&6; }
66106else
66107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66108$as_echo "no" >&6; }
66109fi
66110
66111
66112  test -n "$CCACHE" && break
66113done
66114
66115  else
66116    # The variable is set, but is it from the command line or the environment?
66117
66118    # Try to remove the string !CCACHE! from our list.
66119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66121      # If it failed, the variable was not from the command line. Ignore it,
66122      # but warn the user (except for BASH, which is always set by the calling BASH).
66123      if test "xCCACHE" != xBASH; then
66124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66125$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66126      fi
66127      # Try to locate tool using the code snippet
66128      for ac_prog in ccache
66129do
66130  # Extract the first word of "$ac_prog", so it can be a program name with args.
66131set dummy $ac_prog; ac_word=$2
66132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66133$as_echo_n "checking for $ac_word... " >&6; }
66134if ${ac_cv_path_CCACHE+:} false; then :
66135  $as_echo_n "(cached) " >&6
66136else
66137  case $CCACHE in
66138  [\\/]* | ?:[\\/]*)
66139  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66140  ;;
66141  *)
66142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66143for as_dir in $PATH
66144do
66145  IFS=$as_save_IFS
66146  test -z "$as_dir" && as_dir=.
66147    for ac_exec_ext in '' $ac_executable_extensions; do
66148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66149    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66151    break 2
66152  fi
66153done
66154  done
66155IFS=$as_save_IFS
66156
66157  ;;
66158esac
66159fi
66160CCACHE=$ac_cv_path_CCACHE
66161if test -n "$CCACHE"; then
66162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66163$as_echo "$CCACHE" >&6; }
66164else
66165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66166$as_echo "no" >&6; }
66167fi
66168
66169
66170  test -n "$CCACHE" && break
66171done
66172
66173    else
66174      # If it succeeded, then it was overridden by the user. We will use it
66175      # for the tool.
66176
66177      # First remove it from the list of overridden variables, so we can test
66178      # for unknown variables in the end.
66179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66180
66181      # Check if we try to supply an empty value
66182      if test "x$CCACHE" = x; then
66183        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66184$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66186$as_echo_n "checking for CCACHE... " >&6; }
66187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66188$as_echo "disabled" >&6; }
66189      else
66190        # Check if the provided tool contains a complete path.
66191        tool_specified="$CCACHE"
66192        tool_basename="${tool_specified##*/}"
66193        if test "x$tool_basename" = "x$tool_specified"; then
66194          # A command without a complete path is provided, search $PATH.
66195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66196$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66197          # Extract the first word of "$tool_basename", so it can be a program name with args.
66198set dummy $tool_basename; ac_word=$2
66199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66200$as_echo_n "checking for $ac_word... " >&6; }
66201if ${ac_cv_path_CCACHE+:} false; then :
66202  $as_echo_n "(cached) " >&6
66203else
66204  case $CCACHE in
66205  [\\/]* | ?:[\\/]*)
66206  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66207  ;;
66208  *)
66209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66210for as_dir in $PATH
66211do
66212  IFS=$as_save_IFS
66213  test -z "$as_dir" && as_dir=.
66214    for ac_exec_ext in '' $ac_executable_extensions; do
66215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66216    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66218    break 2
66219  fi
66220done
66221  done
66222IFS=$as_save_IFS
66223
66224  ;;
66225esac
66226fi
66227CCACHE=$ac_cv_path_CCACHE
66228if test -n "$CCACHE"; then
66229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66230$as_echo "$CCACHE" >&6; }
66231else
66232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66233$as_echo "no" >&6; }
66234fi
66235
66236
66237          if test "x$CCACHE" = x; then
66238            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66239          fi
66240        else
66241          # Otherwise we believe it is a complete path. Use it as it is.
66242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66243$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66244          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66245$as_echo_n "checking for CCACHE... " >&6; }
66246          if test ! -x "$tool_specified"; then
66247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66248$as_echo "not found" >&6; }
66249            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66250          fi
66251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66252$as_echo "$tool_specified" >&6; }
66253        fi
66254      fi
66255    fi
66256
66257  fi
66258
66259
66260
66261  if test "x$CCACHE" = x; then
66262    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66263  fi
66264
66265
66266      PATH="$OLD_PATH"
66267      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66268      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66269    else
66270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66271$as_echo "no" >&6; }
66272      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66273$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66274    fi
66275  elif test "x$enable_ccache" = xno; then
66276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66277$as_echo "no, explicitly disabled" >&6; }
66278    CCACHE_STATUS="Disabled"
66279  elif test "x$enable_ccache" = x; then
66280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66281$as_echo "no" >&6; }
66282  else
66283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66284$as_echo "unknown" >&6; }
66285    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66286  fi
66287
66288
66289
66290# Check whether --with-ccache-dir was given.
66291if test "${with_ccache_dir+set}" = set; then :
66292  withval=$with_ccache_dir;
66293fi
66294
66295
66296  if test "x$with_ccache_dir" != x; then
66297    # When using a non home ccache directory, assume the use is to share ccache files
66298    # with other users. Thus change the umask.
66299    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66300    if test "x$CCACHE" = x; then
66301      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66302$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66303    fi
66304  fi
66305
66306  if test "x$CCACHE" != x; then
66307
66308  if test "x$CCACHE" != x; then
66309    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66310      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66311          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66312      if test "x$HAS_BAD_CCACHE" != "x"; then
66313        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66314      fi
66315      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66316$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66317      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66318      PUSHED_FLAGS="$CXXFLAGS"
66319      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66320      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66321/* end confdefs.h.  */
66322
66323int
66324main ()
66325{
66326
66327  ;
66328  return 0;
66329}
66330_ACEOF
66331if ac_fn_cxx_try_compile "$LINENO"; then :
66332  CC_KNOWS_CCACHE_TRICK=yes
66333else
66334  CC_KNOWS_CCACHE_TRICK=no
66335fi
66336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66337      CXXFLAGS="$PUSHED_FLAGS"
66338      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66340$as_echo "yes" >&6; }
66341        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66342
66343        CCACHE_SLOPPINESS=pch_defines,time_macros
66344      else
66345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66346$as_echo "no" >&6; }
66347        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66348      fi
66349    fi
66350
66351    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66352        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66353
66354    if test "x$SET_CCACHE_DIR" != x; then
66355      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66356      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66357    fi
66358  fi
66359
66360  fi
66361
66362
66363###############################################################################
66364#
66365# And now the finish...
66366#
66367###############################################################################
66368
66369# Check for some common pitfalls
66370
66371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66372    file_to_test="$SRC_ROOT/LICENSE"
66373    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66374      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
66375    fi
66376  fi
66377
66378
66379  # Did user specify any unknown variables?
66380
66381  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66382    # Replace the separating ! with spaces before presenting for end user.
66383    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66384    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66385$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66386  fi
66387
66388
66389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66390$as_echo_n "checking if build directory is on local disk... " >&6; }
66391
66392  # df -l lists only local disks; if the given directory is not found then
66393  # a non-zero exit code is given
66394  if test "x$DF" = x; then
66395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66396      # msys does not have df; use Windows "net use" instead.
66397      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66398      if test "x$IS_NETWORK_DISK" = x; then
66399        OUTPUT_DIR_IS_LOCAL="yes"
66400      else
66401        OUTPUT_DIR_IS_LOCAL="no"
66402      fi
66403    else
66404      # No df here, say it's local
66405      OUTPUT_DIR_IS_LOCAL="yes"
66406    fi
66407  else
66408    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66409      OUTPUT_DIR_IS_LOCAL="yes"
66410    else
66411      OUTPUT_DIR_IS_LOCAL="no"
66412    fi
66413  fi
66414
66415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66416$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66417
66418
66419
66420  # Check if the user has any old-style ALT_ variables set.
66421  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66422
66423  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66424  # Since we can't properly handle the dependencies for this, warn the user about the situation
66425  if test -e $OUTPUT_ROOT/spec.gmk; then
66426    IS_RECONFIGURE=yes
66427  else
66428    IS_RECONFIGURE=no
66429  fi
66430
66431
66432# At the end, call the custom hook. (Dummy macro if no custom sources available)
66433
66434
66435# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66436
66437  # Keep feature lists sorted and free of duplicates
66438  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66439  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66440  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66441  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66442  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66443  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66444  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66445
66446  # Validate features
66447  for variant in $JVM_VARIANTS; do
66448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66449$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66450    features_var_name=JVM_FEATURES_$variant
66451    JVM_FEATURES_TO_TEST=${!features_var_name}
66452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66453$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66454    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66455    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66456    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66457    if test "x$INVALID_FEATURES" != x; then
66458      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66459    fi
66460  done
66461
66462
66463# We're messing a bit with internal autoconf variables to put the config.status
66464# in the output directory instead of the current directory.
66465CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66466
66467# Create the actual output files. Now the main work of configure is done.
66468cat >confcache <<\_ACEOF
66469# This file is a shell script that caches the results of configure
66470# tests run on this system so they can be shared between configure
66471# scripts and configure runs, see configure's option --config-cache.
66472# It is not useful on other systems.  If it contains results you don't
66473# want to keep, you may remove or edit it.
66474#
66475# config.status only pays attention to the cache file if you give it
66476# the --recheck option to rerun configure.
66477#
66478# `ac_cv_env_foo' variables (set or unset) will be overridden when
66479# loading this file, other *unset* `ac_cv_foo' will be assigned the
66480# following values.
66481
66482_ACEOF
66483
66484# The following way of writing the cache mishandles newlines in values,
66485# but we know of no workaround that is simple, portable, and efficient.
66486# So, we kill variables containing newlines.
66487# Ultrix sh set writes to stderr and can't be redirected directly,
66488# and sets the high bit in the cache file unless we assign to the vars.
66489(
66490  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66491    eval ac_val=\$$ac_var
66492    case $ac_val in #(
66493    *${as_nl}*)
66494      case $ac_var in #(
66495      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66496$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66497      esac
66498      case $ac_var in #(
66499      _ | IFS | as_nl) ;; #(
66500      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66501      *) { eval $ac_var=; unset $ac_var;} ;;
66502      esac ;;
66503    esac
66504  done
66505
66506  (set) 2>&1 |
66507    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66508    *${as_nl}ac_space=\ *)
66509      # `set' does not quote correctly, so add quotes: double-quote
66510      # substitution turns \\\\ into \\, and sed turns \\ into \.
66511      sed -n \
66512	"s/'/'\\\\''/g;
66513	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66514      ;; #(
66515    *)
66516      # `set' quotes correctly as required by POSIX, so do not add quotes.
66517      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66518      ;;
66519    esac |
66520    sort
66521) |
66522  sed '
66523     /^ac_cv_env_/b end
66524     t clear
66525     :clear
66526     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66527     t end
66528     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66529     :end' >>confcache
66530if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66531  if test -w "$cache_file"; then
66532    if test "x$cache_file" != "x/dev/null"; then
66533      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66534$as_echo "$as_me: updating cache $cache_file" >&6;}
66535      if test ! -f "$cache_file" || test -h "$cache_file"; then
66536	cat confcache >"$cache_file"
66537      else
66538        case $cache_file in #(
66539        */* | ?:*)
66540	  mv -f confcache "$cache_file"$$ &&
66541	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66542        *)
66543	  mv -f confcache "$cache_file" ;;
66544	esac
66545      fi
66546    fi
66547  else
66548    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66549$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66550  fi
66551fi
66552rm -f confcache
66553
66554test "x$prefix" = xNONE && prefix=$ac_default_prefix
66555# Let make expand exec_prefix.
66556test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66557
66558# Transform confdefs.h into DEFS.
66559# Protect against shell expansion while executing Makefile rules.
66560# Protect against Makefile macro expansion.
66561#
66562# If the first sed substitution is executed (which looks for macros that
66563# take arguments), then branch to the quote section.  Otherwise,
66564# look for a macro that doesn't take arguments.
66565ac_script='
66566:mline
66567/\\$/{
66568 N
66569 s,\\\n,,
66570 b mline
66571}
66572t clear
66573:clear
66574s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66575t quote
66576s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66577t quote
66578b any
66579:quote
66580s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66581s/\[/\\&/g
66582s/\]/\\&/g
66583s/\$/$$/g
66584H
66585:any
66586${
66587	g
66588	s/^\n//
66589	s/\n/ /g
66590	p
66591}
66592'
66593DEFS=`sed -n "$ac_script" confdefs.h`
66594
66595
66596ac_libobjs=
66597ac_ltlibobjs=
66598U=
66599for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66600  # 1. Remove the extension, and $U if already installed.
66601  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66602  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66603  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66604  #    will be set to the directory where LIBOBJS objects are built.
66605  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66606  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66607done
66608LIBOBJS=$ac_libobjs
66609
66610LTLIBOBJS=$ac_ltlibobjs
66611
66612
66613
66614: "${CONFIG_STATUS=./config.status}"
66615ac_write_fail=0
66616ac_clean_files_save=$ac_clean_files
66617ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66618{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66619$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66620as_write_fail=0
66621cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66622#! $SHELL
66623# Generated by $as_me.
66624# Run this file to recreate the current configuration.
66625# Compiler output produced by configure, useful for debugging
66626# configure, is in config.log if it exists.
66627
66628debug=false
66629ac_cs_recheck=false
66630ac_cs_silent=false
66631
66632SHELL=\${CONFIG_SHELL-$SHELL}
66633export SHELL
66634_ASEOF
66635cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66636## -------------------- ##
66637## M4sh Initialization. ##
66638## -------------------- ##
66639
66640# Be more Bourne compatible
66641DUALCASE=1; export DUALCASE # for MKS sh
66642if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66643  emulate sh
66644  NULLCMD=:
66645  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66646  # is contrary to our usage.  Disable this feature.
66647  alias -g '${1+"$@"}'='"$@"'
66648  setopt NO_GLOB_SUBST
66649else
66650  case `(set -o) 2>/dev/null` in #(
66651  *posix*) :
66652    set -o posix ;; #(
66653  *) :
66654     ;;
66655esac
66656fi
66657
66658
66659as_nl='
66660'
66661export as_nl
66662# Printing a long string crashes Solaris 7 /usr/bin/printf.
66663as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66664as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66665as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66666# Prefer a ksh shell builtin over an external printf program on Solaris,
66667# but without wasting forks for bash or zsh.
66668if test -z "$BASH_VERSION$ZSH_VERSION" \
66669    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66670  as_echo='print -r --'
66671  as_echo_n='print -rn --'
66672elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66673  as_echo='printf %s\n'
66674  as_echo_n='printf %s'
66675else
66676  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66677    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66678    as_echo_n='/usr/ucb/echo -n'
66679  else
66680    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66681    as_echo_n_body='eval
66682      arg=$1;
66683      case $arg in #(
66684      *"$as_nl"*)
66685	expr "X$arg" : "X\\(.*\\)$as_nl";
66686	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66687      esac;
66688      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66689    '
66690    export as_echo_n_body
66691    as_echo_n='sh -c $as_echo_n_body as_echo'
66692  fi
66693  export as_echo_body
66694  as_echo='sh -c $as_echo_body as_echo'
66695fi
66696
66697# The user is always right.
66698if test "${PATH_SEPARATOR+set}" != set; then
66699  PATH_SEPARATOR=:
66700  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66701    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66702      PATH_SEPARATOR=';'
66703  }
66704fi
66705
66706
66707# IFS
66708# We need space, tab and new line, in precisely that order.  Quoting is
66709# there to prevent editors from complaining about space-tab.
66710# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66711# splitting by setting IFS to empty value.)
66712IFS=" ""	$as_nl"
66713
66714# Find who we are.  Look in the path if we contain no directory separator.
66715as_myself=
66716case $0 in #((
66717  *[\\/]* ) as_myself=$0 ;;
66718  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66719for as_dir in $PATH
66720do
66721  IFS=$as_save_IFS
66722  test -z "$as_dir" && as_dir=.
66723    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66724  done
66725IFS=$as_save_IFS
66726
66727     ;;
66728esac
66729# We did not find ourselves, most probably we were run as `sh COMMAND'
66730# in which case we are not to be found in the path.
66731if test "x$as_myself" = x; then
66732  as_myself=$0
66733fi
66734if test ! -f "$as_myself"; then
66735  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66736  exit 1
66737fi
66738
66739# Unset variables that we do not need and which cause bugs (e.g. in
66740# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66741# suppresses any "Segmentation fault" message there.  '((' could
66742# trigger a bug in pdksh 5.2.14.
66743for as_var in BASH_ENV ENV MAIL MAILPATH
66744do eval test x\${$as_var+set} = xset \
66745  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66746done
66747PS1='$ '
66748PS2='> '
66749PS4='+ '
66750
66751# NLS nuisances.
66752LC_ALL=C
66753export LC_ALL
66754LANGUAGE=C
66755export LANGUAGE
66756
66757# CDPATH.
66758(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66759
66760
66761# as_fn_error STATUS ERROR [LINENO LOG_FD]
66762# ----------------------------------------
66763# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66764# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66765# script with STATUS, using 1 if that was 0.
66766as_fn_error ()
66767{
66768  as_status=$1; test $as_status -eq 0 && as_status=1
66769  if test "$4"; then
66770    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66771    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66772  fi
66773  $as_echo "$as_me: error: $2" >&2
66774  as_fn_exit $as_status
66775} # as_fn_error
66776
66777
66778# as_fn_set_status STATUS
66779# -----------------------
66780# Set $? to STATUS, without forking.
66781as_fn_set_status ()
66782{
66783  return $1
66784} # as_fn_set_status
66785
66786# as_fn_exit STATUS
66787# -----------------
66788# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66789as_fn_exit ()
66790{
66791  set +e
66792  as_fn_set_status $1
66793  exit $1
66794} # as_fn_exit
66795
66796# as_fn_unset VAR
66797# ---------------
66798# Portably unset VAR.
66799as_fn_unset ()
66800{
66801  { eval $1=; unset $1;}
66802}
66803as_unset=as_fn_unset
66804# as_fn_append VAR VALUE
66805# ----------------------
66806# Append the text in VALUE to the end of the definition contained in VAR. Take
66807# advantage of any shell optimizations that allow amortized linear growth over
66808# repeated appends, instead of the typical quadratic growth present in naive
66809# implementations.
66810if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66811  eval 'as_fn_append ()
66812  {
66813    eval $1+=\$2
66814  }'
66815else
66816  as_fn_append ()
66817  {
66818    eval $1=\$$1\$2
66819  }
66820fi # as_fn_append
66821
66822# as_fn_arith ARG...
66823# ------------------
66824# Perform arithmetic evaluation on the ARGs, and store the result in the
66825# global $as_val. Take advantage of shells that can avoid forks. The arguments
66826# must be portable across $(()) and expr.
66827if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66828  eval 'as_fn_arith ()
66829  {
66830    as_val=$(( $* ))
66831  }'
66832else
66833  as_fn_arith ()
66834  {
66835    as_val=`expr "$@" || test $? -eq 1`
66836  }
66837fi # as_fn_arith
66838
66839
66840if expr a : '\(a\)' >/dev/null 2>&1 &&
66841   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66842  as_expr=expr
66843else
66844  as_expr=false
66845fi
66846
66847if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66848  as_basename=basename
66849else
66850  as_basename=false
66851fi
66852
66853if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66854  as_dirname=dirname
66855else
66856  as_dirname=false
66857fi
66858
66859as_me=`$as_basename -- "$0" ||
66860$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66861	 X"$0" : 'X\(//\)$' \| \
66862	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66863$as_echo X/"$0" |
66864    sed '/^.*\/\([^/][^/]*\)\/*$/{
66865	    s//\1/
66866	    q
66867	  }
66868	  /^X\/\(\/\/\)$/{
66869	    s//\1/
66870	    q
66871	  }
66872	  /^X\/\(\/\).*/{
66873	    s//\1/
66874	    q
66875	  }
66876	  s/.*/./; q'`
66877
66878# Avoid depending upon Character Ranges.
66879as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66880as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66881as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66882as_cr_digits='0123456789'
66883as_cr_alnum=$as_cr_Letters$as_cr_digits
66884
66885ECHO_C= ECHO_N= ECHO_T=
66886case `echo -n x` in #(((((
66887-n*)
66888  case `echo 'xy\c'` in
66889  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66890  xy)  ECHO_C='\c';;
66891  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66892       ECHO_T='	';;
66893  esac;;
66894*)
66895  ECHO_N='-n';;
66896esac
66897
66898rm -f conf$$ conf$$.exe conf$$.file
66899if test -d conf$$.dir; then
66900  rm -f conf$$.dir/conf$$.file
66901else
66902  rm -f conf$$.dir
66903  mkdir conf$$.dir 2>/dev/null
66904fi
66905if (echo >conf$$.file) 2>/dev/null; then
66906  if ln -s conf$$.file conf$$ 2>/dev/null; then
66907    as_ln_s='ln -s'
66908    # ... but there are two gotchas:
66909    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66910    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66911    # In both cases, we have to default to `cp -pR'.
66912    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66913      as_ln_s='cp -pR'
66914  elif ln conf$$.file conf$$ 2>/dev/null; then
66915    as_ln_s=ln
66916  else
66917    as_ln_s='cp -pR'
66918  fi
66919else
66920  as_ln_s='cp -pR'
66921fi
66922rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66923rmdir conf$$.dir 2>/dev/null
66924
66925
66926# as_fn_mkdir_p
66927# -------------
66928# Create "$as_dir" as a directory, including parents if necessary.
66929as_fn_mkdir_p ()
66930{
66931
66932  case $as_dir in #(
66933  -*) as_dir=./$as_dir;;
66934  esac
66935  test -d "$as_dir" || eval $as_mkdir_p || {
66936    as_dirs=
66937    while :; do
66938      case $as_dir in #(
66939      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66940      *) as_qdir=$as_dir;;
66941      esac
66942      as_dirs="'$as_qdir' $as_dirs"
66943      as_dir=`$as_dirname -- "$as_dir" ||
66944$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66945	 X"$as_dir" : 'X\(//\)[^/]' \| \
66946	 X"$as_dir" : 'X\(//\)$' \| \
66947	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66948$as_echo X"$as_dir" |
66949    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66950	    s//\1/
66951	    q
66952	  }
66953	  /^X\(\/\/\)[^/].*/{
66954	    s//\1/
66955	    q
66956	  }
66957	  /^X\(\/\/\)$/{
66958	    s//\1/
66959	    q
66960	  }
66961	  /^X\(\/\).*/{
66962	    s//\1/
66963	    q
66964	  }
66965	  s/.*/./; q'`
66966      test -d "$as_dir" && break
66967    done
66968    test -z "$as_dirs" || eval "mkdir $as_dirs"
66969  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66970
66971
66972} # as_fn_mkdir_p
66973if mkdir -p . 2>/dev/null; then
66974  as_mkdir_p='mkdir -p "$as_dir"'
66975else
66976  test -d ./-p && rmdir ./-p
66977  as_mkdir_p=false
66978fi
66979
66980
66981# as_fn_executable_p FILE
66982# -----------------------
66983# Test if FILE is an executable regular file.
66984as_fn_executable_p ()
66985{
66986  test -f "$1" && test -x "$1"
66987} # as_fn_executable_p
66988as_test_x='test -x'
66989as_executable_p=as_fn_executable_p
66990
66991# Sed expression to map a string onto a valid CPP name.
66992as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66993
66994# Sed expression to map a string onto a valid variable name.
66995as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66996
66997
66998exec 6>&1
66999## ----------------------------------- ##
67000## Main body of $CONFIG_STATUS script. ##
67001## ----------------------------------- ##
67002_ASEOF
67003test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67004
67005cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67006# Save the log message, to keep $0 and so on meaningful, and to
67007# report actual input values of CONFIG_FILES etc. instead of their
67008# values after options handling.
67009ac_log="
67010This file was extended by OpenJDK $as_me jdk9, which was
67011generated by GNU Autoconf 2.69.  Invocation command line was
67012
67013  CONFIG_FILES    = $CONFIG_FILES
67014  CONFIG_HEADERS  = $CONFIG_HEADERS
67015  CONFIG_LINKS    = $CONFIG_LINKS
67016  CONFIG_COMMANDS = $CONFIG_COMMANDS
67017  $ $0 $@
67018
67019on `(hostname || uname -n) 2>/dev/null | sed 1q`
67020"
67021
67022_ACEOF
67023
67024case $ac_config_files in *"
67025"*) set x $ac_config_files; shift; ac_config_files=$*;;
67026esac
67027
67028
67029
67030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67031# Files that config.status was made for.
67032config_files="$ac_config_files"
67033
67034_ACEOF
67035
67036cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67037ac_cs_usage="\
67038\`$as_me' instantiates files and other configuration actions
67039from templates according to the current configuration.  Unless the files
67040and actions are specified as TAGs, all are instantiated by default.
67041
67042Usage: $0 [OPTION]... [TAG]...
67043
67044  -h, --help       print this help, then exit
67045  -V, --version    print version number and configuration settings, then exit
67046      --config     print configuration, then exit
67047  -q, --quiet, --silent
67048                   do not print progress messages
67049  -d, --debug      don't remove temporary files
67050      --recheck    update $as_me by reconfiguring in the same conditions
67051      --file=FILE[:TEMPLATE]
67052                   instantiate the configuration file FILE
67053
67054Configuration files:
67055$config_files
67056
67057Report bugs to <build-dev@openjdk.java.net>.
67058OpenJDK home page: <http://openjdk.java.net>."
67059
67060_ACEOF
67061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67062ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67063ac_cs_version="\\
67064OpenJDK config.status jdk9
67065configured by $0, generated by GNU Autoconf 2.69,
67066  with options \\"\$ac_cs_config\\"
67067
67068Copyright (C) 2012 Free Software Foundation, Inc.
67069This config.status script is free software; the Free Software Foundation
67070gives unlimited permission to copy, distribute and modify it."
67071
67072ac_pwd='$ac_pwd'
67073srcdir='$srcdir'
67074AWK='$AWK'
67075test -n "\$AWK" || AWK=awk
67076_ACEOF
67077
67078cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67079# The default lists apply if the user does not specify any file.
67080ac_need_defaults=:
67081while test $# != 0
67082do
67083  case $1 in
67084  --*=?*)
67085    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67086    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67087    ac_shift=:
67088    ;;
67089  --*=)
67090    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67091    ac_optarg=
67092    ac_shift=:
67093    ;;
67094  *)
67095    ac_option=$1
67096    ac_optarg=$2
67097    ac_shift=shift
67098    ;;
67099  esac
67100
67101  case $ac_option in
67102  # Handling of the options.
67103  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67104    ac_cs_recheck=: ;;
67105  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67106    $as_echo "$ac_cs_version"; exit ;;
67107  --config | --confi | --conf | --con | --co | --c )
67108    $as_echo "$ac_cs_config"; exit ;;
67109  --debug | --debu | --deb | --de | --d | -d )
67110    debug=: ;;
67111  --file | --fil | --fi | --f )
67112    $ac_shift
67113    case $ac_optarg in
67114    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67115    '') as_fn_error $? "missing file argument" ;;
67116    esac
67117    as_fn_append CONFIG_FILES " '$ac_optarg'"
67118    ac_need_defaults=false;;
67119  --he | --h |  --help | --hel | -h )
67120    $as_echo "$ac_cs_usage"; exit ;;
67121  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67122  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67123    ac_cs_silent=: ;;
67124
67125  # This is an error.
67126  -*) as_fn_error $? "unrecognized option: \`$1'
67127Try \`$0 --help' for more information." ;;
67128
67129  *) as_fn_append ac_config_targets " $1"
67130     ac_need_defaults=false ;;
67131
67132  esac
67133  shift
67134done
67135
67136ac_configure_extra_args=
67137
67138if $ac_cs_silent; then
67139  exec 6>/dev/null
67140  ac_configure_extra_args="$ac_configure_extra_args --silent"
67141fi
67142
67143_ACEOF
67144cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67145if \$ac_cs_recheck; then
67146  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67147  shift
67148  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67149  CONFIG_SHELL='$SHELL'
67150  export CONFIG_SHELL
67151  exec "\$@"
67152fi
67153
67154_ACEOF
67155cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67156exec 5>>config.log
67157{
67158  echo
67159  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67160## Running $as_me. ##
67161_ASBOX
67162  $as_echo "$ac_log"
67163} >&5
67164
67165_ACEOF
67166cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67167_ACEOF
67168
67169cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67170
67171# Handling of arguments.
67172for ac_config_target in $ac_config_targets
67173do
67174  case $ac_config_target in
67175    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67176    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67177    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67178    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67179    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67180
67181  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67182  esac
67183done
67184
67185
67186# If the user did not use the arguments to specify the items to instantiate,
67187# then the envvar interface is used.  Set only those that are not.
67188# We use the long form for the default assignment because of an extremely
67189# bizarre bug on SunOS 4.1.3.
67190if $ac_need_defaults; then
67191  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67192fi
67193
67194# Have a temporary directory for convenience.  Make it in the build tree
67195# simply because there is no reason against having it here, and in addition,
67196# creating and moving files from /tmp can sometimes cause problems.
67197# Hook for its removal unless debugging.
67198# Note that there is a small window in which the directory will not be cleaned:
67199# after its creation but before its name has been assigned to `$tmp'.
67200$debug ||
67201{
67202  tmp= ac_tmp=
67203  trap 'exit_status=$?
67204  : "${ac_tmp:=$tmp}"
67205  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67206' 0
67207  trap 'as_fn_exit 1' 1 2 13 15
67208}
67209# Create a (secure) tmp directory for tmp files.
67210
67211{
67212  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67213  test -d "$tmp"
67214}  ||
67215{
67216  tmp=./conf$$-$RANDOM
67217  (umask 077 && mkdir "$tmp")
67218} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67219ac_tmp=$tmp
67220
67221# Set up the scripts for CONFIG_FILES section.
67222# No need to generate them if there are no CONFIG_FILES.
67223# This happens for instance with `./config.status config.h'.
67224if test -n "$CONFIG_FILES"; then
67225
67226
67227ac_cr=`echo X | tr X '\015'`
67228# On cygwin, bash can eat \r inside `` if the user requested igncr.
67229# But we know of no other shell where ac_cr would be empty at this
67230# point, so we can use a bashism as a fallback.
67231if test "x$ac_cr" = x; then
67232  eval ac_cr=\$\'\\r\'
67233fi
67234ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67235if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67236  ac_cs_awk_cr='\\r'
67237else
67238  ac_cs_awk_cr=$ac_cr
67239fi
67240
67241echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67242_ACEOF
67243
67244
67245{
67246  echo "cat >conf$$subs.awk <<_ACEOF" &&
67247  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67248  echo "_ACEOF"
67249} >conf$$subs.sh ||
67250  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67251ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67252ac_delim='%!_!# '
67253for ac_last_try in false false false false false :; do
67254  . ./conf$$subs.sh ||
67255    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67256
67257  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67258  if test $ac_delim_n = $ac_delim_num; then
67259    break
67260  elif $ac_last_try; then
67261    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67262  else
67263    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67264  fi
67265done
67266rm -f conf$$subs.sh
67267
67268cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67269cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67270_ACEOF
67271sed -n '
67272h
67273s/^/S["/; s/!.*/"]=/
67274p
67275g
67276s/^[^!]*!//
67277:repl
67278t repl
67279s/'"$ac_delim"'$//
67280t delim
67281:nl
67282h
67283s/\(.\{148\}\)..*/\1/
67284t more1
67285s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67286p
67287n
67288b repl
67289:more1
67290s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67291p
67292g
67293s/.\{148\}//
67294t nl
67295:delim
67296h
67297s/\(.\{148\}\)..*/\1/
67298t more2
67299s/["\\]/\\&/g; s/^/"/; s/$/"/
67300p
67301b
67302:more2
67303s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67304p
67305g
67306s/.\{148\}//
67307t delim
67308' <conf$$subs.awk | sed '
67309/^[^""]/{
67310  N
67311  s/\n//
67312}
67313' >>$CONFIG_STATUS || ac_write_fail=1
67314rm -f conf$$subs.awk
67315cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67316_ACAWK
67317cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67318  for (key in S) S_is_set[key] = 1
67319  FS = ""
67320
67321}
67322{
67323  line = $ 0
67324  nfields = split(line, field, "@")
67325  substed = 0
67326  len = length(field[1])
67327  for (i = 2; i < nfields; i++) {
67328    key = field[i]
67329    keylen = length(key)
67330    if (S_is_set[key]) {
67331      value = S[key]
67332      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67333      len += length(value) + length(field[++i])
67334      substed = 1
67335    } else
67336      len += 1 + keylen
67337  }
67338
67339  print line
67340}
67341
67342_ACAWK
67343_ACEOF
67344cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67345if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67346  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67347else
67348  cat
67349fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67350  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67351_ACEOF
67352
67353# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67354# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67355# trailing colons and then remove the whole line if VPATH becomes empty
67356# (actually we leave an empty line to preserve line numbers).
67357if test "x$srcdir" = x.; then
67358  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67359h
67360s///
67361s/^/:/
67362s/[	 ]*$/:/
67363s/:\$(srcdir):/:/g
67364s/:\${srcdir}:/:/g
67365s/:@srcdir@:/:/g
67366s/^:*//
67367s/:*$//
67368x
67369s/\(=[	 ]*\).*/\1/
67370G
67371s/\n//
67372s/^[^=]*=[	 ]*$//
67373}'
67374fi
67375
67376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67377fi # test -n "$CONFIG_FILES"
67378
67379
67380eval set X "  :F $CONFIG_FILES      "
67381shift
67382for ac_tag
67383do
67384  case $ac_tag in
67385  :[FHLC]) ac_mode=$ac_tag; continue;;
67386  esac
67387  case $ac_mode$ac_tag in
67388  :[FHL]*:*);;
67389  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67390  :[FH]-) ac_tag=-:-;;
67391  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67392  esac
67393  ac_save_IFS=$IFS
67394  IFS=:
67395  set x $ac_tag
67396  IFS=$ac_save_IFS
67397  shift
67398  ac_file=$1
67399  shift
67400
67401  case $ac_mode in
67402  :L) ac_source=$1;;
67403  :[FH])
67404    ac_file_inputs=
67405    for ac_f
67406    do
67407      case $ac_f in
67408      -) ac_f="$ac_tmp/stdin";;
67409      *) # Look for the file first in the build tree, then in the source tree
67410	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67411	 # because $ac_f cannot contain `:'.
67412	 test -f "$ac_f" ||
67413	   case $ac_f in
67414	   [\\/$]*) false;;
67415	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67416	   esac ||
67417	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67418      esac
67419      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67420      as_fn_append ac_file_inputs " '$ac_f'"
67421    done
67422
67423    # Let's still pretend it is `configure' which instantiates (i.e., don't
67424    # use $as_me), people would be surprised to read:
67425    #    /* config.h.  Generated by config.status.  */
67426    configure_input='Generated from '`
67427	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67428	`' by configure.'
67429    if test x"$ac_file" != x-; then
67430      configure_input="$ac_file.  $configure_input"
67431      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67432$as_echo "$as_me: creating $ac_file" >&6;}
67433    fi
67434    # Neutralize special characters interpreted by sed in replacement strings.
67435    case $configure_input in #(
67436    *\&* | *\|* | *\\* )
67437       ac_sed_conf_input=`$as_echo "$configure_input" |
67438       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67439    *) ac_sed_conf_input=$configure_input;;
67440    esac
67441
67442    case $ac_tag in
67443    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67444      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67445    esac
67446    ;;
67447  esac
67448
67449  ac_dir=`$as_dirname -- "$ac_file" ||
67450$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67451	 X"$ac_file" : 'X\(//\)[^/]' \| \
67452	 X"$ac_file" : 'X\(//\)$' \| \
67453	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67454$as_echo X"$ac_file" |
67455    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67456	    s//\1/
67457	    q
67458	  }
67459	  /^X\(\/\/\)[^/].*/{
67460	    s//\1/
67461	    q
67462	  }
67463	  /^X\(\/\/\)$/{
67464	    s//\1/
67465	    q
67466	  }
67467	  /^X\(\/\).*/{
67468	    s//\1/
67469	    q
67470	  }
67471	  s/.*/./; q'`
67472  as_dir="$ac_dir"; as_fn_mkdir_p
67473  ac_builddir=.
67474
67475case "$ac_dir" in
67476.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67477*)
67478  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67479  # A ".." for each directory in $ac_dir_suffix.
67480  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67481  case $ac_top_builddir_sub in
67482  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67483  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67484  esac ;;
67485esac
67486ac_abs_top_builddir=$ac_pwd
67487ac_abs_builddir=$ac_pwd$ac_dir_suffix
67488# for backward compatibility:
67489ac_top_builddir=$ac_top_build_prefix
67490
67491case $srcdir in
67492  .)  # We are building in place.
67493    ac_srcdir=.
67494    ac_top_srcdir=$ac_top_builddir_sub
67495    ac_abs_top_srcdir=$ac_pwd ;;
67496  [\\/]* | ?:[\\/]* )  # Absolute name.
67497    ac_srcdir=$srcdir$ac_dir_suffix;
67498    ac_top_srcdir=$srcdir
67499    ac_abs_top_srcdir=$srcdir ;;
67500  *) # Relative name.
67501    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67502    ac_top_srcdir=$ac_top_build_prefix$srcdir
67503    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67504esac
67505ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67506
67507
67508  case $ac_mode in
67509  :F)
67510  #
67511  # CONFIG_FILE
67512  #
67513
67514_ACEOF
67515
67516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67517# If the template does not know about datarootdir, expand it.
67518# FIXME: This hack should be removed a few years after 2.60.
67519ac_datarootdir_hack=; ac_datarootdir_seen=
67520ac_sed_dataroot='
67521/datarootdir/ {
67522  p
67523  q
67524}
67525/@datadir@/p
67526/@docdir@/p
67527/@infodir@/p
67528/@localedir@/p
67529/@mandir@/p'
67530case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67531*datarootdir*) ac_datarootdir_seen=yes;;
67532*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67533  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67534$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67535_ACEOF
67536cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67537  ac_datarootdir_hack='
67538  s&@datadir@&$datadir&g
67539  s&@docdir@&$docdir&g
67540  s&@infodir@&$infodir&g
67541  s&@localedir@&$localedir&g
67542  s&@mandir@&$mandir&g
67543  s&\\\${datarootdir}&$datarootdir&g' ;;
67544esac
67545_ACEOF
67546
67547# Neutralize VPATH when `$srcdir' = `.'.
67548# Shell code in configure.ac might set extrasub.
67549# FIXME: do we really want to maintain this feature?
67550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67551ac_sed_extra="$ac_vpsub
67552$extrasub
67553_ACEOF
67554cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67555:t
67556/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67557s|@configure_input@|$ac_sed_conf_input|;t t
67558s&@top_builddir@&$ac_top_builddir_sub&;t t
67559s&@top_build_prefix@&$ac_top_build_prefix&;t t
67560s&@srcdir@&$ac_srcdir&;t t
67561s&@abs_srcdir@&$ac_abs_srcdir&;t t
67562s&@top_srcdir@&$ac_top_srcdir&;t t
67563s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67564s&@builddir@&$ac_builddir&;t t
67565s&@abs_builddir@&$ac_abs_builddir&;t t
67566s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67567$ac_datarootdir_hack
67568"
67569eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67570  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67571
67572test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67573  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67574  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67575      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67576  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67577which seems to be undefined.  Please make sure it is defined" >&5
67578$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67579which seems to be undefined.  Please make sure it is defined" >&2;}
67580
67581  rm -f "$ac_tmp/stdin"
67582  case $ac_file in
67583  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67584  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67585  esac \
67586  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67587 ;;
67588
67589
67590
67591  esac
67592
67593done # for ac_tag
67594
67595
67596as_fn_exit 0
67597_ACEOF
67598ac_clean_files=$ac_clean_files_save
67599
67600test $ac_write_fail = 0 ||
67601  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67602
67603
67604# configure is writing to config.log, and then calls config.status.
67605# config.status does its own redirection, appending to config.log.
67606# Unfortunately, on DOS this fails, as config.log is still kept open
67607# by configure, so config.status won't be able to write to it; its
67608# output is simply discarded.  So we exec the FD to /dev/null,
67609# effectively closing config.log, so it can be properly (re)opened and
67610# appended to by config.status.  When coming back to configure, we
67611# need to make the FD available again.
67612if test "$no_create" != yes; then
67613  ac_cs_success=:
67614  ac_config_status_args=
67615  test "$silent" = yes &&
67616    ac_config_status_args="$ac_config_status_args --quiet"
67617  exec 5>/dev/null
67618  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67619  exec 5>>config.log
67620  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67621  # would make configure fail if this is the last instruction.
67622  $ac_cs_success || as_fn_exit 1
67623fi
67624if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67625  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67626$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67627fi
67628
67629
67630# After AC_OUTPUT, we need to do final work
67631
67632
67633  # Try to move config.log (generated by autoconf) to the configure-support directory.
67634  if test -e ./config.log; then
67635    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67636  fi
67637
67638  # Rotate our log file (configure.log)
67639  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67640    $RM -f "$OUTPUT_ROOT/configure.log.old"
67641  fi
67642  if test -e "$OUTPUT_ROOT/configure.log"; then
67643    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67644  fi
67645
67646  # Move configure.log from current directory to the build output root
67647  if test -e ./configure.log; then
67648    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67649  fi
67650
67651  # Make the compare script executable
67652  $CHMOD +x $OUTPUT_ROOT/compare.sh
67653
67654
67655# Finally output some useful information to the user
67656
67657  # Finally output some useful information to the user
67658
67659  printf "\n"
67660  printf "====================================================\n"
67661  if test "x$no_create" != "xyes"; then
67662    if test "x$IS_RECONFIGURE" != "xyes"; then
67663      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67664    else
67665      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67666    fi
67667  else
67668    if test "x$IS_RECONFIGURE" != "xyes"; then
67669      printf "A configuration has been successfully checked but not created\n"
67670    else
67671      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67672    fi
67673  fi
67674  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67675    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67676  else
67677    printf "using default settings.\n"
67678  fi
67679
67680  printf "\n"
67681  printf "Configuration summary:\n"
67682  printf "* Debug level:    $DEBUG_LEVEL\n"
67683  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67684  printf "* JDK variant:    $JDK_VARIANT\n"
67685  printf "* JVM variants:   $JVM_VARIANTS\n"
67686  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67687  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67688
67689  printf "\n"
67690  printf "Tools summary:\n"
67691  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67692    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67693  fi
67694  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67695  if test "x$TOOLCHAIN_VERSION" != "x"; then
67696    print_version=" $TOOLCHAIN_VERSION"
67697  fi
67698  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67699  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67700  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67701
67702  printf "\n"
67703  printf "Build performance summary:\n"
67704  printf "* Cores to use:   $JOBS\n"
67705  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67706  if test "x$CCACHE_STATUS" != "x"; then
67707    printf "* ccache status:  $CCACHE_STATUS\n"
67708  fi
67709  printf "\n"
67710
67711  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67712    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67713    printf "will result in longer build times.\n"
67714    printf "\n"
67715  fi
67716
67717  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67718    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67719    printf "These are not respected, and will be ignored. It is recommended\n"
67720    printf "that you clean your environment. The following variables are set:\n"
67721    printf "$FOUND_ALT_VARIABLES\n"
67722    printf "\n"
67723  fi
67724
67725  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67726    printf "WARNING: Your build output directory is not on a local disk.\n"
67727    printf "This will severely degrade build performance!\n"
67728    printf "It is recommended that you create an output directory on a local disk,\n"
67729    printf "and run the configure script again from that directory.\n"
67730    printf "\n"
67731  fi
67732
67733  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67734    printf "WARNING: The result of this configuration has overridden an older\n"
67735    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67736    printf "proper build. Failure to do so might result in strange build problems.\n"
67737    printf "\n"
67738  fi
67739
67740  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67741    printf "WARNING: The result of this configuration was not saved.\n"
67742    printf "You should run without '--no-create | -n' to create the configuration.\n"
67743    printf "\n"
67744  fi
67745
67746
67747
67748  # Locate config.log.
67749  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67750    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67751  elif test -e "./config.log"; then
67752    CONFIG_LOG_PATH="."
67753  fi
67754
67755  if test -e "$CONFIG_LOG_PATH/config.log"; then
67756    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67757    if test $? -eq 0; then
67758      printf "The following warnings were produced. Repeated here for convenience:\n"
67759      # We must quote sed expression (using []) to stop m4 from eating the [].
67760      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67761      printf "\n"
67762    fi
67763  fi
67764
67765